diff --git a/Settings/maslowSettings.py b/Settings/maslowSettings.py index 78253cc3..23f7b80a 100644 --- a/Settings/maslowSettings.py +++ b/Settings/maslowSettings.py @@ -207,14 +207,16 @@ "title": "Chain Tolerance, Left Chain", "desc": "The tolerance adjustment for the left chain length, in percent", "key": "leftChainTolerance", - "default": 0 + "default": 0, + "firmwareKey": 40 }, { "type": "string", "title": "Chain Tolerance, Right Chain", "desc": "The tolerance adjustment for the right chain length, in percent", "key": "rightChainTolerance", - "default": 0 + "default": 0, + "firmwareKey": 41 }, { "type": "options", @@ -576,16 +578,6 @@ "key": "fPWMComputed", "firmwareKey": 39 }, - { - "type": "string", - "key": "distPerRotLeftChainTolerance", - "firmwareKey": 40 - }, - { - "type": "string", - "key": "distPerRotRightChainTolerance", - "firmwareKey": 41 - } ], "Background Settings": [ diff --git a/main.py b/main.py index cda659d7..faf4046d 100755 --- a/main.py +++ b/main.py @@ -183,21 +183,6 @@ def computeSettings(self, section, key, value): distPerRot = float(self.config.get('Advanced Settings', 'gearTeeth')) * float(self.config.get('Advanced Settings', 'chainPitch')) self.config.set('Computed Settings', "distPerRot", str(distPerRot)) - if self.config.has_option('Advanced Settings', 'leftChainTolerance'): - distPerRotLeftChainTolerance = (1 + (float(self.config.get('Advanced Settings', 'leftChainTolerance')) / 100)) * float(self.config.get('Advanced Settings', 'gearTeeth')) * float(self.config.get('Advanced Settings', 'chainPitch')) - self.config.set('Computed Settings', "distPerRotLeftChainTolerance", str("{0:.5f}".format(distPerRotLeftChainTolerance))) - if self.config.has_option('Advanced Settings', 'rightChainTolerance'): - distPerRotRightChainTolerance = (1 + (float(self.config.get('Advanced Settings', 'rightChainTolerance')) / 100)) * float(self.config.get('Advanced Settings', 'gearTeeth')) * float(self.config.get('Advanced Settings', 'chainPitch')) - self.config.set('Computed Settings', "distPerRotRightChainTolerance", str("{0:.5f}".format(distPerRotRightChainTolerance))) - - elif key == 'leftChainTolerance' and self.config.has_option('Advanced Settings', 'leftChainTolerance') and self.config.has_option('Computed Settings', 'distPerRot'): - distPerRotLeftChainTolerance = (1 + (float(self.config.get('Advanced Settings', 'leftChainTolerance')) / 100)) * float(self.config.get('Computed Settings', 'distPerRot')) - self.config.set('Computed Settings', "distPerRotLeftChainTolerance", str("{0:.5f}".format(distPerRotLeftChainTolerance))) - - elif key == 'rightChainTolerance' and self.config.has_option('Advanced Settings', 'rightChainTolerance') and self.config.has_option('Computed Settings', 'distPerRot'): - distPerRotRightChainTolerance = (1 + (float(self.config.get('Advanced Settings', 'rightChainTolerance')) / 100)) * float(self.config.get('Computed Settings', 'distPerRot')) - self.config.set('Computed Settings', "distPerRotRightChainTolerance", str("{0:.5f}".format(distPerRotRightChainTolerance))) - elif key == 'enablePosPIDValues': for key in ('KpPos', 'KiPos', 'KdPos', 'propWeight'): if int(self.config.get('Advanced Settings', 'enablePosPIDValues')) == 1: