aboutsummaryrefslogtreecommitdiff
path: root/src/modules/commander/commander.cpp
diff options
context:
space:
mode:
authorAnton Babushkin <anton.babushkin@me.com>2013-12-30 14:04:24 +0400
committerAnton Babushkin <anton.babushkin@me.com>2013-12-30 14:04:24 +0400
commit33385a783cec5045a910e4890fa8c8f4b2fc7641 (patch)
tree6b23d34e7daf390a30b837e3572654ca4780b727 /src/modules/commander/commander.cpp
parentfa20fae6fb627d19d9f3951e75058eb85ab8a10a (diff)
downloadpx4-firmware-33385a783cec5045a910e4890fa8c8f4b2fc7641.tar.gz
px4-firmware-33385a783cec5045a910e4890fa8c8f4b2fc7641.tar.bz2
px4-firmware-33385a783cec5045a910e4890fa8c8f4b2fc7641.zip
Added NONE = not mapped state for mission and return switches
Diffstat (limited to 'src/modules/commander/commander.cpp')
-rw-r--r--src/modules/commander/commander.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/modules/commander/commander.cpp b/src/modules/commander/commander.cpp
index 98979df3e..03d3c02d1 100644
--- a/src/modules/commander/commander.cpp
+++ b/src/modules/commander/commander.cpp
@@ -1392,7 +1392,7 @@ check_mode_switches(struct manual_control_setpoint_s *sp_man, struct vehicle_sta
current_status->mode_switch = MODE_SWITCH_ASSISTED;
}
- /* land switch */
+ /* return switch */
if (!isfinite(sp_man->return_switch)) {
current_status->return_switch = RETURN_SWITCH_NONE;
@@ -1400,7 +1400,7 @@ check_mode_switches(struct manual_control_setpoint_s *sp_man, struct vehicle_sta
current_status->return_switch = RETURN_SWITCH_RETURN;
} else {
- current_status->return_switch = RETURN_SWITCH_NONE;
+ current_status->return_switch = RETURN_SWITCH_NORMAL;
}
/* assisted switch */
@@ -1416,10 +1416,10 @@ check_mode_switches(struct manual_control_setpoint_s *sp_man, struct vehicle_sta
/* mission switch */
if (!isfinite(sp_man->mission_switch)) {
- current_status->mission_switch = MISSION_SWITCH_MISSION;
+ current_status->mission_switch = MISSION_SWITCH_NONE;
} else if (sp_man->mission_switch > STICK_ON_OFF_LIMIT) {
- current_status->mission_switch = MISSION_SWITCH_NONE;
+ current_status->mission_switch = MISSION_SWITCH_LOITER;
} else {
current_status->mission_switch = MISSION_SWITCH_MISSION;