mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-23 06:03: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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user