mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-24 14:03:34 +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:
@@ -112,7 +112,7 @@ extern "C" __EXPORT int bmp280_main(int argc, char *argv[]);
|
||||
|
||||
BMP280::BMP280(bmp280::IBMP280 *interface, const char *path) :
|
||||
CDev(path),
|
||||
ScheduledWorkItem(px4::device_bus_to_wq(interface->get_device_id())),
|
||||
ScheduledWorkItem(MODULE_NAME, px4::device_bus_to_wq(interface->get_device_id())),
|
||||
_interface(interface),
|
||||
_running(false),
|
||||
_report_interval(0),
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
|
||||
LPS22HB::LPS22HB(device::Device *interface, const char *path) :
|
||||
CDev(path),
|
||||
ScheduledWorkItem(px4::device_bus_to_wq(interface->get_device_id())),
|
||||
ScheduledWorkItem(MODULE_NAME, px4::device_bus_to_wq(interface->get_device_id())),
|
||||
_interface(interface),
|
||||
_sample_perf(perf_alloc(PC_ELAPSED, "lps22hb_read")),
|
||||
_comms_errors(perf_alloc(PC_COUNT, "lps22hb_comms_errors"))
|
||||
|
||||
@@ -261,7 +261,7 @@ extern "C" __EXPORT int lps25h_main(int argc, char *argv[]);
|
||||
|
||||
LPS25H::LPS25H(device::Device *interface, const char *path) :
|
||||
CDev(path),
|
||||
ScheduledWorkItem(px4::device_bus_to_wq(interface->get_device_id())),
|
||||
ScheduledWorkItem(MODULE_NAME, px4::device_bus_to_wq(interface->get_device_id())),
|
||||
_interface(interface),
|
||||
_sample_perf(perf_alloc(PC_ELAPSED, "lps25h_read")),
|
||||
_comms_errors(perf_alloc(PC_COUNT, "lps25h_comms_errors"))
|
||||
|
||||
@@ -148,7 +148,7 @@ extern "C" __EXPORT int mpl3115a2_main(int argc, char *argv[]);
|
||||
|
||||
MPL3115A2::MPL3115A2(device::Device *interface, const char *path) :
|
||||
CDev(path),
|
||||
ScheduledWorkItem(px4::device_bus_to_wq(interface->get_device_id())),
|
||||
ScheduledWorkItem(MODULE_NAME, px4::device_bus_to_wq(interface->get_device_id())),
|
||||
_interface(interface),
|
||||
_measure_interval(0),
|
||||
_reports(nullptr),
|
||||
|
||||
@@ -183,7 +183,7 @@ extern "C" __EXPORT int ms5611_main(int argc, char *argv[]);
|
||||
MS5611::MS5611(device::Device *interface, ms5611::prom_u &prom_buf, const char *path,
|
||||
enum MS56XX_DEVICE_TYPES device_type) :
|
||||
CDev(path),
|
||||
ScheduledWorkItem(px4::device_bus_to_wq(interface->get_device_id())),
|
||||
ScheduledWorkItem(MODULE_NAME, px4::device_bus_to_wq(interface->get_device_id())),
|
||||
_interface(interface),
|
||||
_prom(prom_buf.s),
|
||||
_reports(nullptr),
|
||||
|
||||
Reference in New Issue
Block a user