From 2794ff2ddadb00c92d1be4d0e260b4e16bab2ec5 Mon Sep 17 00:00:00 2001 From: Lorenz Meier Date: Sun, 3 Jan 2016 15:27:45 +0100 Subject: [PATCH] Start shell only if SD card not present --- ROMFS/px4fmu_common/init.d/rcS | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/ROMFS/px4fmu_common/init.d/rcS b/ROMFS/px4fmu_common/init.d/rcS index a2a726bd7c..5e859ae222 100644 --- a/ROMFS/px4fmu_common/init.d/rcS +++ b/ROMFS/px4fmu_common/init.d/rcS @@ -60,9 +60,6 @@ unset FRC if [ $MODE == autostart ] then - # Try to get an USB console - # REBOOTWORK this needs to start after the flight control loop - nshterm /dev/ttyACM0 & # # Start the ORB (first app to start) @@ -844,6 +841,15 @@ then px4flow start & fi +# Start USB shell if no microSD present, MAVLink else +if [ $LOG_FILE == /dev/null ] +then + # Try to get an USB console + nshterm /dev/ttyACM0 & +else + mavlink start -r 800000 -d /dev/ttyACM0 -m config -x +fi + if [ $EXIT_ON_END == yes ] then echo "Exit from nsh"