1
0
Fork 0
mirror of https://github.com/iNavFlight/inav.git synced 2025-07-23 16:25:26 +03:00

Fix to acc parameter group reset

This commit is contained in:
Martin Budden 2017-01-04 11:09:10 +00:00
parent 1a58b1d4fd
commit dd4d137fbc
3 changed files with 6 additions and 19 deletions

View file

@ -68,7 +68,7 @@ static uint16_t calibratingA = 0; // the calibration is done is the main lo
static biquadFilter_t accFilter[XYZ_AXIS_COUNT];
PG_REGISTER_PROFILE_WITH_RESET_FN(accelerometerConfig_t, accelerometerConfig, PG_ACCELEROMETER_CONFIG, 0);
PG_REGISTER_WITH_RESET_FN(accelerometerConfig_t, accelerometerConfig, PG_ACCELEROMETER_CONFIG, 0);
void pgResetFn_accelerometerConfig(accelerometerConfig_t *instance)
{
@ -83,11 +83,12 @@ void pgResetFn_accelerometerConfig(accelerometerConfig_t *instance)
.raw[Z] = 0
);
RESET_CONFIG_2(flightDynamicsTrims_t, &instance->accGain,
.raw[X] = 0,
.raw[Y] = 0,
.raw[Z] = 0
.raw[X] = 4096,
.raw[Y] = 4096,
.raw[Z] = 4096
);
}
static bool accDetect(accDev_t *dev, accelerationSensor_e accHardwareToUse)
{
accelerationSensor_e accHardware = ACC_NONE;