Skip to content

Commit bef1f96

Browse files
committed
qtplasmac: use gcode units for bounds check and table view conversions
1 parent d7a86b3 commit bef1f96

2 files changed

Lines changed: 12 additions & 5 deletions

File tree

share/qtvcp/screens/qtplasmac/qtplasmac_handler.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
VERSION = '1.235.268'
1+
VERSION = '1.235.269'
22

33
'''
44
qtplasmac_handler.py
@@ -1967,9 +1967,9 @@ def view_t_pressed(self):
19671967
mid, size = GlCanonDraw.extents_info(self.w.gcodegraphics)
19681968
if self.gcodeProps:
19691969
mult = 1
1970-
if self.units == 'in' and self.gcodeProps['machine_unit_sys'] == 'Metric':
1970+
if self.units == 'in' and self.gcodeProps['gcode_units'] == 'mm':
19711971
mult = 0.03937
1972-
elif self.units == 'mm' and self.gcodeProps['machine_unit_sys'] == 'Imperial':
1972+
elif self.units == 'mm' and self.gcodeProps['gcode_units'] == 'in':
19731973
mult = 25.4
19741974
x = (round(float(self.gcodeProps['x'].split()[0]) * mult, 4))
19751975
y = (round(float(self.gcodeProps['y'].split()[0]) * mult, 4))
@@ -2432,9 +2432,9 @@ def bounds_check(self, boundsType, xOffset, yOffset):
24322432
self.boundsError[boundsType] = False
24332433
msgList = []
24342434
boundsMultiplier = 1
2435-
if self.units == 'in' and self.gcodeProps['machine_unit_sys'] == 'Metric':
2435+
if self.units == 'in' and self.gcodeProps['gcode_units'] == 'mm':
24362436
boundsMultiplier = 0.03937
2437-
elif self.units == 'mm' and self.gcodeProps['machine_unit_sys'] == 'Imperial':
2437+
elif self.units == 'mm' and self.gcodeProps['gcode_units'] == 'in':
24382438
boundsMultiplier = 25.4
24392439
if framing:
24402440
xStart = STATUS.stat.g5x_offset[0] + xOffset

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.235.269 2023 Mar 24</u></b>
34+
<ul style="margin:0;">
35+
<li>remove blank file props workaround</li>
36+
<li>use gcode units for bounds check and table view conversions</li>
37+
</ul>
38+
<i>Changes submitted by snowgoer540 (Greg Carl)</i><br>
39+
3340
<br><b><u>v1.235.268 2023 Mar 15</u></b>
3441
<ul style="margin:0;">
3542
<li>fix framing when machine units and g20/g21 state dont match</li>

0 commit comments

Comments
 (0)