mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-24 15:40:31 +08:00
hw_ver app added for hardware version checking
This commit is contained in:
@@ -67,8 +67,11 @@ if px4io start
|
||||
then
|
||||
echo "IO started"
|
||||
else
|
||||
fmu mode_serial
|
||||
echo "FMU started"
|
||||
if hw_ver compare PX4FMU_V1
|
||||
then
|
||||
fmu mode_serial
|
||||
echo "FMU started"
|
||||
fi
|
||||
fi
|
||||
|
||||
#
|
||||
|
||||
@@ -42,10 +42,12 @@ position_estimator_inav start
|
||||
|
||||
if [ -d /fs/microsd ]
|
||||
then
|
||||
if [ $BOARD == fmuv1 ]
|
||||
if hw_ver compare PX4FMU_V1
|
||||
then
|
||||
echo "Start sdlog2 at 50Hz"
|
||||
sdlog2 start -r 50 -e -b 16
|
||||
else
|
||||
echo "Start sdlog2 at 200Hz"
|
||||
sdlog2 start -r 200 -e -b 16
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -11,7 +11,7 @@ then
|
||||
#
|
||||
# Disable px4io topic limiting
|
||||
#
|
||||
if [ $BOARD == fmuv1 ]
|
||||
if hw_ver compare PX4FMU_V1
|
||||
then
|
||||
px4io limit 200
|
||||
else
|
||||
|
||||
@@ -5,10 +5,12 @@
|
||||
|
||||
if [ -d /fs/microsd ]
|
||||
then
|
||||
if [ $BOARD == fmuv1 ]
|
||||
if hw_ver compare PX4FMU_V1
|
||||
then
|
||||
echo "Start sdlog2 at 50Hz"
|
||||
sdlog2 start -r 50 -a -b 16
|
||||
else
|
||||
echo "Start sdlog2 at 200Hz"
|
||||
sdlog2 start -r 200 -a -b 16
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -28,9 +28,7 @@ fi
|
||||
|
||||
if lsm303d start
|
||||
then
|
||||
set BOARD fmuv2
|
||||
else
|
||||
set BOARD fmuv1
|
||||
echo "using LSM303D"
|
||||
fi
|
||||
|
||||
# Start airspeed sensors
|
||||
|
||||
@@ -185,9 +185,12 @@ then
|
||||
else
|
||||
echo "PX4IO restart failed"
|
||||
echo "PX4IO restart failed" >> $logfile
|
||||
tone_alarm MNGGG
|
||||
sleep 10
|
||||
reboot
|
||||
if hw_ver compare PX4FMU_V2
|
||||
then
|
||||
tone_alarm MNGGG
|
||||
sleep 10
|
||||
reboot
|
||||
fi
|
||||
fi
|
||||
else
|
||||
echo "PX4IO update failed"
|
||||
|
||||
Reference in New Issue
Block a user