mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-31 20:38:27 +08:00
fix downlink, only send ahrs_timeout_counter if imu is used as well as ahrs
This commit is contained in:
@@ -95,7 +95,7 @@
|
||||
|
||||
#ifdef USE_INFRARED
|
||||
#define PERIODIC_SEND_STATE_FILTER_STATUS(_chan) { uint16_t contrast = abs(infrared.roll) + abs(infrared.pitch) + abs(infrared.top); uint8_t mde = 3; if (contrast < 50) mde = 7; DOWNLINK_SEND_STATE_FILTER_STATUS(_chan, &mde, &contrast); }
|
||||
#elif defined USE_AHRS
|
||||
#elif defined USE_IMU && defined USE_AHRS
|
||||
#define PERIODIC_SEND_STATE_FILTER_STATUS(_chan) { uint8_t mde = 3; if (ahrs.status == AHRS_UNINIT) mde = 2; if (ahrs_timeout_counter > 10) mde = 5; uint16_t val = 0; DOWNLINK_SEND_STATE_FILTER_STATUS(_chan, &mde, &val); }
|
||||
#else
|
||||
#define PERIODIC_SEND_STATE_FILTER_STATUS(_chan) {}
|
||||
|
||||
Reference in New Issue
Block a user