mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-26 01:33:56 -04:00
AP_HAL_ChibiOS: exclude more code based on HAL_WITH_IO_MCU
This commit is contained in:
parent
c0b0ae44d5
commit
0b127e0437
@ -176,11 +176,15 @@ void RCInput::_timer_tick(void)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if HAL_WITH_IO_MCU
|
||||||
uint32_t now = AP_HAL::millis();
|
uint32_t now = AP_HAL::millis();
|
||||||
const bool have_iocmu_rc = (_rcin_last_iomcu_ms != 0 && now - _rcin_last_iomcu_ms < 400);
|
const bool have_iocmu_rc = (_rcin_last_iomcu_ms != 0 && now - _rcin_last_iomcu_ms < 400);
|
||||||
if (!have_iocmu_rc) {
|
if (!have_iocmu_rc) {
|
||||||
_rcin_last_iomcu_ms = 0;
|
_rcin_last_iomcu_ms = 0;
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
const bool have_iocmu_rc = false;
|
||||||
|
#endif
|
||||||
|
|
||||||
if (rcprot.new_input() && !have_iocmu_rc) {
|
if (rcprot.new_input() && !have_iocmu_rc) {
|
||||||
WITH_SEMAPHORE(rcin_mutex);
|
WITH_SEMAPHORE(rcin_mutex);
|
||||||
|
@ -69,7 +69,9 @@ private:
|
|||||||
int16_t _rssi = -1;
|
int16_t _rssi = -1;
|
||||||
int16_t _rx_link_quality = -1;
|
int16_t _rx_link_quality = -1;
|
||||||
uint32_t _rcin_timestamp_last_signal;
|
uint32_t _rcin_timestamp_last_signal;
|
||||||
|
#if HAL_WITH_IO_MCU
|
||||||
uint32_t _rcin_last_iomcu_ms;
|
uint32_t _rcin_last_iomcu_ms;
|
||||||
|
#endif
|
||||||
bool _init;
|
bool _init;
|
||||||
const char *last_protocol;
|
const char *last_protocol;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user