mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-16 21:05:35 +03:00
Added debug output for gyro calibraton noise, increased 'moron_threshold' to 48.
This commit is contained in:
parent
322ae59051
commit
a91ff6838f
2 changed files with 6 additions and 1 deletions
|
@ -627,7 +627,7 @@ void createDefaultConfig(master_t *config)
|
||||||
config->boardAlignment.yawDegrees = 0;
|
config->boardAlignment.yawDegrees = 0;
|
||||||
config->accelerometerConfig.acc_hardware = ACC_DEFAULT; // default/autodetect
|
config->accelerometerConfig.acc_hardware = ACC_DEFAULT; // default/autodetect
|
||||||
config->rcControlsConfig.yaw_control_direction = 1;
|
config->rcControlsConfig.yaw_control_direction = 1;
|
||||||
config->gyroConfig.gyroMovementCalibrationThreshold = 32;
|
config->gyroConfig.gyroMovementCalibrationThreshold = 48;
|
||||||
|
|
||||||
// xxx_hardware: 0:default/autodetect, 1: disable
|
// xxx_hardware: 0:default/autodetect, 1: disable
|
||||||
config->compassConfig.mag_hardware = 1;
|
config->compassConfig.mag_hardware = 1;
|
||||||
|
|
|
@ -79,6 +79,8 @@ static void *notchFilter1[3];
|
||||||
static filterApplyFnPtr notchFilter2ApplyFn;
|
static filterApplyFnPtr notchFilter2ApplyFn;
|
||||||
static void *notchFilter2[3];
|
static void *notchFilter2[3];
|
||||||
|
|
||||||
|
#define DEBUG_GYRO_CALIBRATION 3
|
||||||
|
|
||||||
static const extiConfig_t *selectMPUIntExtiConfig(void)
|
static const extiConfig_t *selectMPUIntExtiConfig(void)
|
||||||
{
|
{
|
||||||
#if defined(MPU_INT_EXTI)
|
#if defined(MPU_INT_EXTI)
|
||||||
|
@ -367,6 +369,9 @@ static void performGyroCalibration(uint8_t gyroMovementCalibrationThreshold)
|
||||||
|
|
||||||
if (isOnFinalGyroCalibrationCycle()) {
|
if (isOnFinalGyroCalibrationCycle()) {
|
||||||
float dev = devStandardDeviation(&var[axis]);
|
float dev = devStandardDeviation(&var[axis]);
|
||||||
|
|
||||||
|
DEBUG_SET(DEBUG_GYRO, DEBUG_GYRO_CALIBRATION, lrintf(dev));
|
||||||
|
|
||||||
// check deviation and startover in case the model was moved
|
// check deviation and startover in case the model was moved
|
||||||
if (gyroMovementCalibrationThreshold && dev > gyroMovementCalibrationThreshold) {
|
if (gyroMovementCalibrationThreshold && dev > gyroMovementCalibrationThreshold) {
|
||||||
gyroSetCalibrationCycles();
|
gyroSetCalibrationCycles();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue