Commander: add position slow mode

This commit is contained in:
Matthias Grob
2023-12-08 21:17:59 +01:00
parent dbbf585adb
commit ef0926d64b
11 changed files with 50 additions and 22 deletions
+4
View File
@@ -540,6 +540,10 @@
"name": "stab",
"description": "Stabilized"
},
"9": {
"name": "position_slow",
"description": "Position Slow"
},
"10": {
"name": "auto_takeoff",
"description": "Takeoff"
+3 -2
View File
@@ -51,6 +51,7 @@ static inline uint32_t getValidNavStates()
(1u << vehicle_status_s::NAVIGATION_STATE_AUTO_MISSION) |
(1u << vehicle_status_s::NAVIGATION_STATE_AUTO_LOITER) |
(1u << vehicle_status_s::NAVIGATION_STATE_AUTO_RTL) |
(1u << vehicle_status_s::NAVIGATION_STATE_POSITION_SLOW) |
(1u << vehicle_status_s::NAVIGATION_STATE_ACRO) |
(1u << vehicle_status_s::NAVIGATION_STATE_TERMINATION) |
(1u << vehicle_status_s::NAVIGATION_STATE_OFFBOARD) |
@@ -62,7 +63,7 @@ static inline uint32_t getValidNavStates()
(1u << vehicle_status_s::NAVIGATION_STATE_ORBIT) |
(1u << vehicle_status_s::NAVIGATION_STATE_AUTO_VTOL_TAKEOFF);
static_assert(vehicle_status_s::NAVIGATION_STATE_MAX == 31, "code requires update");
static_assert(vehicle_status_s::NAVIGATION_STATE_MAX == 31, "update valid nav states");
}
const char *const nav_state_names[vehicle_status_s::NAVIGATION_STATE_MAX] = {
@@ -72,7 +73,7 @@ const char *const nav_state_names[vehicle_status_s::NAVIGATION_STATE_MAX] = {
"Mission",
"Hold",
"Return",
"6: unallocated",
"Position Slow",
"7: unallocated",
"8: unallocated",
"9: unallocated",