Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions ipk/airunit/data/opt/bin/airunit-osd-start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,18 @@ echo $! > /opt/var/run/airunit-osd-dji.pid
setprop dji.hdvt_uav_service 1
setprop dji.shuttle_service 1



BBSTORE="/blackbox/dump_tty_`date '+%Y%m%d-%H%M%S'`.log"

stdbuf -o0 cat /dev/ttyS1_moved >$BBSTORE &
echo $! > /opt/var/run/dump-tty.pid

###wait 10sec and if file >0kb then kill process (msp data, not bb log)
sleep 10
if [ -s $BBSTORE ]; then
kill `cat /opt/var/run/dump-tty.pid`
rm $BBSTORE
else
#file is empty = no msp data
fi