mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-03-27 01:12:18 +08:00
voxl2: Add support for the new M0197 board variant. Uses bmi270 IMU and dps310 barometer and GPS on apps proc.
This commit is contained in:
committed by
Ramon Roche
parent
55d35ddf37
commit
b0b99de767
@@ -9,7 +9,9 @@ CONFIG_DRIVERS_DIFFERENTIAL_PRESSURE_MS4525DO=y
|
||||
CONFIG_DRIVERS_DISTANCE_SENSOR_VL53L0X=y
|
||||
CONFIG_DRIVERS_DISTANCE_SENSOR_VL53L1X=y
|
||||
CONFIG_DRIVERS_GPS=y
|
||||
CONFIG_DRIVERS_IMU_BOSCH_BMI270=y
|
||||
CONFIG_DRIVERS_IMU_INVENSENSE_ICM42688P=y
|
||||
CONFIG_DRIVERS_BAROMETER_DPS310=y
|
||||
CONFIG_DRIVERS_LIGHTS_RGBLED_NCP5623C=y
|
||||
CONFIG_DRIVERS_MAGNETOMETER_ISENTEK_IST8308=y
|
||||
CONFIG_DRIVERS_MAGNETOMETER_ISENTEK_IST8310=y
|
||||
|
||||
@@ -36,5 +36,5 @@
|
||||
#include <drivers/drv_sensor.h>
|
||||
|
||||
constexpr px4_spi_bus_t px4_spi_buses[SPI_BUS_MAX_BUS_ITEMS] = {
|
||||
initSPIBus(1, {initSPIDevice(DRV_IMU_DEVTYPE_ICM42688P), }),
|
||||
initSPIBus(1, {initSPIDevice(DRV_IMU_DEVTYPE_ICM42688P), initSPIDevice(DRV_IMU_DEVTYPE_BMI270), }),
|
||||
};
|
||||
|
||||
@@ -17,13 +17,15 @@ if [ $RETURNCODE -ne 0 ]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
# We can only run on M0052, M0054, or M0104 so exit with error if that is not the case
|
||||
# We can only run on M0052, M0054, M0104, or M0197 so exit with error if that is not the case
|
||||
if [ $PLATFORM = "M0052" ]; then
|
||||
/bin/echo "Running on M0052"
|
||||
elif [ $PLATFORM = "M0054" ]; then
|
||||
/bin/echo "Running on M0054"
|
||||
elif [ $PLATFORM = "M0104" ]; then
|
||||
/bin/echo "Running on M0104"
|
||||
elif [ $PLATFORM = "M0197" ]; then
|
||||
/bin/echo "Running on M0197"
|
||||
else
|
||||
/bin/echo "Error, cannot determine platform!"
|
||||
exit 0
|
||||
@@ -76,7 +78,11 @@ microdds_client start -t udp -h 127.0.0.1 -p 8888
|
||||
qshell pwm_out_sim start -m hil
|
||||
# g = gps, m = mag, o = odometry (vio), h = distance sensor, f = optic flow
|
||||
# qshell dsp_hitl start -g -m -o -h -f
|
||||
qshell dsp_hitl start -g -m
|
||||
if [ "$PLATFORM" == "M0197" ]; then
|
||||
qshell dsp_hitl start -g -m -p 6
|
||||
else
|
||||
qshell dsp_hitl start -g -m
|
||||
fi
|
||||
|
||||
# start the onboard fast link to connect to voxl-mavlink-server
|
||||
mavlink start -x -u 14556 -o 14557 -r 100000 -n lo -m onboard
|
||||
|
||||
@@ -40,13 +40,15 @@ if [ $RETURNCODE -ne 0 ]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
# We can only run on M0052, M0054, or M0104 so exit with error if that is not the case
|
||||
# We can only run on M0052, M0054, M0104, or M0197 so exit with error if that is not the case
|
||||
if [ $PLATFORM = "M0052" ]; then
|
||||
/bin/echo "Running on M0052"
|
||||
elif [ $PLATFORM = "M0054" ]; then
|
||||
/bin/echo "Running on M0054"
|
||||
elif [ $PLATFORM = "M0104" ]; then
|
||||
/bin/echo "Running on M0104"
|
||||
elif [ $PLATFORM = "M0197" ]; then
|
||||
/bin/echo "Running on M0197"
|
||||
else
|
||||
/bin/echo "Error, cannot determine platform!"
|
||||
exit 0
|
||||
@@ -77,13 +79,22 @@ param load
|
||||
if [ "$PLATFORM" == "M0104" ]; then
|
||||
/bin/echo "Starting IMU driver with rotation 12"
|
||||
qshell icm42688p start -s -R 12 -C 32768
|
||||
elif [ "$PLATFORM" == "M0197" ]; then
|
||||
/bin/echo "Starting bmi270 IMU driver with rotation 26"
|
||||
qshell bmi270 start -s -R 26
|
||||
else
|
||||
/bin/echo "Starting IMU driver with no rotation"
|
||||
qshell icm42688p start -s -C 32768
|
||||
fi
|
||||
|
||||
# Start Invensense ICP 101xx barometer built on to VOXL 2
|
||||
qshell icp101xx start -I -b 5
|
||||
# Start onboard barometer
|
||||
if [ "$PLATFORM" == "M0197" ]; then
|
||||
/bin/echo "Starting dps368 barometer on M0197"
|
||||
qshell dps310 start -I -b 5
|
||||
else
|
||||
# Start Invensense ICP 101xx barometer built on to VOXL 2
|
||||
qshell icp101xx start -I -b 5
|
||||
fi
|
||||
|
||||
# Auto detect the magnetometer. If one or both of these devices
|
||||
# are not connected it will fail but not cause any harm.
|
||||
@@ -97,6 +108,9 @@ if [ "$GPS" != "NONE" ]; then
|
||||
# On M0052 the GPS driver runs on the apps processor
|
||||
if [ $PLATFORM = "M0052" ]; then
|
||||
gps start -d /dev/ttyHS2
|
||||
# On M0197 the GPS driver runs on the apps processor
|
||||
elif [ $PLATFORM = "M0197" ]; then
|
||||
gps start -d /dev/ttyHS7
|
||||
# On M0054 and M0104 the GPS driver runs on SLPI DSP
|
||||
else
|
||||
qshell gps start -d 6
|
||||
|
||||
Reference in New Issue
Block a user