mirror of
https://github.com/okalachev/flix.git
synced 2026-01-10 13:06:56 +00:00
Simplify mode index check in set_mode
This commit is contained in:
@@ -232,7 +232,7 @@ void handleMavlink(const void *_msg) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (m.command == MAV_CMD_DO_SET_MODE) {
|
if (m.command == MAV_CMD_DO_SET_MODE) {
|
||||||
if (!(m.param2 >= 0 && m.param2 <= AUTO)) return; // incorrect mode
|
if (m.param2 < 0 || m.param2 > AUTO) return; // incorrect mode
|
||||||
accepted = true;
|
accepted = true;
|
||||||
mode = m.param2;
|
mode = m.param2;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user