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:
Daniel Agar
2019-10-02 12:23:17 -04:00
committed by GitHub
parent cc1d86bc0b
commit 26364d44c9
167 changed files with 582 additions and 274 deletions
@@ -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;
}