commander: don't use mode switch if it's not mapped

This commit is contained in:
Anton Babushkin
2014-04-06 20:04:18 +04:00
parent aa9ce7cd24
commit a4ba705e2f
+3
View File
@@ -1514,6 +1514,9 @@ set_main_state_rc(struct vehicle_status_s *status, struct manual_control_setpoin
switch (sp_man->mode_switch) {
case SWITCH_POS_NONE:
res = TRANSITION_NOT_CHANGED;
break;
case SWITCH_POS_OFF: // MANUAL
res = main_state_transition(status, MAIN_STATE_MANUAL);
// TRANSITION_DENIED is not possible here