mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-02 20:11:36 +08:00
mc_pos_control: print active flight task for 'mc_pos_control status' cmd
This commit is contained in:
@@ -95,6 +95,9 @@ public:
|
|||||||
/** @see ModuleBase::run() */
|
/** @see ModuleBase::run() */
|
||||||
void run() override;
|
void run() override;
|
||||||
|
|
||||||
|
/** @see ModuleBase::print_status() */
|
||||||
|
int print_status() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
bool _in_smooth_takeoff = false; /**<true if takeoff ramp is applied */
|
bool _in_smooth_takeoff = false; /**<true if takeoff ramp is applied */
|
||||||
@@ -556,6 +559,17 @@ MulticopterPositionControl::set_vehicle_states(const float &vel_sp_z)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
MulticopterPositionControl::print_status()
|
||||||
|
{
|
||||||
|
if (_flight_tasks.isAnyTaskActive()) {
|
||||||
|
PX4_INFO("Running, active flight task: %i", _flight_tasks.getActiveTask());
|
||||||
|
} else {
|
||||||
|
PX4_INFO("Running, no flight task active");
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
MulticopterPositionControl::run()
|
MulticopterPositionControl::run()
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user