mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-09 19:51:36 +08:00
WIP: px4log
This commit is contained in:
@@ -19,11 +19,11 @@ fi
|
||||
mount -t vfat /dev/mmcsd0 /fs/microsd
|
||||
if [ $? = 0 ]
|
||||
then
|
||||
echo "[i] card mounted at /fs/microsd"
|
||||
px4log "[i] card mounted at /fs/microsd"
|
||||
# Start playing the startup tune
|
||||
tune_control play -t 1 # tune 1 = STARTUP
|
||||
else
|
||||
echo "[i] no microSD card found"
|
||||
px4log "[i] no microSD card found"
|
||||
tune_control play error
|
||||
fi
|
||||
|
||||
@@ -43,9 +43,9 @@ fi
|
||||
param select $PARAM_FILE
|
||||
if param load
|
||||
then
|
||||
echo "[param] Loaded: $PARAM_FILE"
|
||||
px4log "[param] Loaded: $PARAM_FILE"
|
||||
else
|
||||
echo "[param] FAILED loading $PARAM_FILE"
|
||||
px4log "[param] FAILED loading $PARAM_FILE"
|
||||
fi
|
||||
|
||||
#
|
||||
@@ -53,7 +53,7 @@ fi
|
||||
#
|
||||
if [ -f $BOARD_RC ]
|
||||
then
|
||||
echo "Board init: ${BOARD_RC}"
|
||||
px4log "Board init: ${BOARD_RC}"
|
||||
. $BOARD_RC
|
||||
fi
|
||||
|
||||
@@ -64,24 +64,24 @@ fi
|
||||
|
||||
if px4io checkcrc $io_file
|
||||
then
|
||||
echo "PX4IO CRC OK"
|
||||
px4log "PX4IO CRC OK"
|
||||
else
|
||||
echo "PX4IO CRC failure"
|
||||
px4log "PX4IO CRC failure"
|
||||
tune_control play -t 16 # tune 16 = PROG_PX4IO
|
||||
if px4io update $io_file
|
||||
then
|
||||
if px4io start
|
||||
then
|
||||
echo "PX4IO restart OK"
|
||||
px4log "PX4IO restart OK"
|
||||
tune_control play-t 17 # tune 17 = PROG_PX4IO_OK
|
||||
else
|
||||
echo "PX4IO restart failed"
|
||||
px4log "PX4IO restart failed"
|
||||
tune_control play -t 18 # tune 18 = PROG_PX4IO_ERR
|
||||
set unit_test_failure 1
|
||||
set unit_test_failure_list "${unit_test_failure_list} px4io_flash"
|
||||
fi
|
||||
else
|
||||
echo "PX4IO update failed"
|
||||
px4log "PX4IO update failed"
|
||||
tune_control play -t 18 # tune 18 = PROG_PX4IO_ERR
|
||||
set unit_test_failure 1
|
||||
set unit_test_failure_list "${unit_test_failure_list} px4io_flash"
|
||||
@@ -90,7 +90,7 @@ fi
|
||||
|
||||
if px4io start
|
||||
then
|
||||
echo "PX4IO OK"
|
||||
px4log "PX4IO OK"
|
||||
else
|
||||
set unit_test_failure 1
|
||||
set unit_test_failure_list "${unit_test_failure_list} px4io_start"
|
||||
@@ -117,11 +117,11 @@ ver all
|
||||
if tests all
|
||||
then
|
||||
echo
|
||||
echo "All Unit Tests PASSED"
|
||||
px4log "All Unit Tests PASSED"
|
||||
led_control on -c green
|
||||
else
|
||||
echo
|
||||
echo "Some Unit Tests FAILED"
|
||||
px4log "Some Unit Tests FAILED"
|
||||
led_control on -c red
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user