Start rc.baseboard

This commit is contained in:
alexklimaj
2022-10-01 11:46:35 -06:00
parent 2bd1ac005f
commit 673e5898ea
5 changed files with 101 additions and 128 deletions
@@ -39,6 +39,7 @@ px4_add_romfs_files(
rc.balloon_apps
rc.balloon_defaults
rc.boat_defaults
rc.baseboard
rc.fw_apps
rc.fw_defaults
rc.heli_defaults
+65
View File
@@ -0,0 +1,65 @@
#!/bin/sh
#
# Standard startup script for baseboard sensor drivers.
#
###############################################################################
# Begin Baseboard drivers #
###############################################################################
set HAVE_PM2 yes
if ver hwtypecmp V6X005000 V6X005001 V6X005003 V6X005004
then
set HAVE_PM2 no
fi
if param compare SENS_EN_INA226 1
then
# Start Digital power monitors
ina226 -X -b 1 -t 1 -k start
if [ $HAVE_PM2 = yes ]
then
ina226 -X -b 2 -t 2 -k start
fi
fi
if param compare SENS_EN_INA228 1
then
# Start Digital power monitors
ina228 -X -b 1 -t 1 -k start
if [ $HAVE_PM2 = yes ]
then
ina228 -X -b 2 -t 2 -k start
fi
fi
if param compare SENS_EN_INA238 1
then
# Start Digital power monitors
ina238 -X -b 1 -t 1 -k start
if [ $HAVE_PM2 = yes ]
then
ina238 -X -b 2 -t 2 -k start
fi
fi
# External compass on GPS1/I2C1 (the 3rd external bus): standard Holybro Pixhawk 4 or CUAV V5 GPS/compass puck (with lights, safety button, and buzzer)
ist8310 -X -b 1 -R 10 start
if ver hwtypecmp V6X000000 V6X001000
then
bmp388 -I start
else
if ver hwtypecmp V6X002001
then
icp201xx -X start
else
bmp388 -X start
fi
fi
# Baro on I2C3
ms5611 -X start
unset HAVE_PM2