mirror of
https://github.com/iNavFlight/inav.git
synced 2025-07-25 01:05:21 +03:00
adjusted baro simulation
This commit is contained in:
parent
37b9bd41ab
commit
758407ec98
2 changed files with 2 additions and 0 deletions
|
@ -3472,6 +3472,7 @@ bool mspFCProcessInOutCommand(uint16_t cmdMSP, sbuf_t *dst, sbuf_t *src, mspResu
|
|||
gyro.gyroADCf[Z] = ((int16_t)sbufReadU16(src)) / 16.0f;
|
||||
|
||||
baro.baroPressure = sbufReadU32(src);
|
||||
baro.baroTemperature = 2500;
|
||||
}
|
||||
else {
|
||||
DISABLE_STATE(GPS_FIX);
|
||||
|
|
|
@ -323,6 +323,7 @@ uint32_t baroUpdate(void)
|
|||
baro.dev.start_ut(&baro.dev);
|
||||
}
|
||||
if (! ARMING_FLAG(SIMULATOR_MODE)) {
|
||||
//output: baro.baroPressure, baro.baroTemperature
|
||||
baro.dev.calculate(&baro.dev, &baro.baroPressure, &baro.baroTemperature);
|
||||
if (barometerConfig()->use_median_filtering) {
|
||||
baro.baroPressure = applyBarometerMedianFilter(baro.baroPressure);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue