Merge pull request #2096 from mikeller/add_gyro_calibration_debug
Added debug output for gyro calibraton noise, increased 'moron_threshold' to 48.
This commit is contained in:
commit
7a9b30cc7b
|
@ -627,7 +627,7 @@ void createDefaultConfig(master_t *config)
|
|||
config->boardAlignment.yawDegrees = 0;
|
||||
config->accelerometerConfig.acc_hardware = ACC_DEFAULT; // default/autodetect
|
||||
config->rcControlsConfig.yaw_control_direction = 1;
|
||||
config->gyroConfig.gyroMovementCalibrationThreshold = 32;
|
||||
config->gyroConfig.gyroMovementCalibrationThreshold = 48;
|
||||
|
||||
// xxx_hardware: 0:default/autodetect, 1: disable
|
||||
config->compassConfig.mag_hardware = 1;
|
||||
|
|
|
@ -79,6 +79,8 @@ static void *notchFilter1[3];
|
|||
static filterApplyFnPtr notchFilter2ApplyFn;
|
||||
static void *notchFilter2[3];
|
||||
|
||||
#define DEBUG_GYRO_CALIBRATION 3
|
||||
|
||||
static const extiConfig_t *selectMPUIntExtiConfig(void)
|
||||
{
|
||||
#if defined(MPU_INT_EXTI)
|
||||
|
@ -367,6 +369,9 @@ static void performGyroCalibration(uint8_t gyroMovementCalibrationThreshold)
|
|||
|
||||
if (isOnFinalGyroCalibrationCycle()) {
|
||||
float dev = devStandardDeviation(&var[axis]);
|
||||
|
||||
DEBUG_SET(DEBUG_GYRO, DEBUG_GYRO_CALIBRATION, lrintf(dev));
|
||||
|
||||
// check deviation and startover in case the model was moved
|
||||
if (gyroMovementCalibrationThreshold && dev > gyroMovementCalibrationThreshold) {
|
||||
gyroSetCalibrationCycles();
|
||||
|
|
Loading…
Reference in New Issue