mirror of
https://github.com/iNavFlight/inav.git
synced 2025-07-24 00:35:34 +03:00
fixed compilation error
This commit is contained in:
parent
f472fbeaf7
commit
ec4c2b69d3
1 changed files with 8 additions and 4 deletions
|
@ -3407,11 +3407,13 @@ bool mspFCProcessInOutCommand(uint16_t cmdMSP, sbuf_t *dst, sbuf_t *src, mspResu
|
|||
if (ARMING_FLAG(SIMULATOR_MODE)) { // just once
|
||||
DISABLE_ARMING_FLAG(SIMULATOR_MODE);
|
||||
|
||||
#ifdef USE_BARO
|
||||
baroStartCalibration();
|
||||
|
||||
#endif
|
||||
#ifdef USE_MAG
|
||||
DISABLE_STATE(COMPASS_CALIBRATED);
|
||||
compassInit();
|
||||
|
||||
#endif
|
||||
simulatorData.flags = 0;
|
||||
//review: many states were affected. reboot?
|
||||
|
||||
|
@ -3420,8 +3422,10 @@ bool mspFCProcessInOutCommand(uint16_t cmdMSP, sbuf_t *dst, sbuf_t *src, mspResu
|
|||
}
|
||||
else if (!areSensorsCalibrating()) {
|
||||
if (!ARMING_FLAG(SIMULATOR_MODE)) { // just once
|
||||
#ifdef USE_BARO
|
||||
baroStartCalibration();
|
||||
|
||||
#endif
|
||||
#ifdef USE_MAG
|
||||
if (compassConfig()->mag_hardware != 0){
|
||||
sensorsSet(SENSOR_MAG);
|
||||
ENABLE_STATE(COMPASS_CALIBRATED);
|
||||
|
@ -3430,7 +3434,7 @@ bool mspFCProcessInOutCommand(uint16_t cmdMSP, sbuf_t *dst, sbuf_t *src, mspResu
|
|||
mag.magADC[Y] = 0;
|
||||
mag.magADC[Z] = 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
ENABLE_ARMING_FLAG(SIMULATOR_MODE);
|
||||
LOG_D(SYSTEM, "Simulator enabled");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue