EEPROM-based calibration system with serial line interface #23
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Greets!
I've been using AHRS and love it, but for the need to recompile when calibrating.
I've created this patch which enables eeprom-based sensor calibration, and also provides a means to view and set calibration values using the serial line/terminal.
All the basic calibration values are supported, though I wanted some feedback before proceeding to implemented the extended magnetometer stuff (the system currently accommodates the values, it just doesn't support setting them through the serial line yet).
Here's a sample of my interaction with the IMU through the serial Monitor (comments in [brackets]):
[Example Serial Line interaction with EEPROM calibration system]
ch [Show calibration help]
***** Calibration Help *****
All commands prefixed with '#c' followed by:
* get or set [g/s]
* accel, magn, or gyro [a/m/g]
* coord: x,y, or z [x/y/z]
For accel and magnetometer:
* min or max [m/M]
Examples:
Get acceleration x max: #cgaxM
Set acceleration y min: #csaym -244.00
Set gyro z: #csgz -39.9
Current calibration values may be dumped with #cd or #cD (includes calculated values)
cd [Dump calibration values]
*** Current Calibration ***
x: min: -260.000
max: 257.000
y: min: -250.000
max: 266.000
z: min: -284.000
max: 240.000
x: min: -531.000
max: 700.000
y: min: -476.000
max: 436.000
z: min: -590.000
max: 320.000
x: -39.350
y: -3.580
z: 29.140
csgz 28.666 [Set gyro z value to 28.666]
cd [Calibration values dump]
*** Current Calibration ***
x: min: -260.000
max: 257.000
y: min: -250.000
max: 266.000
z: min: -284.000
max: 240.000
x: min: -531.000
max: 700.000
y: min: -476.000
max: 436.000
z: min: -590.000
max: 320.000
x: -39.350
y: -3.580
z: 28.666
[success!]
Please let me know what you think and if there's anything you'd need to get this pushed onto the main trunk.
Regards,
Pat Deegan http://flyingcarsandstuff.com