Skip to content

Commit 67ea71a

Browse files
committed
qtvcp -istat: add a function unit_conversion_10
needs for offset widget update
1 parent 549a0f5 commit 67ea71a

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

lib/python/qtvcp/qt_istat.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,11 +178,13 @@ def update(self):
178178
self.MACHINE_IS_METRIC = True
179179
self.MACHINE_UNIT_CONVERSION = 1.0 / 25.4
180180
self.MACHINE_UNIT_CONVERSION_9 = [1.0 / 25.4] * 3 + [1] * 3 + [1.0 / 25.4] * 3
181+
self.MACHINE_UNIT_CONVERSION_10 = [1.0 / 25.4] * 3 + [1] * 3 + [1.0 / 25.4] * 3 + [1]
181182
log.debug('Machine is METRIC based. unit Conversion constant={}'.format(self.MACHINE_UNIT_CONVERSION))
182183
else:
183184
self.MACHINE_IS_METRIC = False
184185
self.MACHINE_UNIT_CONVERSION = 25.4
185186
self.MACHINE_UNIT_CONVERSION_9 = [25.4] * 3 + [1] * 3 + [25.4] * 3
187+
self.MACHINE_UNIT_CONVERSION_10 = [25.4] * 3 + [1] * 3 + [25.4] * 3 + [1]
186188
log.debug('Machine is IMPERIAL based. unit Conversion constant={}'.format(self.MACHINE_UNIT_CONVERSION))
187189

188190
axes = self.INI.find("TRAJ", "COORDINATES")
@@ -735,6 +737,10 @@ def convert_units_9(self, v):
735737
c = self.MACHINE_UNIT_CONVERSION_9
736738
return list(map(lambda x, y: x * y, v, c))
737739

740+
def convert_units_10(self, v):
741+
c = self.MACHINE_UNIT_CONVERSION_10
742+
return list(map(lambda x, y: x * y, v, c))
743+
738744
# This finds the filter program's initializing
739745
# program eg python for .py from INI
740746
def get_filter_program(self, fname):

0 commit comments

Comments
 (0)