Skip to content

Commit

Permalink
Merge pull request #2114 from UAVenture/startup_script
Browse files Browse the repository at this point in the history
Make sure we have a boolog.txt entry for critical failures.
  • Loading branch information
LorenzMeier committed May 18, 2015
2 parents de5b65b + bf23ca7 commit 4345204
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
4 changes: 4 additions & 0 deletions ROMFS/px4fmu_common/init.d/rc.interface
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ then
echo "[i] Mixer: $MIXER_FILE on $OUTPUT_DEV"
else
echo "[i] Error loading mixer: $MIXER_FILE"
echo "ERROR: Could not load mixer: $MIXER_FILE" >> $LOG_FILE
tone_alarm $TUNE_ERR
fi

Expand All @@ -56,6 +57,7 @@ else
if [ $MIXER != skip ]
then
echo "[i] Mixer not defined"
echo "ERROR: Mixer not defined" >> $LOG_FILE
tone_alarm $TUNE_ERR
fi
fi
Expand Down Expand Up @@ -125,8 +127,10 @@ 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 "ERROR: Could not start: fmu mode_pwm" >> $LOG_FILE
tone_alarm $TUNE_ERR
fi

Expand Down
11 changes: 9 additions & 2 deletions ROMFS/px4fmu_common/init.d/rcS
Original file line number Diff line number Diff line change
Expand Up @@ -233,11 +233,11 @@ then

set IO_PRESENT yes
else
echo "PX4IO update failed" >> $LOG_FILE
echo "ERROR: PX4IO update failed" >> $LOG_FILE
tone_alarm $TUNE_ERR
fi
else
echo "PX4IO update failed" >> $LOG_FILE
echo "ERROR: PX4IO update failed" >> $LOG_FILE
tone_alarm $TUNE_ERR
fi
fi
Expand All @@ -246,6 +246,7 @@ then
if [ $IO_PRESENT == no ]
then
echo "[i] ERROR: PX4IO not found"
echo "ERROR: PX4IO not found" >> $LOG_FILE
tone_alarm $TUNE_ERR
fi
fi
Expand Down Expand Up @@ -328,6 +329,7 @@ then
then
sh /etc/init.d/rc.io
else
echo "ERROR: PX4IO start failed" >> $LOG_FILE
tone_alarm $TUNE_ERR
fi
fi
Expand All @@ -339,6 +341,7 @@ then
echo "[i] FMU mode_$FMU_MODE started"
else
echo "[i] ERROR: FMU mode_$FMU_MODE start failed"
echo "ERROR: FMU start failed" >> $LOG_FILE
tone_alarm $TUNE_ERR
fi

Expand Down Expand Up @@ -372,6 +375,7 @@ then
echo "[i] MK started"
else
echo "[i] ERROR: MK start failed"
echo "ERROR: MK start failed" >> $LOG_FILE
tone_alarm $TUNE_ERR
fi
unset MKBLCTRL_ARG
Expand All @@ -385,6 +389,7 @@ then
echo "[i] HIL output started"
else
echo "[i] ERROR: HIL output start failed"
echo "ERROR: HIL output start failed" >> $LOG_FILE
tone_alarm $TUNE_ERR
fi
fi
Expand All @@ -402,6 +407,7 @@ then
sh /etc/init.d/rc.io
else
echo "[i] ERROR: PX4IO start failed"
echo "ERROR: PX4IO start failed" >> $LOG_FILE
tone_alarm $TUNE_ERR
fi
fi
Expand All @@ -413,6 +419,7 @@ then
echo "[i] FMU mode_$FMU_MODE started"
else
echo "[i] ERROR: FMU mode_$FMU_MODE start failed"
echo "ERROR: FMU mode_$FMU_MODE start failed" >> $LOG_FILE
tone_alarm $TUNE_ERR
fi

Expand Down

0 comments on commit 4345204

Please sign in to comment.