mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-01 13:20:35 +08:00
FlightModeManager: publish takeoff status
This commit is contained in:
committed by
Lorenz Meier
parent
b30bd7f589
commit
fbd64fbdd8
@@ -577,6 +577,16 @@ void FlightModeManager::generateTrajectorySetpoint(const float dt,
|
||||
}
|
||||
|
||||
_old_landing_gear_position = landing_gear.landing_gear;
|
||||
|
||||
// Publish takeoff status
|
||||
takeoff_status_s takeoff_status;
|
||||
takeoff_status.takeoff_state = static_cast<uint8_t>(_takeoff.getTakeoffState());
|
||||
|
||||
if (takeoff_status.takeoff_state != _old_takeoff_state) {
|
||||
takeoff_status.timestamp = hrt_absolute_time();
|
||||
_takeoff_status_pub.publish(takeoff_status);
|
||||
_old_takeoff_state = takeoff_status.takeoff_state;
|
||||
}
|
||||
}
|
||||
|
||||
void FlightModeManager::limitAltitude(vehicle_local_position_setpoint_s &setpoint,
|
||||
|
||||
Reference in New Issue
Block a user