@@ -175,18 +175,18 @@ def computeSettings(self, section, key, value):
175
175
176
176
if self .config .has_option ('Advanced Settings' , 'leftChainTolerance' ):
177
177
distPerRotLeftChainTolerance = (1 + (float (self .config .get ('Advanced Settings' , 'leftChainTolerance' )) / 100 )) * float (self .config .get ('Advanced Settings' , 'gearTeeth' )) * float (self .config .get ('Advanced Settings' , 'chainPitch' ))
178
- self .config .set ('Computed Settings' , "distPerRotLeftChainTolerance" , str (distPerRotLeftChainTolerance ))
178
+ self .config .set ('Computed Settings' , "distPerRotLeftChainTolerance" , str ("{0:.5f}" . format ( distPerRotLeftChainTolerance ) ))
179
179
if self .config .has_option ('Advanced Settings' , 'rightChainTolerance' ):
180
180
distPerRotRightChainTolerance = (1 + (float (self .config .get ('Advanced Settings' , 'rightChainTolerance' )) / 100 )) * float (self .config .get ('Advanced Settings' , 'gearTeeth' )) * float (self .config .get ('Advanced Settings' , 'chainPitch' ))
181
- self .config .set ('Computed Settings' , "distPerRotRightChainTolerance" , str (distPerRotRightChainTolerance ))
181
+ self .config .set ('Computed Settings' , "distPerRotRightChainTolerance" , str ("{0:.5f}" . format ( distPerRotRightChainTolerance ) ))
182
182
183
183
elif key == 'leftChainTolerance' and self .config .has_option ('Advanced Settings' , 'leftChainTolerance' ) and self .config .has_option ('Computed Settings' , 'distPerRot' ):
184
184
distPerRotLeftChainTolerance = (1 + (float (self .config .get ('Advanced Settings' , 'leftChainTolerance' )) / 100 )) * float (self .config .get ('Computed Settings' , 'distPerRot' ))
185
- self .config .set ('Computed Settings' , "distPerRotLeftChainTolerance" , str (distPerRotLeftChainTolerance ))
185
+ self .config .set ('Computed Settings' , "distPerRotLeftChainTolerance" , str ("{0:.5f}" . format ( distPerRotLeftChainTolerance ) ))
186
186
187
187
elif key == 'rightChainTolerance' and self .config .has_option ('Advanced Settings' , 'rightChainTolerance' ) and self .config .has_option ('Computed Settings' , 'distPerRot' ):
188
188
distPerRotRightChainTolerance = (1 + (float (self .config .get ('Advanced Settings' , 'rightChainTolerance' )) / 100 )) * float (self .config .get ('Computed Settings' , 'distPerRot' ))
189
- self .config .set ('Computed Settings' , "distPerRotRightChainTolerance" , str (distPerRotRightChainTolerance ))
189
+ self .config .set ('Computed Settings' , "distPerRotRightChainTolerance" , str ("{0:.5f}" . format ( distPerRotRightChainTolerance ) ))
190
190
191
191
elif key == 'enablePosPIDValues' :
192
192
for key in ('KpPos' , 'KiPos' , 'KdPos' , 'propWeight' ):
@@ -250,7 +250,7 @@ def configSettingChange(self, section, key, value):
250
250
value = 3
251
251
else :
252
252
value = 0
253
-
253
+
254
254
255
255
# Update Computed Settings
256
256
self .computeSettings (section , key , value )
0 commit comments