mirror of
https://gitee.com/xiaohuolufeihua/bizhang_-obav.git
synced 2026-05-21 09:22:18 +00:00
- simple state machine to reset, configure, etc
- checked register mechanism (sensor will reset itself on configuration error)
- configured in 16 bit mode (1320 LSB/Gauss instead of 330 LSB/Gauss)
- adjusted orientation handling in driver to match datasheet as closely as possible
- in many external compass units the rotation was wrong and very difficult to actual determine how to set correctly
26 lines
602 B
Bash
26 lines
602 B
Bash
#!/bin/sh
|
|
#
|
|
# PX4 FMUv5 specific board sensors init
|
|
#------------------------------------------------------------------------------
|
|
|
|
adc start
|
|
|
|
# Internal SPI bus ICM-20602
|
|
icm20602 -s -R 2 -q start
|
|
|
|
# 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 3 -R 10 start
|