mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-25 17:53:34 +08:00
pwm_out multi-instance support
PX4 uses banks of 8 outputs as a logical structure. Boards that have more outputs than 8 get multiple instances. This is an arbitrary choice that helps with overall structure and enables the mixing of different device classes (like FMU, IO or UAVCAN).
This commit is contained in:
committed by
Lorenz Meier
parent
c1c0a62be5
commit
e7722b11eb
@@ -178,6 +178,8 @@ public:
|
||||
|
||||
void setIgnoreLockdown(bool ignore_lockdown) { _ignore_lockdown = ignore_lockdown; }
|
||||
|
||||
void setMaxNumOutputs(uint8_t max_num_outputs) { _max_num_outputs = max_num_outputs; }
|
||||
|
||||
protected:
|
||||
void updateParams() override;
|
||||
|
||||
@@ -261,7 +263,7 @@ private:
|
||||
|
||||
bool _wq_switched{false};
|
||||
uint8_t _driver_instance{0}; ///< for boards that supports multiple outputs (e.g. PX4IO + FMU)
|
||||
const uint8_t _max_num_outputs;
|
||||
uint8_t _max_num_outputs;
|
||||
|
||||
struct MotorTest {
|
||||
uORB::Subscription test_motor_sub{ORB_ID(test_motor)};
|
||||
|
||||
Reference in New Issue
Block a user