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
@@ -45,9 +45,8 @@ using namespace time_literals;
extern "C" __EXPORT int fw_att_control_main(int argc, char *argv[]);
FixedwingAttitudeControl::FixedwingAttitudeControl() :
WorkItem(px4::wq_configurations::att_pos_ctrl),
_loop_perf(perf_alloc(PC_ELAPSED, "fw_att_control: cycle")),
_loop_interval_perf(perf_alloc(PC_INTERVAL, "fw_att_control: interval"))
WorkItem(MODULE_NAME, px4::wq_configurations::att_pos_ctrl),
_loop_perf(perf_alloc(PC_ELAPSED, "fw_att_control: cycle"))
{
// check if VTOL first
vehicle_status_poll();
@@ -132,7 +131,6 @@ FixedwingAttitudeControl::FixedwingAttitudeControl() :
FixedwingAttitudeControl::~FixedwingAttitudeControl()
{
perf_free(_loop_perf);
perf_free(_loop_interval_perf);
}
bool
@@ -450,7 +448,6 @@ void FixedwingAttitudeControl::Run()
}
perf_begin(_loop_perf);
perf_count(_loop_interval_perf);
if (_att_sub.update(&_att)) {
@@ -922,7 +919,6 @@ int FixedwingAttitudeControl::print_status()
PX4_INFO("Running");
perf_print_counter(_loop_perf);
perf_print_counter(_loop_interval_perf);
return 0;
}