2016-09-15 05:13:59 -03:00
|
|
|
#!/bin/sh
|
|
|
|
|
2019-03-16 03:01:04 -03:00
|
|
|
cd /data/ftp/internal_000/ardupilot
|
2016-09-15 05:13:59 -03:00
|
|
|
(
|
2019-03-16 03:01:04 -03:00
|
|
|
/bin/date
|
|
|
|
/bin/ls
|
2016-09-15 05:13:59 -03:00
|
|
|
|
2019-03-16 03:01:04 -03:00
|
|
|
/bin/dragon_ipc.sh dragon_shutdown
|
|
|
|
/bin/sleep 2
|
|
|
|
/usr/bin/killall -KILL dragon-prog
|
|
|
|
/bin/sleep 1
|
|
|
|
|
|
|
|
echo "step2"
|
2016-10-26 05:26:59 -03:00
|
|
|
# stop stock led daemon
|
2019-03-16 03:01:04 -03:00
|
|
|
/usr/bin/pstop ledd
|
|
|
|
|
|
|
|
# setup for video
|
|
|
|
/usr/bin/media-ctl -l '"mt9f002 0-0010":0->"avicam.0":0[1]'
|
|
|
|
/usr/bin/media-ctl -l '"avicam_dummy_dev.0":0->"avicam.0":0[0]'
|
|
|
|
/usr/bin/prestart dxowrapperd
|
|
|
|
/usr/bin/prestart pimp
|
|
|
|
|
|
|
|
echo "step3"
|
2016-10-26 05:26:59 -03:00
|
|
|
|
2016-09-15 05:13:59 -03:00
|
|
|
# startup fan
|
|
|
|
echo 1 > /sys/devices/platform/user_gpio/FAN/value
|
2019-03-16 03:01:04 -03:00
|
|
|
|
|
|
|
# setup GPS
|
|
|
|
echo 1 > /sys/devices/platform/user_gpio/RESET_GNSS/value
|
|
|
|
/bin/sleep 1
|
|
|
|
echo 0 > /sys/devices/platform/user_gpio/RESET_GNSS/value
|
|
|
|
|
|
|
|
echo "step4"
|
|
|
|
|
2016-09-15 05:13:59 -03:00
|
|
|
while :; do
|
|
|
|
echo "$(date) Starting arduplane"
|
|
|
|
./arduplane -A udp:192.168.42.255:14550:bcast -B /dev/ttyPA1 -C udp:192.168.43.255:14550:bcast --module-directory modules
|
|
|
|
done
|
2019-03-16 03:01:04 -03:00
|
|
|
) >> start_ardupilot.log 2>&1
|