From a693bbaf19d784bf34373ee29b3d30a44bf04f00 Mon Sep 17 00:00:00 2001 From: Atin Malaviya Date: Fri, 4 Jul 2025 16:14:58 -0400 Subject: [PATCH 1/2] Reset new data available after reading it Without the reset, we don't notice if the radio is disconnected. --- src/rcl/RclGizmoIbus.h | 1 + src/rcl/ibus/IBus.h | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/src/rcl/RclGizmoIbus.h b/src/rcl/RclGizmoIbus.h index c5b7ecc9..5409e434 100644 --- a/src/rcl/RclGizmoIbus.h +++ b/src/rcl/RclGizmoIbus.h @@ -32,6 +32,7 @@ class RclGizmoIbus : public RclGizmo { for (uint8_t i=0; i Date: Fri, 4 Jul 2025 22:56:05 -0400 Subject: [PATCH 2/2] Added hack to check channels 9-12 for > 1500 for failsafe With the FS-i6 firmware from https://github.com/qba667/FlySkyI6, failsafe doesn't actually change channels 1-8, it continues sending the current values even on lost radio link. But channels 9-12 all become > 1500 when they are 1500 before losing radio link so hardcode checking channels 9-12 > 1500 for failsafe for radio link lost. Hopefully we are never in a situation where channel 9-12 are all > 1500 when radio link is lost... --- src/rcl/RclGizmoIbus.h | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/rcl/RclGizmoIbus.h b/src/rcl/RclGizmoIbus.h index 5409e434..029039f4 100644 --- a/src/rcl/RclGizmoIbus.h +++ b/src/rcl/RclGizmoIbus.h @@ -34,8 +34,18 @@ class RclGizmoIbus : public RclGizmo { } ibus.done_reading_data(); count++; - return true; } - return false; + + // !!HACK!! + // FlySky FS-i6 firmware (https://github.com/qba667/FlySkyI6) failsafe + // doesn't seem to actually change channels 1-6 even when set to + // failsafe. But channel 9-12 become > 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