mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-15 14:40:35 +08:00
px4_work_queue: command line status output and shutdown empty queues
* adds a work_queue systemcmd that will bring a tree view of all active work queues and work items * WorkQueues now track attached WorkItems and will shutdown when the last WorkItem is detached
This commit is contained in:
@@ -37,9 +37,8 @@ extern "C" __EXPORT int fw_pos_control_l1_main(int argc, char *argv[]);
|
||||
|
||||
FixedwingPositionControl::FixedwingPositionControl() :
|
||||
ModuleParams(nullptr),
|
||||
WorkItem(px4::wq_configurations::att_pos_ctrl),
|
||||
WorkItem(MODULE_NAME, px4::wq_configurations::att_pos_ctrl),
|
||||
_loop_perf(perf_alloc(PC_ELAPSED, "fw_pos_control_l1: cycle")),
|
||||
_loop_interval_perf(perf_alloc(PC_INTERVAL, "fw_pos_control_l1: interval")),
|
||||
_launchDetector(this),
|
||||
_runway_takeoff(this)
|
||||
{
|
||||
@@ -114,7 +113,6 @@ FixedwingPositionControl::FixedwingPositionControl() :
|
||||
FixedwingPositionControl::~FixedwingPositionControl()
|
||||
{
|
||||
perf_free(_loop_perf);
|
||||
perf_free(_loop_interval_perf);
|
||||
}
|
||||
|
||||
bool
|
||||
@@ -1657,7 +1655,6 @@ FixedwingPositionControl::Run()
|
||||
}
|
||||
|
||||
perf_begin(_loop_perf);
|
||||
perf_count(_loop_interval_perf);
|
||||
|
||||
/* only run controller if position changed */
|
||||
if (_global_pos_sub.update(&_global_pos)) {
|
||||
@@ -1990,7 +1987,6 @@ int FixedwingPositionControl::print_status()
|
||||
PX4_INFO("Running");
|
||||
|
||||
perf_print_counter(_loop_perf);
|
||||
perf_print_counter(_loop_interval_perf);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user