mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-17 04:53:34 +08:00
* Adds configurable I2C address for PCA9685 PWM driver Introduces a parameter to set the I2C address for the PCA9685 PWM output driver, enhancing flexibility for hardware variations. Updates documentation and board initialization scripts to support the new configuration and streamline device startup. * Update src/drivers/pca9685_pwm_out/module.yaml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update src/drivers/pca9685_pwm_out/module.yaml --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Jacob Dahl <37091262+dakejahl@users.noreply.github.com>
43 lines
849 B
Bash
43 lines
849 B
Bash
#!/bin/sh
|
|
#
|
|
# ARKPI6X specific board sensors init
|
|
#------------------------------------------------------------------------------
|
|
|
|
board_adc start
|
|
|
|
if param compare SENS_EN_INA226 1
|
|
then
|
|
# Start Digital power monitors
|
|
ina226 -I -b 3 -t 1 -k start
|
|
fi
|
|
|
|
if ver hwtypecmp ARKPI6X000
|
|
then
|
|
# Internal SPI bus ICM42688p with SPIX measured frequency of 32.051kHz
|
|
icm42688p -R 3 -s -b 1 -C 32051 start
|
|
|
|
# Internal SPI bus ICM42688p with SPIX measured frequency of 32.051kHz
|
|
icm42688p -R 1 -s -b 2 -C 32051 start
|
|
fi
|
|
|
|
# Internal magnetometer on I2C
|
|
if ! iis2mdc -R 4 -I -b 4 start
|
|
then
|
|
mmc5983ma -I -b 4 start
|
|
fi
|
|
|
|
# Internal Baro on I2C
|
|
bmp388 -I -b 4 start
|
|
|
|
# Internal optical flow
|
|
paw3902 -s -b 3 start -Y 90
|
|
|
|
# Internal distance sensor
|
|
afbrs50 start
|
|
|
|
# Start an external PWM generator
|
|
if param greater PCA9685_EN_BUS 0
|
|
then
|
|
pca9685_pwm_out start
|
|
fi
|