mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-06 05:11:36 +08:00
commander dummy node: set control velocity enabled flag
This commit is contained in:
@@ -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_altitude_enabled = false;
|
||||||
msg_vehicle_control_mode.flag_control_climb_rate_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_position_enabled = false;
|
||||||
|
msg_vehicle_control_mode.flag_control_velocity_enabled = false;
|
||||||
|
|
||||||
break;
|
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_altitude_enabled = true;
|
||||||
msg_vehicle_control_mode.flag_control_climb_rate_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_position_enabled = true;
|
||||||
|
msg_vehicle_control_mode.flag_control_velocity_enabled = true;
|
||||||
} else {
|
} else {
|
||||||
msg_vehicle_status.main_state = msg_vehicle_status.MAIN_STATE_ALTCTL;
|
msg_vehicle_status.main_state = msg_vehicle_status.MAIN_STATE_ALTCTL;
|
||||||
msg_vehicle_status.nav_state = msg_vehicle_status.NAVIGATION_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_altitude_enabled = true;
|
||||||
msg_vehicle_control_mode.flag_control_climb_rate_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_position_enabled = false;
|
||||||
|
msg_vehicle_control_mode.flag_control_velocity_enabled = false;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user