Skip to content

Commit 4345204

Browse files
committed
Merge pull request #2114 from UAVenture/startup_script
Make sure we have a boolog.txt entry for critical failures.
2 parents de5b65b + bf23ca7 commit 4345204

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

ROMFS/px4fmu_common/init.d/rc.interface

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ then
4848
echo "[i] Mixer: $MIXER_FILE on $OUTPUT_DEV"
4949
else
5050
echo "[i] Error loading mixer: $MIXER_FILE"
51+
echo "ERROR: Could not load mixer: $MIXER_FILE" >> $LOG_FILE
5152
tone_alarm $TUNE_ERR
5253
fi
5354

@@ -56,6 +57,7 @@ else
5657
if [ $MIXER != skip ]
5758
then
5859
echo "[i] Mixer not defined"
60+
echo "ERROR: Mixer not defined" >> $LOG_FILE
5961
tone_alarm $TUNE_ERR
6062
fi
6163
fi
@@ -125,8 +127,10 @@ then
125127
echo "[i] Mixer: $MIXER_AUX_FILE on $OUTPUT_AUX_DEV"
126128
else
127129
echo "[i] Error loading mixer: $MIXER_AUX_FILE"
130+
echo "ERROR: Could not load mixer: $MIXER_AUX_FILE" >> $LOG_FILE
128131
fi
129132
else
133+
echo "ERROR: Could not start: fmu mode_pwm" >> $LOG_FILE
130134
tone_alarm $TUNE_ERR
131135
fi
132136

ROMFS/px4fmu_common/init.d/rcS

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,11 +233,11 @@ then
233233

234234
set IO_PRESENT yes
235235
else
236-
echo "PX4IO update failed" >> $LOG_FILE
236+
echo "ERROR: PX4IO update failed" >> $LOG_FILE
237237
tone_alarm $TUNE_ERR
238238
fi
239239
else
240-
echo "PX4IO update failed" >> $LOG_FILE
240+
echo "ERROR: PX4IO update failed" >> $LOG_FILE
241241
tone_alarm $TUNE_ERR
242242
fi
243243
fi
@@ -246,6 +246,7 @@ then
246246
if [ $IO_PRESENT == no ]
247247
then
248248
echo "[i] ERROR: PX4IO not found"
249+
echo "ERROR: PX4IO not found" >> $LOG_FILE
249250
tone_alarm $TUNE_ERR
250251
fi
251252
fi
@@ -328,6 +329,7 @@ then
328329
then
329330
sh /etc/init.d/rc.io
330331
else
332+
echo "ERROR: PX4IO start failed" >> $LOG_FILE
331333
tone_alarm $TUNE_ERR
332334
fi
333335
fi
@@ -339,6 +341,7 @@ then
339341
echo "[i] FMU mode_$FMU_MODE started"
340342
else
341343
echo "[i] ERROR: FMU mode_$FMU_MODE start failed"
344+
echo "ERROR: FMU start failed" >> $LOG_FILE
342345
tone_alarm $TUNE_ERR
343346
fi
344347

@@ -372,6 +375,7 @@ then
372375
echo "[i] MK started"
373376
else
374377
echo "[i] ERROR: MK start failed"
378+
echo "ERROR: MK start failed" >> $LOG_FILE
375379
tone_alarm $TUNE_ERR
376380
fi
377381
unset MKBLCTRL_ARG
@@ -385,6 +389,7 @@ then
385389
echo "[i] HIL output started"
386390
else
387391
echo "[i] ERROR: HIL output start failed"
392+
echo "ERROR: HIL output start failed" >> $LOG_FILE
388393
tone_alarm $TUNE_ERR
389394
fi
390395
fi
@@ -402,6 +407,7 @@ then
402407
sh /etc/init.d/rc.io
403408
else
404409
echo "[i] ERROR: PX4IO start failed"
410+
echo "ERROR: PX4IO start failed" >> $LOG_FILE
405411
tone_alarm $TUNE_ERR
406412
fi
407413
fi
@@ -413,6 +419,7 @@ then
413419
echo "[i] FMU mode_$FMU_MODE started"
414420
else
415421
echo "[i] ERROR: FMU mode_$FMU_MODE start failed"
422+
echo "ERROR: FMU mode_$FMU_MODE start failed" >> $LOG_FILE
416423
tone_alarm $TUNE_ERR
417424
fi
418425

0 commit comments

Comments
 (0)