mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-25 01:13:38 +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:
@@ -54,10 +54,9 @@ const uint8_t BMI088_accel::_checked_registers[BMI088_ACCEL_NUM_CHECKED_REGISTER
|
||||
|
||||
BMI088_accel::BMI088_accel(int bus, const char *path_accel, uint32_t device, enum Rotation rotation) :
|
||||
BMI088("BMI088_ACCEL", path_accel, bus, device, SPIDEV_MODE3, BMI088_BUS_SPEED, rotation),
|
||||
ScheduledWorkItem(px4::device_bus_to_wq(get_device_id())),
|
||||
ScheduledWorkItem(MODULE_NAME, px4::device_bus_to_wq(get_device_id())),
|
||||
_px4_accel(get_device_id(), (external() ? ORB_PRIO_MAX - 1 : ORB_PRIO_HIGH - 1), rotation),
|
||||
_sample_perf(perf_alloc(PC_ELAPSED, "bmi088_accel_read")),
|
||||
_measure_interval(perf_alloc(PC_INTERVAL, "bmi088_accel_measure_interval")),
|
||||
_bad_transfers(perf_alloc(PC_COUNT, "bmi088_accel_bad_transfers")),
|
||||
_bad_registers(perf_alloc(PC_COUNT, "bmi088_accel_bad_registers")),
|
||||
_duplicates(perf_alloc(PC_COUNT, "bmi088_accel_duplicates")),
|
||||
@@ -73,7 +72,6 @@ BMI088_accel::~BMI088_accel()
|
||||
|
||||
/* delete the perf counter */
|
||||
perf_free(_sample_perf);
|
||||
perf_free(_measure_interval);
|
||||
perf_free(_bad_transfers);
|
||||
perf_free(_bad_registers);
|
||||
perf_free(_duplicates);
|
||||
@@ -398,8 +396,6 @@ BMI088_accel::check_registers(void)
|
||||
void
|
||||
BMI088_accel::measure()
|
||||
{
|
||||
perf_count(_measure_interval);
|
||||
|
||||
if (hrt_absolute_time() < _reset_wait) {
|
||||
// we're waiting for a reset to complete
|
||||
return;
|
||||
@@ -539,7 +535,6 @@ BMI088_accel::print_info()
|
||||
PX4_INFO("Accel");
|
||||
|
||||
perf_print_counter(_sample_perf);
|
||||
perf_print_counter(_measure_interval);
|
||||
perf_print_counter(_bad_transfers);
|
||||
perf_print_counter(_bad_registers);
|
||||
perf_print_counter(_duplicates);
|
||||
|
||||
Reference in New Issue
Block a user