commander dummy node: set control velocity enabled flag

This commit is contained in:
Thomas Gubler 2015-01-29 14:09:25 +01:00
parent 5237364a5a
commit 6dead1d576
1 changed files with 3 additions and 0 deletions

View File

@ -119,6 +119,7 @@ void Commander::EvalSwitches(const px4::manual_control_setpointConstPtr &msg,
msg_vehicle_control_mode.flag_control_altitude_enabled = false;
msg_vehicle_control_mode.flag_control_climb_rate_enabled = false;
msg_vehicle_control_mode.flag_control_position_enabled = false;
msg_vehicle_control_mode.flag_control_velocity_enabled = false;
break;
@ -132,6 +133,7 @@ void Commander::EvalSwitches(const px4::manual_control_setpointConstPtr &msg,
msg_vehicle_control_mode.flag_control_altitude_enabled = true;
msg_vehicle_control_mode.flag_control_climb_rate_enabled = true;
msg_vehicle_control_mode.flag_control_position_enabled = true;
msg_vehicle_control_mode.flag_control_velocity_enabled = true;
} else {
msg_vehicle_status.main_state = msg_vehicle_status.MAIN_STATE_ALTCTL;
msg_vehicle_status.nav_state = msg_vehicle_status.NAVIGATION_STATE_ALTCTL;
@ -141,6 +143,7 @@ void Commander::EvalSwitches(const px4::manual_control_setpointConstPtr &msg,
msg_vehicle_control_mode.flag_control_altitude_enabled = true;
msg_vehicle_control_mode.flag_control_climb_rate_enabled = true;
msg_vehicle_control_mode.flag_control_position_enabled = false;
msg_vehicle_control_mode.flag_control_velocity_enabled = false;
}
break;
}