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

pass gyro cal using array

This commit is contained in:
JuliooCesarMDM 2021-11-26 21:59:30 -03:00
parent c19290e1b3
commit bee6ac200a
5 changed files with 15 additions and 23 deletions

View file

@ -465,16 +465,13 @@ void setConfigBatteryProfileAndWriteEEPROM(uint8_t profileIndex)
beeperConfirmationBeeps(profileIndex + 1);
}
void setCalibrationGyroAndWriteEEPROM(void) { // fixes Test Unit compilation error
if (gyro.ok_to_save_cal) {
// save gyro calibration
gyroConfigMutable()->gyro_zero_cal[X] = gyro.getZero[X];
gyroConfigMutable()->gyro_zero_cal[Y] = gyro.getZero[Y];
gyroConfigMutable()->gyro_zero_cal[Z] = gyro.getZero[Z];
writeEEPROM();
readEEPROM();
gyro.ok_to_save_cal = false;
}
void setCalibrationGyroAndWriteEEPROM(int16_t getGyroZero[XYZ_AXIS_COUNT]) {
gyroConfigMutable()->gyro_zero_cal[X] = getGyroZero[X];
gyroConfigMutable()->gyro_zero_cal[Y] = getGyroZero[Y];
gyroConfigMutable()->gyro_zero_cal[Z] = getGyroZero[Z];
// save gyro calibration
writeEEPROM();
readEEPROM();
}
void beeperOffSet(uint32_t mask)