mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
commander dummy node: set control velocity enabled flag
This commit is contained in:
parent
5237364a5a
commit
6dead1d576
@ -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;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user