-
Notifications
You must be signed in to change notification settings - Fork 45
Add new USB command to reset settings to defaults, clean up compiler warnings #22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Best practice to do versioning inside git rather than leave a trail of old version. Also best practice to move artifacts to releases rather than keep them tracked inside the repo.
|
I don't see compiler warnings, so not sure what that one is about. |
| Serial.println("AUTOOFF_DEFAULT"); | ||
|
|
||
| TOUCH_DEBUG_ENABLED = false; | ||
| Serial.println("TOUCH_DEBUG_DISABLED"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is repeated on line 434-435.
|
|
||
| LOGGING_FORMAT=LOGGING_FORMAT_EXPONENT; | ||
| eeprom_LOGGINGFORMAT.write(LOGGING_FORMAT); | ||
| Serial.println("LOGGING_FORMAT_EXPONENT"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is repeated on lines 430-432.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is needed for older versions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is needed for older versions.
Adds a new USB interface command
!that resets all runtime settings to default variables. Does not change the calibration values.This makes automation much easier because can easily put the CurrentRanger into a known state. This makes it possible to, say, blindly send the string "!a34fu" and the CurrentRanger will reliably start streaming nanoamp values in the nanoamp format with BIAS disabled and LPF enabled. I do not think there is a way to do ths robustly with the previous firmware.
Also fixes up the three trivial compiler warnings by adding some parenthesis and adding a typecast.
Note that I have only updated the source code file and not the firmware image in this PR. Since these images are artifacts, I'd recommend moving them out of the repo entirely, and instead putting them into releases. LMK if you want more info on why this is the prefered approach or how to do it.