RC Failsafe fix for RFD 868+/900 Modems

RC Failsafe isn't triggered when PPM signal is valid. These changes
update Failsafe trigger logic for RC input. RF Modules keep sending
valid PPM signal when the RC Transmitter is lost.
RF Modules which are in the air send PPM signal with same type when lost
the signal from ground.
This commit is contained in:
bozkurthan
2019-08-01 09:53:47 +03:00
committed by Beat Küng
parent a570aa9fac
commit 3f16eba3f7
+17
View File
@@ -351,6 +351,23 @@ RCUpdate::Run()
/* signal is lost or no enough channels */
signal_lost = true;
//This problem occurs at RC controllers which are use PPM signal on RFD 868+/900 Modems (Maybe it can be also related another types)
} else if (rc_input.channel_count ==
16) { // check failsafe by channel values to detect RC loss (This statement is specific for only RF modules that still sending valid PPM signal when RC loss from ground RF)
for (unsigned int i = 0; i < 16; i++) {
if (i < 12 && rc_input.values[i] > 999 && rc_input.values[i] < 1005) {
signal_lost = true;
} else if (rc_input.values[i] == 0) {
signal_lost = true;
} else {
signal_lost = false;
break;
}
}
} else {
/* signal looks good */
signal_lost = false;