mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-05 04:01:35 +08:00
Optimize rc shell
This commit is contained in:
@@ -83,81 +83,84 @@ then
|
|||||||
then
|
then
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
else
|
fi
|
||||||
if ver hwcmp PX4FMU_V4
|
|
||||||
|
if ver hwcmp PX4FMU_V4
|
||||||
|
then
|
||||||
|
# External I2C bus
|
||||||
|
if hmc5883 -C -T -X start
|
||||||
then
|
then
|
||||||
# External I2C bus
|
fi
|
||||||
if hmc5883 -C -T -X start
|
|
||||||
then
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Internal SPI bus is rotated 90 deg yaw
|
# Internal SPI bus is rotated 90 deg yaw
|
||||||
if hmc5883 -C -T -S -R 2 start
|
if hmc5883 -C -T -S -R 2 start
|
||||||
then
|
then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Internal SPI bus ICM-20608-G is rotated 90 deg yaw
|
# Internal SPI bus ICM-20608-G is rotated 90 deg yaw
|
||||||
if mpu6000 -R 2 -T 20608 start
|
if mpu6000 -R 2 -T 20608 start
|
||||||
then
|
then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Internal SPI bus mpu9250 is rotated 90 deg yaw
|
# Internal SPI bus mpu9250 is rotated 90 deg yaw
|
||||||
if mpu9250 -R 2 start
|
if mpu9250 -R 2 start
|
||||||
|
then
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ver hwcmp PX4FMU_V1
|
||||||
|
then
|
||||||
|
# FMUv1
|
||||||
|
if mpu6000 start
|
||||||
|
then
|
||||||
|
fi
|
||||||
|
|
||||||
|
if l3gd20 start
|
||||||
|
then
|
||||||
|
fi
|
||||||
|
|
||||||
|
# MAG selection
|
||||||
|
if param compare SENS_EXT_MAG 2
|
||||||
|
then
|
||||||
|
if hmc5883 -C -I start
|
||||||
then
|
then
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
if ver hwcmp MINDPX_V2
|
# Use only external as primary
|
||||||
|
if param compare SENS_EXT_MAG 1
|
||||||
then
|
then
|
||||||
if mpu6500 start
|
if hmc5883 -C -X start
|
||||||
then
|
|
||||||
fi
|
|
||||||
|
|
||||||
if lsm303d start
|
|
||||||
then
|
|
||||||
fi
|
|
||||||
|
|
||||||
if l3gd20 start
|
|
||||||
then
|
|
||||||
fi
|
|
||||||
|
|
||||||
# External I2C bus
|
|
||||||
if hmc5883 -C -T -X start
|
|
||||||
then
|
then
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
# FMUv1
|
# auto-detect the primary, prefer external
|
||||||
if mpu6000 start
|
if hmc5883 start
|
||||||
then
|
then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if l3gd20 start
|
|
||||||
then
|
|
||||||
fi
|
|
||||||
|
|
||||||
# MAG selection
|
|
||||||
if param compare SENS_EXT_MAG 2
|
|
||||||
then
|
|
||||||
if hmc5883 -C -I start
|
|
||||||
then
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
# Use only external as primary
|
|
||||||
if param compare SENS_EXT_MAG 1
|
|
||||||
then
|
|
||||||
if hmc5883 -C -X start
|
|
||||||
then
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
# auto-detect the primary, prefer external
|
|
||||||
if hmc5883 start
|
|
||||||
then
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if ver hwcmp MINDPX_V2
|
||||||
|
then
|
||||||
|
if mpu6500 start
|
||||||
|
then
|
||||||
|
fi
|
||||||
|
|
||||||
|
if lsm303d start
|
||||||
|
then
|
||||||
|
fi
|
||||||
|
|
||||||
|
if l3gd20 start
|
||||||
|
then
|
||||||
|
fi
|
||||||
|
|
||||||
|
# External I2C bus
|
||||||
|
if hmc5883 -C -T -X start
|
||||||
|
then
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
if meas_airspeed start
|
if meas_airspeed start
|
||||||
then
|
then
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -815,12 +815,6 @@ fi
|
|||||||
# XXX potentially unset all script variables.
|
# XXX potentially unset all script variables.
|
||||||
unset TUNE_ERR
|
unset TUNE_ERR
|
||||||
|
|
||||||
#if ver hwcmp MINDPX_V2
|
|
||||||
#then
|
|
||||||
# start sonnar
|
|
||||||
# hc_sr04 start
|
|
||||||
#fi
|
|
||||||
|
|
||||||
# Boot is complete, inform MAVLink app(s) that the system is now fully up and running
|
# Boot is complete, inform MAVLink app(s) that the system is now fully up and running
|
||||||
mavlink boot_complete
|
mavlink boot_complete
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user