Skip to content

Commit

Permalink
Merge pull request #753 from MaslowCNC/look-into-issue-750
Browse files Browse the repository at this point in the history
Add in the missing propWeightZ setting
  • Loading branch information
MaslowCommunityGardenRobot authored Aug 15, 2018
2 parents fa3cb1b + f4f9692 commit 01c2836
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
9 changes: 8 additions & 1 deletion Settings/maslowSettings.py
Original file line number Diff line number Diff line change
Expand Up @@ -415,6 +415,13 @@
"key": "KdVZ",
"default": .28
},
{
"type": "string",
"title": "Proportional Weighting for Z-Axis",
"desc": "The ratio of Proportional on Error (1) to Proportional on Measure (0)",
"key": "propWeightZ",
"default": 1
},
{
"type": "options",
"title": "PWM frequency for motor control",
Expand Down Expand Up @@ -470,7 +477,7 @@
"default": ".45"
}
],
"Computed Settings": #These are setting calculated from the user inputs on other settings, they are not direclty seen by the user
"Computed Settings": #These are setting calculated from the user inputs on other settings, they are not directly seen by the user
[
{
"type": "string",
Expand Down
2 changes: 1 addition & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ def computeSettings(self, section, key, value):
value = maslowSettings.getDefaultValue('Advanced Settings', key)
self.config.set('Computed Settings', key + "Main", value)
#updated computed values for z-axis
for key in ('KpPosZ', 'KiPosZ', 'KdPosZ'):
for key in ('KpPosZ', 'KiPosZ', 'KdPosZ', 'propWeightZ'):
if int(self.config.get('Advanced Settings', 'enablePosPIDValues')) == 1:
value = float(self.config.get('Advanced Settings', key))
else:
Expand Down

0 comments on commit 01c2836

Please sign in to comment.