diff options
author | Lorenz Meier <lm@inf.ethz.ch> | 2014-07-15 22:07:03 +0200 |
---|---|---|
committer | Lorenz Meier <lm@inf.ethz.ch> | 2014-07-15 22:07:03 +0200 |
commit | e696ed5509d001e181c33a2379d634e76190c42a (patch) | |
tree | 8fd3e88c0782ceb90e6b9589daa1290d548058fd /Tools | |
parent | 79aa600d29c66e4619aacf73e71e51df13560205 (diff) | |
parent | 619433d36911b9c3923bae666d3632beb713935f (diff) | |
download | px4-firmware-e696ed5509d001e181c33a2379d634e76190c42a.tar.gz px4-firmware-e696ed5509d001e181c33a2379d634e76190c42a.tar.bz2 px4-firmware-e696ed5509d001e181c33a2379d634e76190c42a.zip |
Merged master
Diffstat (limited to 'Tools')
-rwxr-xr-x | Tools/check_submodules.sh | 56 | ||||
-rw-r--r-- | Tools/px_generate_xml.sh | 2 | ||||
-rwxr-xr-x | Tools/px_uploader.py | 7 |
3 files changed, 65 insertions, 0 deletions
diff --git a/Tools/check_submodules.sh b/Tools/check_submodules.sh new file mode 100755 index 000000000..8adc6b6c7 --- /dev/null +++ b/Tools/check_submodules.sh @@ -0,0 +1,56 @@ +#!/bin/sh + +[ -n "$GIT_SUBMODULES_ARE_EVIL" ] && { + # GIT_SUBMODULES_ARE_EVIL is set, meaning user doesn't want submodules + echo "Skipping submodules. NUTTX_SRC is set to $NUTTX_SRC" + exit 0 +} + +if [ -d NuttX/nuttx ]; + then + STATUSRETVAL=$(git submodule summary | grep -A20 -i "NuttX" | grep "<") + if [ -z "$STATUSRETVAL" ]; then + echo "Checked NuttX submodule, correct version found" + else + echo "" + echo "" + echo " NuttX sub repo not at correct version. Try 'git submodule update'" + echo " or follow instructions on http://pixhawk.org/dev/git/submodules" + echo "" + echo " DO NOT FORGET TO RUN 'make distclean && make archives' AFTER EACH NUTTX UPDATE!" + echo "" + echo "" + echo "New commits required:" + echo "$(git submodule summary)" + echo "" + exit 1 + fi +else + git submodule init; + git submodule update; +fi + + +if [ -d mavlink/include/mavlink/v1.0 ]; + then + STATUSRETVAL=$(git submodule summary | grep -A20 -i "mavlink/include/mavlink/v1.0" | grep "<") + if [ -z "$STATUSRETVAL" ]; then + echo "Checked mavlink submodule, correct version found" + else + echo "" + echo "" + echo "mavlink sub repo not at correct version. Try 'git submodule update'" + echo "or follow instructions on http://pixhawk.org/dev/git/submodules" + echo "" + echo "" + echo "New commits required:" + echo "$(git submodule summary)" + echo "" + exit 1 + fi +else + git submodule init; + git submodule update; +fi + +exit 0 diff --git a/Tools/px_generate_xml.sh b/Tools/px_generate_xml.sh new file mode 100644 index 000000000..65f0c95da --- /dev/null +++ b/Tools/px_generate_xml.sh @@ -0,0 +1,2 @@ +#!/bin/sh +python px_process_params.py --xml diff --git a/Tools/px_uploader.py b/Tools/px_uploader.py index 985e6ffd9..cd7884f6d 100755 --- a/Tools/px_uploader.py +++ b/Tools/px_uploader.py @@ -63,6 +63,7 @@ import zlib import base64 import time import array +import os from sys import platform as _platform @@ -449,6 +450,12 @@ parser.add_argument('--baud', action="store", type=int, default=115200, help="Ba parser.add_argument('firmware', action="store", help="Firmware file to be uploaded") args = parser.parse_args() +# warn people about ModemManager which interferes badly with Pixhawk +if os.path.exists("/usr/sbin/ModemManager"): + print("==========================================================================================================") + print("WARNING: You should uninstall ModemManager as it conflicts with any non-modem serial device (like Pixhawk)") + print("==========================================================================================================") + # Load the firmware file fw = firmware(args.firmware) print("Loaded firmware for %x,%x, waiting for the bootloader..." % (fw.property('board_id'), fw.property('board_revision'))) |