diff --git a/ROMFS/px4fmu_common/init.d/rc.interface b/ROMFS/px4fmu_common/init.d/rc.interface index 571e808b6fb..f3761200a13 100644 --- a/ROMFS/px4fmu_common/init.d/rc.interface +++ b/ROMFS/px4fmu_common/init.d/rc.interface @@ -97,14 +97,6 @@ then fi fi -# check if should load secondary mixer -set OUTPUT_AUX_DEV /dev/pwm_output1 -if [ -f $OUTPUT_AUX_DEV ] -then -else - set MIXER_AUX none -fi - if [ $MIXER_AUX != none ] then # @@ -112,6 +104,7 @@ then # set MIXER_AUX_FILE none + set OUTPUT_AUX_DEV /dev/pwm_output1 if [ -f $SDCARD_MIXERS_PATH/$MIXER_AUX.aux.mix ] then @@ -128,16 +121,24 @@ then then if fmu mode_pwm then - if mixer load $OUTPUT_AUX_DEV $MIXER_AUX_FILE + if [ -e $OUTPUT_AUX_DEV ] then - echo "[i] Mixer: $MIXER_AUX_FILE on $OUTPUT_AUX_DEV" + if mixer load $OUTPUT_AUX_DEV $MIXER_AUX_FILE + then + echo "[i] Mixer: $MIXER_AUX_FILE on $OUTPUT_AUX_DEV" + else + echo "[i] Error loading mixer: $MIXER_AUX_FILE" + echo "ERROR: Could not load mixer: $MIXER_AUX_FILE" >> $LOG_FILE + fi else - echo "[i] Error loading mixer: $MIXER_AUX_FILE" - echo "ERROR: Could not load mixer: $MIXER_AUX_FILE" >> $LOG_FILE + set PWM_AUX_OUT none + set FAILSAFE_AUX none fi else echo "ERROR: Could not start: fmu mode_pwm" >> $LOG_FILE tone_alarm $TUNE_ERR + set PWM_AUX_OUT none + set FAILSAFE_AUX none fi if [ $PWM_AUX_OUT != none ] diff --git a/ROMFS/px4fmu_common/init.d/rcS b/ROMFS/px4fmu_common/init.d/rcS index db142c30b84..6e74704e1a4 100644 --- a/ROMFS/px4fmu_common/init.d/rcS +++ b/ROMFS/px4fmu_common/init.d/rcS @@ -705,13 +705,6 @@ then fi unset FEXTRAS - if [ $EXIT_ON_END == yes ] - then - echo "Exit from nsh" - exit - fi - unset EXIT_ON_END - # Run no SD alarm if [ $LOG_FILE == /dev/null ] then @@ -723,6 +716,13 @@ then # Boot is complete, inform MAVLink app(s) that the system is now fully up and running mavlink boot_complete + if [ $EXIT_ON_END == yes ] + then + echo "Exit from nsh" + exit + fi + unset EXIT_ON_END + # End of autostart fi diff --git a/src/modules/mavlink/mavlink_parameters.cpp b/src/modules/mavlink/mavlink_parameters.cpp index 1b7f1d95dd6..559cf2c89c1 100644 --- a/src/modules/mavlink/mavlink_parameters.cpp +++ b/src/modules/mavlink/mavlink_parameters.cpp @@ -215,6 +215,10 @@ MavlinkParametersManager::send(const hrt_abstime t) if ((p == PARAM_INVALID) || (_send_all_index >= (int) param_count())) { _send_all_index = -1; } + } else if (_send_all_index == 0 && hrt_absolute_time() > 20 * 1000 * 1000) { + /* the boot did not seem to ever complete, warn user and set boot complete */ + _mavlink->send_statustext_critical("WARNING: SYSTEM BOOT INCOMPLETE. CHECK CONFIG."); + _mavlink->set_boot_complete(); } }