Skip to content

armgit / flix

Public Imported from GitHub
0

Making an ESP32-based quadcopter from scratch

Don't arm by mavlink command if throttle is not low

Oleg Kalachevf9739dcd7ebc
diff --git a/flix/mavlink.ino b/flix/mavlink.ino
index 18b70af..1ac180b 100644
--- a/flix/mavlink.ino
+++ b/flix/mavlink.ino
@@ -226,6 +226,7 @@ void handleMavlink(const void *_msg) {
}
if (m.command == MAV_CMD_COMPONENT_ARM_DISARM) {
+ if (m.param1 && controlThrottle > 0.05) return; // don't arm if throttle is not low
accepted = true;
armed = m.param1 == 1;
}