Skip to content

Conversation

@bigjosh
Copy link

@bigjosh bigjosh commented Jan 29, 2025

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.

josh added 4 commits January 27, 2025 00:11
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.
@LowPowerLab
Copy link
Owner

I don't see compiler warnings, so not sure what that one is about.
I could merge the ! command changes but not everything else in this pull.

Serial.println("AUTOOFF_DEFAULT");

TOUCH_DEBUG_ENABLED = false;
Serial.println("TOUCH_DEBUG_DISABLED");
Copy link
Owner

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");
Copy link
Owner

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.

Copy link
Owner

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.

Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants