mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-25 01:05:27 +03:00
gyro sensors/debug: record standard deviation for roll *only*
* visibile in the DEBUG_GYRO_RAW[3]
This commit is contained in:
parent
f8ebdf06f1
commit
03b480a8ef
1 changed files with 5 additions and 2 deletions
|
@ -864,8 +864,11 @@ STATIC_UNIT_TESTED void performGyroCalibration(gyroSensor_t *gyroSensor, uint8_t
|
|||
|
||||
if (isOnFinalGyroCalibrationCycle(&gyroSensor->calibration)) {
|
||||
const float stddev = devStandardDeviation(&gyroSensor->calibration.var[axis]);
|
||||
// DEBUG_GYRO_CALIBRATION records per-axis standard deviation
|
||||
DEBUG_SET(DEBUG_GYRO_CALIBRATION, axis, lrintf(stddev));
|
||||
// DEBUG_GYRO_CALIBRATION records the standard deviation of roll
|
||||
// into the spare field - debug[3], in DEBUG_GYRO_RAW
|
||||
if (axis == X) {
|
||||
DEBUG_SET(DEBUG_GYRO_RAW, DEBUG_GYRO_CALIBRATION, lrintf(stddev));
|
||||
}
|
||||
|
||||
// check deviation and startover in case the model was moved
|
||||
if (gyroMovementCalibrationThreshold && stddev > gyroMovementCalibrationThreshold) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue