mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-23 04: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:
@@ -58,7 +58,7 @@
|
||||
|
||||
Airspeed::Airspeed(int bus, int address, unsigned conversion_interval, const char *path) :
|
||||
I2C("Airspeed", path, bus, address, 100000),
|
||||
ScheduledWorkItem(px4::device_bus_to_wq(get_device_id())),
|
||||
ScheduledWorkItem(MODULE_NAME, px4::device_bus_to_wq(get_device_id())),
|
||||
_sensor_ok(false),
|
||||
_measure_interval(0),
|
||||
_collect_phase(false),
|
||||
|
||||
@@ -32,4 +32,3 @@
|
||||
############################################################################
|
||||
|
||||
px4_add_library(mixer_module mixer_module.cpp)
|
||||
|
||||
|
||||
@@ -524,4 +524,3 @@ int MixingOutput::loadMixerThreadSafe(const char *buf, unsigned len)
|
||||
|
||||
return _command.result;
|
||||
}
|
||||
|
||||
|
||||
@@ -61,8 +61,8 @@ class OutputModuleInterface : public px4::ScheduledWorkItem, public ModuleParams
|
||||
public:
|
||||
static constexpr int MAX_ACTUATORS = DIRECT_PWM_OUTPUT_CHANNELS;
|
||||
|
||||
OutputModuleInterface(const px4::wq_config_t &config)
|
||||
: px4::ScheduledWorkItem(config), ModuleParams(nullptr) {}
|
||||
OutputModuleInterface(const char *name, const px4::wq_config_t &config)
|
||||
: px4::ScheduledWorkItem(name, config), ModuleParams(nullptr) {}
|
||||
|
||||
virtual void updateOutputs(bool stop_motors, uint16_t outputs[MAX_ACTUATORS],
|
||||
unsigned num_outputs, unsigned num_control_groups_updated) = 0;
|
||||
@@ -239,4 +239,3 @@ private:
|
||||
|
||||
)
|
||||
};
|
||||
|
||||
|
||||
@@ -77,4 +77,3 @@ __EXPORT void output_limit_calc(const bool armed, const bool pre_armed, const un
|
||||
const float *output, uint16_t *effective_output, output_limit_t *limit);
|
||||
|
||||
__END_DECLS
|
||||
|
||||
|
||||
Reference in New Issue
Block a user