Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add FC blackbox integration #99

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
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