HAL_ChibiOS: display decoded RC protocol
This commit is contained in:
parent
d87bef16a2
commit
dbc05f787b
@ -26,6 +26,7 @@ extern AP_IOMCU iomcu;
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <AP_Math/AP_Math.h>
|
#include <AP_Math/AP_Math.h>
|
||||||
|
#include <GCS_MAVLink/GCS.h>
|
||||||
|
|
||||||
#define SIG_DETECT_TIMEOUT_US 500000
|
#define SIG_DETECT_TIMEOUT_US 500000
|
||||||
using namespace ChibiOS;
|
using namespace ChibiOS;
|
||||||
@ -132,6 +133,10 @@ void RCInput::_timer_tick(void)
|
|||||||
_rc_values[i] = rcin_prot.read(i);
|
_rc_values[i] = rcin_prot.read(i);
|
||||||
}
|
}
|
||||||
rcin_mutex.give();
|
rcin_mutex.give();
|
||||||
|
if (rcin_prot.protocol_name() != last_protocol) {
|
||||||
|
last_protocol = rcin_prot.protocol_name();
|
||||||
|
gcs().send_text(MAV_SEVERITY_DEBUG, "RCInput: decoding %s", last_protocol);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -62,6 +62,8 @@ private:
|
|||||||
int16_t _rssi = -1;
|
int16_t _rssi = -1;
|
||||||
uint32_t _rcin_timestamp_last_signal;
|
uint32_t _rcin_timestamp_last_signal;
|
||||||
bool _init;
|
bool _init;
|
||||||
|
const char *last_protocol;
|
||||||
|
|
||||||
#if HAL_RCINPUT_WITH_AP_RADIO
|
#if HAL_RCINPUT_WITH_AP_RADIO
|
||||||
bool _radio_init;
|
bool _radio_init;
|
||||||
AP_Radio *radio;
|
AP_Radio *radio;
|
||||||
|
Loading…
Reference in New Issue
Block a user