mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-25 13:43:34 +08:00
I2C/SPI require device type in constructor
This commit is contained in:
@@ -93,7 +93,6 @@
|
||||
|
||||
#define ADDR 0x40 // I2C adress
|
||||
|
||||
#define PCA9685_DEVICE_PATH "/dev/pca9685"
|
||||
#define PCA9685_PWMFREQ 60.0f
|
||||
#define PCA9685_NCHANS 16 // total amount of pwm outputs
|
||||
|
||||
@@ -179,11 +178,11 @@ private:
|
||||
};
|
||||
|
||||
PCA9685::PCA9685(I2CSPIBusOption bus_option, int bus, int bus_frequency) :
|
||||
I2C("pca9685", PCA9685_DEVICE_PATH, bus, ADDR, bus_frequency),
|
||||
I2C(DRV_PWM_DEVTYPE_PCA9685, MODULE_NAME, bus, ADDR, bus_frequency),
|
||||
I2CSPIDriver(MODULE_NAME, px4::device_bus_to_wq(get_device_id()), bus_option, bus),
|
||||
_mode(IOX_MODE_ON),
|
||||
_i2cpwm_interval(1_s / 60.0f),
|
||||
_comms_errors(perf_alloc(PC_COUNT, "pca9685_com_err")),
|
||||
_comms_errors(perf_alloc(PC_COUNT, MODULE_NAME": com_err")),
|
||||
_actuator_controls_sub(-1),
|
||||
_actuator_controls(),
|
||||
_mode_on_initialized(false)
|
||||
|
||||
Reference in New Issue
Block a user