From 8f634f3410bee3e3bfc526b195466c98ecdb268d Mon Sep 17 00:00:00 2001 From: madgrizzle Date: Sat, 1 Sep 2018 12:05:09 -0400 Subject: [PATCH 1/2] Update for top beam tilt.. cross fingers --- Settings/maslowSettings.py | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/Settings/maslowSettings.py b/Settings/maslowSettings.py index 78253cc3..58980d97 100644 --- a/Settings/maslowSettings.py +++ b/Settings/maslowSettings.py @@ -1,7 +1,7 @@ ''' -This file provides a single dict which contains all of the details about the -various settings. It also has a number of helper functions for interacting +This file provides a single dict which contains all of the details about the +various settings. It also has a number of helper functions for interacting and using the data in this dict. ''' @@ -21,7 +21,7 @@ "desc": "A description of the setting", "key": "keyName", //this has to be a valid keyname "default": "default value", - "firmwareKey": 12 // if this is a setting in the firmware, this + "firmwareKey": 12 // if this is a setting in the firmware, this // is the integer value of that setting }, {...} @@ -317,6 +317,14 @@ "default": 0, "firmwareKey": 37 }, + { + "type": "string", + "title": "Top Beam Tilt (Experimental)", + "desc": "Experimental adjustment for top beam tilt in degrees\\ndefault setting: %s", + "key": "chainSagCorrection", + "default": 0, + "firmwareKey": 43 + }, { "type": "bool", "title": "Enable Custom Positional PID Values", @@ -608,7 +616,7 @@ def getJSONSettingSection(section): ''' - This generates a JSON string which is used to construct the Kivy config + This generates a JSON string which is used to construct the Kivy config panel ''' options = [] @@ -623,7 +631,7 @@ def getJSONSettingSection(section): def getDefaultValueSection(section): ''' - Returns a dict with the settings keys as the key and the default value + Returns a dict with the settings keys as the key and the default value of that setting as the value for the section specified ''' ret = {} @@ -676,10 +684,9 @@ def syncFirmwareKey(firmwareKey, value, data): def isClose(a, b, rel_tol=1e-06): ''' - Takes two values and returns true if values are close enough in value - such that the difference between them is less than the significant + Takes two values and returns true if values are close enough in value + such that the difference between them is less than the significant figure specified by rel_tol. Useful for comparing float values on arduino adapted from https://stackoverflow.com/a/33024979 ''' return abs(a-b) <= rel_tol * max(abs(a), abs(b)) - From 03052490c1c23fcec4bcf307a519ce0fdc35f970 Mon Sep 17 00:00:00 2001 From: madgrizzle Date: Sat, 1 Sep 2018 13:08:30 -0400 Subject: [PATCH 2/2] update --- Settings/maslowSettings.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Settings/maslowSettings.py b/Settings/maslowSettings.py index 58980d97..6907ab8f 100644 --- a/Settings/maslowSettings.py +++ b/Settings/maslowSettings.py @@ -321,7 +321,7 @@ "type": "string", "title": "Top Beam Tilt (Experimental)", "desc": "Experimental adjustment for top beam tilt in degrees\\ndefault setting: %s", - "key": "chainSagCorrection", + "key": "topBeamTilt", "default": 0, "firmwareKey": 43 },