Skip to content

armgit / flix

Public Imported from GitHub
0

Making an ESP32-based quadcopter from scratch

Assume armed is true if armed channel is not defined

Oleg Kalachev6ed6ef3e8c29
diff --git a/flix/control.ino b/flix/control.ino
index 8d7b55f..dd02bbb 100644
--- a/flix/control.ino
+++ b/flix/control.ino
@@ -72,7 +72,8 @@ void control() {
}
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
if (controls[modeChannel] < 0.25) {