mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-28 00:43: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:
@@ -256,7 +256,7 @@ extern "C" __EXPORT int blinkm_main(int argc, char *argv[]);
|
||||
|
||||
BlinkM::BlinkM(int bus, int blinkm) :
|
||||
I2C("blinkm", BLINKM0_DEVICE_PATH, bus, blinkm, 100000),
|
||||
ScheduledWorkItem(px4::device_bus_to_wq(get_device_id())),
|
||||
ScheduledWorkItem(MODULE_NAME, px4::device_bus_to_wq(get_device_id())),
|
||||
led_color_1(LED_OFF),
|
||||
led_color_2(LED_OFF),
|
||||
led_color_3(LED_OFF),
|
||||
|
||||
@@ -105,7 +105,7 @@ extern "C" __EXPORT int rgbled_main(int argc, char *argv[]);
|
||||
|
||||
RGBLED::RGBLED(int bus, int rgbled) :
|
||||
I2C("rgbled", RGBLED0_DEVICE_PATH, bus, rgbled, 100000),
|
||||
ScheduledWorkItem(px4::device_bus_to_wq(get_device_id()))
|
||||
ScheduledWorkItem(MODULE_NAME, px4::device_bus_to_wq(get_device_id()))
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -105,7 +105,7 @@ extern "C" __EXPORT int rgbled_ncp5623c_main(int argc, char *argv[]);
|
||||
|
||||
RGBLED_NPC5623C::RGBLED_NPC5623C(int bus, int rgbled) :
|
||||
I2C("rgbled1", RGBLED1_DEVICE_PATH, bus, rgbled, 100000),
|
||||
ScheduledWorkItem(px4::device_bus_to_wq(get_device_id()))
|
||||
ScheduledWorkItem(MODULE_NAME, px4::device_bus_to_wq(get_device_id()))
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -88,7 +88,7 @@ RGBLED_PWM *g_rgbled = nullptr;
|
||||
|
||||
RGBLED_PWM::RGBLED_PWM() :
|
||||
CDev("rgbled_pwm", RGBLED_PWM0_DEVICE_PATH),
|
||||
ScheduledWorkItem(px4::wq_configurations::lp_default)
|
||||
ScheduledWorkItem(MODULE_NAME, px4::wq_configurations::lp_default)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user