mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-25 06:53:34 +08:00
Separate message for trajectory setpoint
This commit is contained in:
+3
-3
@@ -38,14 +38,14 @@
|
||||
|
||||
using namespace matrix;
|
||||
|
||||
bool FlightTaskManualPositionSmoothVel::activate(const vehicle_local_position_setpoint_s &last_setpoint)
|
||||
bool FlightTaskManualPositionSmoothVel::activate(const trajectory_setpoint_s &last_setpoint)
|
||||
{
|
||||
bool ret = FlightTaskManualPosition::activate(last_setpoint);
|
||||
|
||||
// Check if the previous FlightTask provided setpoints
|
||||
Vector3f accel_prev{last_setpoint.acceleration};
|
||||
Vector3f vel_prev{last_setpoint.vx, last_setpoint.vy, last_setpoint.vz};
|
||||
Vector3f pos_prev{last_setpoint.x, last_setpoint.y, last_setpoint.z};
|
||||
Vector3f vel_prev{last_setpoint.velocity};
|
||||
Vector3f pos_prev{last_setpoint.position};
|
||||
|
||||
for (int i = 0; i < 3; i++) {
|
||||
// If the position setpoint is unknown, set to the current postion
|
||||
|
||||
+1
-1
@@ -53,7 +53,7 @@ public:
|
||||
|
||||
virtual ~FlightTaskManualPositionSmoothVel() = default;
|
||||
|
||||
bool activate(const vehicle_local_position_setpoint_s &last_setpoint) override;
|
||||
bool activate(const trajectory_setpoint_s &last_setpoint) override;
|
||||
void reActivate() override;
|
||||
|
||||
protected:
|
||||
|
||||
Reference in New Issue
Block a user