Assume armed is true if armed channel is not defined

This commit is contained in:
Oleg Kalachev 2025-02-12 10:15:42 +03:00
parent 083db659c6
commit 6ed6ef3e8c

View File

@ -72,7 +72,8 @@ void control() {
} }
void interpretRC() { void interpretRC() {
armed = controls[throttleChannel] >= 0.05 && controls[armedChannel] >= 0.5; armed = controls[throttleChannel] >= 0.05 &&
(controls[armedChannel] >= 0.5 || isnan(controls[armedChannel])); // assume armed if armed channel is not defined
// NOTE: put ACRO or MANUAL modes there if you want to use them // NOTE: put ACRO or MANUAL modes there if you want to use them
if (controls[modeChannel] < 0.25) { if (controls[modeChannel] < 0.25) {