mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-07-26 16:28:06 +08:00
* refactor: use parseDefaultArguments * style: reverted changes to docs (should be auto-generated) * refactor: use parseDefaultArguments * style: reverted changes to docs (should be auto-generated)
43 lines
852 B
Bash
43 lines
852 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 -X
|
|
fi
|