diff --git a/src/rcl/RclGizmoIbus.h b/src/rcl/RclGizmoIbus.h index c5b7ecc9..029039f4 100644 --- a/src/rcl/RclGizmoIbus.h +++ b/src/rcl/RclGizmoIbus.h @@ -32,9 +32,20 @@ class RclGizmoIbus : public RclGizmo { for (uint8_t i=0; i 1500 when they are 1500 if unused and + // we lost radio link. Just hardcode that and hope no one will ever be in a + // situation where all these are > 1500 except on losing radio link in failsafe! + // !!HACK!! + if (pwm[9] > 1500 && pwm[10] > 1500 && pwm[11] >1500 && pwm[12] > 1500) { + return false; + } + return true; } }; \ No newline at end of file diff --git a/src/rcl/ibus/IBus.h b/src/rcl/ibus/IBus.h index 407e4c47..65a8b56d 100644 --- a/src/rcl/ibus/IBus.h +++ b/src/rcl/ibus/IBus.h @@ -150,6 +150,11 @@ class IBus { */ bool has_new_data() const; + /** + * @brief Reset new data available after read is complete + */ + void done_reading_data() { m_data_available_flag = false; } + /** * @brief Get communication statistics *