Files
PX4-Autopilot/boards/px4/fmu-v5/init/rc.board_sensors
Igor MišićandDavid Sidrane 4b503c310e Merge PR #19575 (changes to pr-extendend_hw_ver_rev_format)
- 4096 of 3 hex digits each for rev and ver is enough.
    #defines used in SPI versions do not be long format, use use the macro
 - Board provides a prefix and the formatting is sized and built in
 - No need for funky board_get_base_eeprom_mtd_manifest interface
    Original mft is used where the abstraction is done with the MFT interface

Co-authored-by: David Sidrane <David.Sidrane@Nscdg.com>
2022-07-05 09:29:26 +02:00

32 lines
718 B
Bash

#!/bin/sh
#
# PX4 FMUv5 specific board sensors init
#------------------------------------------------------------------------------
board_adc start
if ver hwtypecmp V5005002 V5006002
then
# Internal SPI bus ICM-42688-P
icm42688p -s -R 2 -q start
else
# Internal SPI bus ICM-20602
icm20602 -s -R 2 -q start
fi
# Internal SPI bus ICM-20689
icm20689 -s -R 2 start
# Internal SPI bus BMI055 accel/gyro
bmi055 -A -R 2 -s start
bmi055 -G -R 2 -s start
# Baro on internal SPI
ms5611 -s start
# internal compass
ist8310 -I -R 10 start
# 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