|
|
|
@ -195,7 +195,6 @@ then
@@ -195,7 +195,6 @@ then
|
|
|
|
|
# |
|
|
|
|
if param compare SYS_AUTOSTART 0 |
|
|
|
|
then |
|
|
|
|
echo "INFO [init] No autostart" |
|
|
|
|
else |
|
|
|
|
sh /etc/init.d/rc.autostart |
|
|
|
|
fi |
|
|
|
@ -214,7 +213,7 @@ then
@@ -214,7 +213,7 @@ then
|
|
|
|
|
set FCONFIG /fs/microsd/etc/config.txt |
|
|
|
|
if [ -f $FCONFIG ] |
|
|
|
|
then |
|
|
|
|
echo "INFO [init] Custom: $FCONFIG" |
|
|
|
|
echo "Custom: $FCONFIG" |
|
|
|
|
sh $FCONFIG |
|
|
|
|
fi |
|
|
|
|
unset FCONFIG |
|
|
|
@ -245,7 +244,7 @@ then
@@ -245,7 +244,7 @@ then
|
|
|
|
|
|
|
|
|
|
if px4io checkcrc ${IO_FILE} |
|
|
|
|
then |
|
|
|
|
echo "INFO [init] PX4IO CRC OK" >> $LOG_FILE |
|
|
|
|
echo "[init] PX4IO CRC OK" >> $LOG_FILE |
|
|
|
|
|
|
|
|
|
set IO_PRESENT yes |
|
|
|
|
else |
|
|
|
@ -268,16 +267,16 @@ then
@@ -268,16 +267,16 @@ then
|
|
|
|
|
usleep 500000 |
|
|
|
|
if px4io checkcrc $IO_FILE |
|
|
|
|
then |
|
|
|
|
echo "INFO [init] PX4IO CRC OK after updating" >> $LOG_FILE |
|
|
|
|
echo "PX4IO CRC OK after updating" >> $LOG_FILE |
|
|
|
|
tone_alarm MLL8CDE |
|
|
|
|
|
|
|
|
|
set IO_PRESENT yes |
|
|
|
|
else |
|
|
|
|
echo "ERROR [init] PX4IO update failed" >> $LOG_FILE |
|
|
|
|
echo "PX4IO update failed" >> $LOG_FILE |
|
|
|
|
tone_alarm $TUNE_ERR |
|
|
|
|
fi |
|
|
|
|
else |
|
|
|
|
echo "ERROR [init] PX4IO update failed" >> $LOG_FILE |
|
|
|
|
echo "PX4IO update failed" >> $LOG_FILE |
|
|
|
|
tone_alarm $TUNE_ERR |
|
|
|
|
fi |
|
|
|
|
fi |
|
|
|
@ -285,7 +284,7 @@ then
@@ -285,7 +284,7 @@ then
|
|
|
|
|
|
|
|
|
|
if [ $IO_PRESENT == no ] |
|
|
|
|
then |
|
|
|
|
echo "ERROR [init] PX4IO not found" >> $LOG_FILE |
|
|
|
|
echo "PX4IO not found" >> $LOG_FILE |
|
|
|
|
tone_alarm $TUNE_ERR |
|
|
|
|
fi |
|
|
|
|
fi |
|
|
|
@ -377,7 +376,7 @@ then
@@ -377,7 +376,7 @@ then
|
|
|
|
|
then |
|
|
|
|
if param compare UAVCAN_ENABLE 0 |
|
|
|
|
then |
|
|
|
|
echo "INFO [init] OVERRIDING UAVCAN_ENABLE = 1" >> $LOG_FILE |
|
|
|
|
echo "OVERRIDING UAVCAN_ENABLE = 1" >> $LOG_FILE |
|
|
|
|
param set UAVCAN_ENABLE 1 |
|
|
|
|
fi |
|
|
|
|
fi |
|
|
|
@ -388,7 +387,7 @@ then
@@ -388,7 +387,7 @@ then
|
|
|
|
|
then |
|
|
|
|
sh /etc/init.d/rc.io |
|
|
|
|
else |
|
|
|
|
echo "INFO [init] PX4IO start failed" >> $LOG_FILE |
|
|
|
|
echo "PX4IO start failed" >> $LOG_FILE |
|
|
|
|
tone_alarm $TUNE_ERR |
|
|
|
|
fi |
|
|
|
|
fi |
|
|
|
@ -398,7 +397,7 @@ then
@@ -398,7 +397,7 @@ then
|
|
|
|
|
if fmu mode_$FMU_MODE |
|
|
|
|
then |
|
|
|
|
else |
|
|
|
|
echo "ERR [init] FMU start failed" >> $LOG_FILE |
|
|
|
|
echo "FMU start failed" >> $LOG_FILE |
|
|
|
|
tone_alarm $TUNE_ERR |
|
|
|
|
fi |
|
|
|
|
|
|
|
|
@ -430,7 +429,7 @@ then
@@ -430,7 +429,7 @@ then
|
|
|
|
|
if mkblctrl $MKBLCTRL_ARG |
|
|
|
|
then |
|
|
|
|
else |
|
|
|
|
echo "ERROR [init] MK start failed" >> $LOG_FILE |
|
|
|
|
echo "MK start failed" >> $LOG_FILE |
|
|
|
|
tone_alarm $TUNE_ERR |
|
|
|
|
fi |
|
|
|
|
unset MKBLCTRL_ARG |
|
|
|
@ -442,7 +441,6 @@ then
@@ -442,7 +441,6 @@ then
|
|
|
|
|
if pwm_out_sim mode_port2_pwm8 |
|
|
|
|
then |
|
|
|
|
else |
|
|
|
|
echo "ERROR [init] PWM SIM start failed" >> $LOG_FILE |
|
|
|
|
tone_alarm $TUNE_ERR |
|
|
|
|
fi |
|
|
|
|
fi |
|
|
|
@ -458,7 +456,7 @@ then
@@ -458,7 +456,7 @@ then
|
|
|
|
|
then |
|
|
|
|
sh /etc/init.d/rc.io |
|
|
|
|
else |
|
|
|
|
echo "ERROR [init] PX4IO start failed" >> $LOG_FILE |
|
|
|
|
echo "PX4IO start failed" >> $LOG_FILE |
|
|
|
|
tone_alarm $TUNE_ERR |
|
|
|
|
fi |
|
|
|
|
fi |
|
|
|
@ -468,7 +466,7 @@ then
@@ -468,7 +466,7 @@ then
|
|
|
|
|
if fmu mode_$FMU_MODE |
|
|
|
|
then |
|
|
|
|
else |
|
|
|
|
echo "ERROR [init] FMU mode_$FMU_MODE start failed" >> $LOG_FILE |
|
|
|
|
echo "FMU mode_$FMU_MODE start failed" >> $LOG_FILE |
|
|
|
|
tone_alarm $TUNE_ERR |
|
|
|
|
fi |
|
|
|
|
|
|
|
|
@ -711,8 +709,6 @@ then
@@ -711,8 +709,6 @@ then
|
|
|
|
|
# |
|
|
|
|
if [ $VEHICLE_TYPE == fw ] |
|
|
|
|
then |
|
|
|
|
echo "INFO [init] Fixedwing" |
|
|
|
|
|
|
|
|
|
if [ $MIXER == none ] |
|
|
|
|
then |
|
|
|
|
# Set default mixer for fixed wing if not defined |
|
|
|
@ -739,11 +735,9 @@ then
@@ -739,11 +735,9 @@ then
|
|
|
|
|
# |
|
|
|
|
if [ $VEHICLE_TYPE == mc ] |
|
|
|
|
then |
|
|
|
|
echo "INFO [init] Multicopter" |
|
|
|
|
|
|
|
|
|
if [ $MIXER == none ] |
|
|
|
|
then |
|
|
|
|
echo "INFO [init] Mixer undefined" |
|
|
|
|
echo "Mixer undefined" |
|
|
|
|
fi |
|
|
|
|
|
|
|
|
|
if [ $MAV_TYPE == none ] |
|
|
|
@ -790,7 +784,7 @@ then
@@ -790,7 +784,7 @@ then
|
|
|
|
|
# Still no MAV_TYPE found |
|
|
|
|
if [ $MAV_TYPE == none ] |
|
|
|
|
then |
|
|
|
|
echo "WARN [init] Unknown MAV_TYPE" |
|
|
|
|
echo "Unknown MAV_TYPE" |
|
|
|
|
param set MAV_TYPE 2 |
|
|
|
|
else |
|
|
|
|
param set MAV_TYPE $MAV_TYPE |
|
|
|
@ -808,11 +802,9 @@ then
@@ -808,11 +802,9 @@ then
|
|
|
|
|
# |
|
|
|
|
if [ $VEHICLE_TYPE == vtol ] |
|
|
|
|
then |
|
|
|
|
echo "INFO [init] VTOL" |
|
|
|
|
|
|
|
|
|
if [ $MIXER == none ] |
|
|
|
|
then |
|
|
|
|
echo "WARN [init] VTOL mixer undefined" |
|
|
|
|
echo "VTOL mixer undefined" |
|
|
|
|
fi |
|
|
|
|
|
|
|
|
|
if [ $MAV_TYPE == none ] |
|
|
|
@ -835,7 +827,7 @@ then
@@ -835,7 +827,7 @@ then
|
|
|
|
|
# Still no MAV_TYPE found |
|
|
|
|
if [ $MAV_TYPE == none ] |
|
|
|
|
then |
|
|
|
|
echo "WARN [init] Unknown MAV_TYPE" |
|
|
|
|
echo "Unknown MAV_TYPE" |
|
|
|
|
param set MAV_TYPE 19 |
|
|
|
|
else |
|
|
|
|
param set MAV_TYPE $MAV_TYPE |
|
|
|
@ -919,14 +911,14 @@ then
@@ -919,14 +911,14 @@ then
|
|
|
|
|
# |
|
|
|
|
if [ $VEHICLE_TYPE == none ] |
|
|
|
|
then |
|
|
|
|
echo "WARN [init] No autostart ID found" |
|
|
|
|
echo "No autostart ID found" |
|
|
|
|
fi |
|
|
|
|
|
|
|
|
|
# Start any custom addons |
|
|
|
|
set FEXTRAS /fs/microsd/etc/extras.txt |
|
|
|
|
if [ -f $FEXTRAS ] |
|
|
|
|
then |
|
|
|
|
echo "INFO [init] Addons script: $FEXTRAS" |
|
|
|
|
echo "Addons script: $FEXTRAS" |
|
|
|
|
sh $FEXTRAS |
|
|
|
|
fi |
|
|
|
|
unset FEXTRAS |
|
|
|
@ -950,7 +942,7 @@ mavlink boot_complete
@@ -950,7 +942,7 @@ mavlink boot_complete
|
|
|
|
|
|
|
|
|
|
if [ $EXIT_ON_END == yes ] |
|
|
|
|
then |
|
|
|
|
echo "INFO [init] NSH exit" |
|
|
|
|
echo "NSH exit" |
|
|
|
|
exit |
|
|
|
|
fi |
|
|
|
|
unset EXIT_ON_END |
|
|
|
|