Skip to content

Commit a0058e6

Browse files
committed
qtplasmac: fix small bug when clearing laser when it's out of bounds
1 parent 914dcc1 commit a0058e6

2 files changed

Lines changed: 16 additions & 9 deletions

File tree

share/qtvcp/screens/qtplasmac/qtplasmac_handler.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
VERSION = '1.228.219'
1+
VERSION = '1.228.220'
22

33
'''
44
qtplasmac_handler.py
@@ -2486,8 +2486,8 @@ def set_signal_connections(self):
24862486
self.yOffsetPin.value_changed.connect(lambda v:self.cutrec_offset_changed(self.xOffsetPin.get(), v))
24872487
self.offsetsActivePin.value_changed.connect(lambda v:self.offsets_active_changed(v))
24882488
self.consChangePin.value_changed.connect(lambda v:self.consumable_change_changed(v))
2489-
self.w.cam_mark.pressed.connect(self.cam_mark_pressed)
2490-
self.w.cam_goto.pressed.connect(self.cam_goto_pressed)
2489+
self.w.cam_mark.clicked.connect(self.cam_mark_clicked)
2490+
self.w.cam_goto.clicked.connect(self.cam_goto_clicked)
24912491
self.w.cam_zoom_plus.pressed.connect(self.cam_zoom_plus_pressed)
24922492
self.w.cam_zoom_minus.pressed.connect(self.cam_zoom_minus_pressed)
24932493
self.w.cam_dia_plus.pressed.connect(self.cam_dia_plus_pressed)
@@ -4664,17 +4664,17 @@ def laser_recovery_state_changed(self, value):
46644664
def laser_clicked(self):
46654665
if STATUS.is_interp_paused():
46664666
return
4667+
if self.laserButtonState == 'reset':
4668+
self.laserButtonState = 'laser'
4669+
return
46674670
xPos = STATUS.get_position()[0][0] - self.laserOffsetX
46684671
yPos = STATUS.get_position()[0][1] - self.laserOffsetY
46694672
if xPos < self.xMin or xPos > self.xMax or yPos < self.yMin or yPos > self.yMax:
46704673
head = _translate('HandlerClass', 'LASER ERROR')
46714674
msg0 = _translate('HandlerClass', 'Laser is outside the machine boundary')
46724675
STATUS.emit('error', linuxcnc.OPERATOR_ERROR, '{}:\n{}\n'.format(head, msg0))
46734676
return
4674-
if self.laserButtonState == 'reset':
4675-
self.laserButtonState = 'laser'
4676-
return
4677-
elif self.laserButtonState == 'laser':
4677+
if self.laserButtonState == 'laser':
46784678
self.w.laser.setText(_translate('HandlerClass', 'MARK\nEDGE'))
46794679
self.laserButtonState = 'markedge'
46804680
self.laserOnPin.set(1)
@@ -4756,7 +4756,7 @@ def sheet_align(self, button_state, button, offsetX, offsetY):
47564756
ACTION.SET_MANUAL_MODE()
47574757
return button_state
47584758

4759-
def cam_mark_pressed(self):
4759+
def cam_mark_clicked(self):
47604760
xPos = STATUS.get_position()[0][0] - self.camOffsetX
47614761
yPos = STATUS.get_position()[0][1] - self.camOffsetY
47624762
if xPos < self.xMin or xPos > self.xMax or yPos < self.yMin or yPos > self.yMax:
@@ -4766,7 +4766,7 @@ def cam_mark_pressed(self):
47664766
return
47674767
self.camButtonState = self.sheet_align(self.camButtonState, self.w.cam_mark, self.camOffsetX, self.camOffsetY)
47684768

4769-
def cam_goto_pressed(self):
4769+
def cam_goto_clicked(self):
47704770
msgList, units, xMin, yMin, xMax, yMax = self.bounds_check('align', 0, 0)
47714771
if not self.boundsError['align']:
47724772
ACTION.CALL_MDI_WAIT('G0 X0 Y0')

share/qtvcp/screens/qtplasmac/versions.html

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,13 @@ <h2>QtPlasmaC Version History</h2>
3030
</table>
3131
<br>
3232
<!--- ****** ADD NEXT VERSION BELOW THIS LINE ****** --->
33+
<br><b><u>v1.228.220 2022 July 25</u></b>
34+
<ul style="margin:0;">
35+
<li>fix small bug when clearing laser when it's out of bounds</li>
36+
<li>change window icons to Chips_Plasma</li>
37+
</ul>
38+
<i>Changes submitted by snowgoer540 (Greg Carl)</i><br>
39+
3340
<br><b><u>v1.228.219 2022 July 17</u></b>
3441
<ul style="margin:0;">
3542
<li>no need to inhibit jogging while probing</li>

0 commit comments

Comments
 (0)