diff options
author | Lorenz Meier <lm@inf.ethz.ch> | 2014-11-08 20:38:57 +0100 |
---|---|---|
committer | Lorenz Meier <lm@inf.ethz.ch> | 2014-11-08 20:38:57 +0100 |
commit | 8599994ebb3e4ce63b5fe77cb1f2935d27604745 (patch) | |
tree | 0bdf055809dfcc0b50a766afb7f355e64940a097 /Tools/upload.sh | |
parent | 43418a674903d242271028c4d4eb473f95a24be6 (diff) | |
download | px4-firmware-8599994ebb3e4ce63b5fe77cb1f2935d27604745.tar.gz px4-firmware-8599994ebb3e4ce63b5fe77cb1f2935d27604745.tar.bz2 px4-firmware-8599994ebb3e4ce63b5fe77cb1f2935d27604745.zip |
Add generic uploader tool
Diffstat (limited to 'Tools/upload.sh')
-rwxr-xr-x | Tools/upload.sh | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/Tools/upload.sh b/Tools/upload.sh new file mode 100755 index 000000000..17d87fe61 --- /dev/null +++ b/Tools/upload.sh @@ -0,0 +1,28 @@ +#!/bin/bash + +EXEDIR=`pwd` +BASEDIR=$(dirname $0) + +SYSTYPE=`uname -s` + +# +# Serial port defaults. +# +# XXX The uploader should be smarter than this. +# +if [ $SYSTYPE=Darwin ]; +then +SERIAL_PORTS="/dev/tty.usbmodemPX*,/dev/tty.usbmodem*" +fi + +if [ $SYSTYPE=Linux ]; +then +SERIAL_PORTS="/dev/serial/by-id/usb-3D_Robotics*" +fi + +if [ $SYSTYPE="" ]; +then +SERIAL_PORTS="COM32,COM31,COM30,COM29,COM28,COM27,COM26,COM25,COM24,COM23,COM22,COM21,COM20,COM19,COM18,COM17,COM16,COM15,COM14,COM13,COM12,COM11,COM10,COM9,COM8,COM7,COM6,COM5,COM4,COM3,COM2,COM1,COM0" +fi + +python $BASEDIR/px_uploader.py --port $SERIAL_PORTS $1
\ No newline at end of file |