Skip to content

Commit 35d90df

Browse files
committed
qtvcp -auto_height: improve logging/status output
Hide some developer info and add some user info.
1 parent 5fa8475 commit 35d90df

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

lib/python/qtvcp/lib/auto_height/auto_height.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -133,13 +133,13 @@ def read_stderror(self):
133133
self.parse_input(line)
134134

135135
def process_finished(self, exitCode, exitStatus):
136-
LOG.info(("Probe Process finished - exitCode {} exitStatus {}".format(exitCode, exitStatus)))
136+
LOG.verbose(("Probe Process finished - exitCode {} exitStatus {}".format(exitCode, exitStatus)))
137137
self.add_status("Height measurement process finished")
138138
self.proc = None
139139

140140
def parse_input(self, line):
141141
line = line.decode("utf-8")
142-
print(line)
142+
LOG.verbose("Raw returned Line={}".format(line))
143143
if "INFO" in line:
144144
pass
145145
# print(line)
@@ -183,12 +183,14 @@ def set_position_clicked(self):
183183
self.lineEdit_pos_x1.setText(format(xyz[0], '.3f'))
184184
self.lineEdit_pos_y1.setText(format(xyz[1], '.3f'))
185185
self.lineEdit_pos_z1.setText(format(xyz[2], '.3f'))
186-
self.add_status("Probe position 1 set")
186+
self.add_status("Probe position 1 set (X {} Y {} Z {})".format(
187+
format(xyz[0], '.3f'),format(xyz[1], '.3f'),format(xyz[2], '.3f')))
187188
elif btn == "mp":
188189
self.lineEdit_pos_x2.setText(format(xyz[0], '.3f'))
189190
self.lineEdit_pos_y2.setText(format(xyz[1], '.3f'))
190191
self.lineEdit_pos_z2.setText(format(xyz[2], '.3f'))
191-
self.add_status("Probe position 2 set")
192+
self.add_status("Probe position 2 set (X {} Y {} Z {})".format(
193+
format(xyz[0], '.3f'),format(xyz[1], '.3f'),format(xyz[2], '.3f')))
192194

193195
def start(self):
194196
if float(self.lineEdit_z_safe_travel.text()) <= float(self.lineEdit_pos_z1.text()):
@@ -212,7 +214,7 @@ def show_result(self, data):
212214
self.lineEdit_height.setText(format(diff, '.3f'))
213215
if self.chk_autofill.isChecked():
214216
self.w.lineEdit_work_height.setText(format(diff, '.3f'))
215-
self.add_status("Height measurement successfully completed")
217+
self.add_status("Height measurement successfully completed with {}".format(format(diff, '.3f')))
216218

217219
def add_status(self, message):
218220
self.lbl_status.setText(message)

0 commit comments

Comments
 (0)