mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-25 17:25:20 +03:00
Quaternion-based DCM IMU (original code my S.Madgwick)
Restore binaries from merge
This commit is contained in:
parent
846b86f489
commit
5df8ca926c
21 changed files with 379 additions and 738 deletions
|
@ -397,8 +397,8 @@ static void resetConf(void)
|
|||
|
||||
// global settings
|
||||
masterConfig.current_profile_index = 0; // default profile
|
||||
masterConfig.gyro_cmpf_factor = 600; // default MWC
|
||||
masterConfig.gyro_cmpfm_factor = 250; // default MWC
|
||||
masterConfig.dcm_kp = 10000; // 1.0 * 10000
|
||||
masterConfig.dcm_ki = 30; // 0.003 * 10000
|
||||
|
||||
resetAccelerometerTrims(&masterConfig.accZero);
|
||||
|
||||
|
@ -484,15 +484,14 @@ static void resetConf(void)
|
|||
resetRollAndPitchTrims(¤tProfile->accelerometerTrims);
|
||||
|
||||
currentProfile->mag_declination = 0;
|
||||
currentProfile->acc_lpf_factor = 4;
|
||||
currentProfile->acc_cut_hz = 15;
|
||||
currentProfile->accz_lpf_cutoff = 5.0f;
|
||||
currentProfile->accDeadband.xy = 40;
|
||||
currentProfile->accDeadband.z = 40;
|
||||
currentProfile->acc_unarmedcal = 1;
|
||||
|
||||
resetBarometerConfig(¤tProfile->barometerConfig);
|
||||
|
||||
currentProfile->acc_unarmedcal = 1;
|
||||
|
||||
// Radio
|
||||
parseRcChannels("AETR1234", &masterConfig.rxConfig);
|
||||
|
||||
|
@ -719,10 +718,10 @@ void activateConfig(void)
|
|||
&masterConfig.rxConfig
|
||||
);
|
||||
|
||||
imuRuntimeConfig.gyro_cmpf_factor = masterConfig.gyro_cmpf_factor;
|
||||
imuRuntimeConfig.gyro_cmpfm_factor = masterConfig.gyro_cmpfm_factor;
|
||||
imuRuntimeConfig.acc_lpf_factor = currentProfile->acc_lpf_factor;
|
||||
imuRuntimeConfig.acc_unarmedcal = currentProfile->acc_unarmedcal;;
|
||||
imuRuntimeConfig.dcm_kp = masterConfig.dcm_kp / 10000.0f;
|
||||
imuRuntimeConfig.dcm_ki = masterConfig.dcm_ki / 10000.0f;
|
||||
imuRuntimeConfig.acc_cut_hz = currentProfile->acc_cut_hz;
|
||||
imuRuntimeConfig.acc_unarmedcal = currentProfile->acc_unarmedcal;
|
||||
imuRuntimeConfig.small_angle = masterConfig.small_angle;
|
||||
|
||||
imuConfigure(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue