From adf7aee7626bbcc577f45d81709b076fd301a178 Mon Sep 17 00:00:00 2001 From: Lorenz Meier Date: Thu, 26 Dec 2019 00:04:50 +0100 Subject: [PATCH] Harden autostart logic for non-existent airframe values This ensures that the user is pushed back to the airframe configuration stage. --- Tools/px4airframes/rcout.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Tools/px4airframes/rcout.py b/Tools/px4airframes/rcout.py index 080eb403b2..3ece11c1e5 100644 --- a/Tools/px4airframes/rcout.py +++ b/Tools/px4airframes/rcout.py @@ -78,6 +78,8 @@ class RCOutput(): result += "else\n" result += "\techo \"ERROR [init] No file matches SYS_AUTOSTART value found in : /etc/init.d/airframes\"\n" result += "\techo \"ERROR [init] No file matches SYS_AUTOSTART value found in : /etc/init.d/airframes\" >> $LOG_FILE\n" + # Reset the configuration + result += "\tparam set SYS_AUTOSTART 0\n" result += "\ttone_alarm ${TUNE_ERR}\n" result += "fi\n" result += "unset AIRFRAME"