Skip to content

Commit

Permalink
Fix python2 scripts.
Browse files Browse the repository at this point in the history
  • Loading branch information
de-vri-es committed Nov 14, 2018
1 parent 5f0d4b4 commit 8fa8fdc
Show file tree
Hide file tree
Showing 38 changed files with 40 additions and 38 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ endif
.PHONY: upload-usb
upload-usb: archives all
@echo Attempting to flash $(notdir $(LEGACY_PX4)) PX4FLOW board via USB
@python -u Tools/px_uploader.py $(LEGACY_PX4) --baud 921600 --port $(SERIAL_PORTS)
@$(PYTHON) -u Tools/px_uploader.py $(LEGACY_PX4) --baud 921600 --port $(SERIAL_PORTS)


#
Expand Down
4 changes: 3 additions & 1 deletion Tools/make_can_boot_descriptor.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#!/usr/bin/env python2

import os
import sys
import subprocess
Expand Down Expand Up @@ -330,4 +332,4 @@ def app_descriptor(self, value):
"""
padding added {}
""".format(out_image.padding))


2 changes: 1 addition & 1 deletion Tools/px_mkfw.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python2
############################################################################
#
# Copyright (C) 2012, 2013 PX4 Development Team. All rights reserved.
Expand Down
2 changes: 1 addition & 1 deletion Tools/px_process_params.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python2
############################################################################
#
# Copyright (C) 2013-2014 PX4 Development Team. All rights reserved.
Expand Down
2 changes: 1 addition & 1 deletion Tools/px_uploader.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python2
############################################################################
#
# Copyright (C) 2012, 2013 PX4 Development Team. All rights reserved.
Expand Down
2 changes: 1 addition & 1 deletion makefiles/baremetal/baremetal_px4.mk
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ $(PRODUCT_BIN): $(PRODUCT_ELF)
ifdef MKUAVCANBL
ifdef MAKE_UAVCAN_BOOT_LOADABLE_ID
$(info %% Generating UAVCAN Bootable $(MAKE_UAVCAN_BOOT_LOADABLE_ID) as $(IMAGE_DIR)$(MAKE_UAVCAN_BOOT_LOADABLE_ID).$(UAVCAN_BL_EXT))
$(Q) python $(MKUAVCANBL) -v --use-git-hash $@ $(IMAGE_DIR)$(MAKE_UAVCAN_BOOT_LOADABLE_ID).$(UAVCAN_BL_EXT)
$(Q) $(PYTHON) $(MKUAVCANBL) -v --use-git-hash $@ $(IMAGE_DIR)$(MAKE_UAVCAN_BOOT_LOADABLE_ID).$(UAVCAN_BL_EXT)
endif
endif

Expand Down
2 changes: 1 addition & 1 deletion makefiles/setup.mk
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export FIND = find
export ECHO = echo
export UNZIP_CMD = unzip
export ZIP_CMD = zip
export PYTHON = python
export PYTHON = python2
export OPENOCD = openocd
export GREP = grep
export PATCH = patch
Expand Down
2 changes: 1 addition & 1 deletion mavlink/share/pyshared/pymavlink/examples/apmsetrate.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python2

'''
set stream rate on an APM
Expand Down
2 changes: 1 addition & 1 deletion mavlink/share/pyshared/pymavlink/examples/bwtest.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python2

'''
check bandwidth of link
Expand Down
2 changes: 1 addition & 1 deletion mavlink/share/pyshared/pymavlink/examples/flightmodes.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python2

'''
show changes in flight modes
Expand Down
2 changes: 1 addition & 1 deletion mavlink/share/pyshared/pymavlink/examples/flighttime.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python2

'''
work out total flight time for a mavlink log
Expand Down
2 changes: 1 addition & 1 deletion mavlink/share/pyshared/pymavlink/examples/gpslock.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python2

'''
show GPS lock events in a MAVLink log
Expand Down
2 changes: 1 addition & 1 deletion mavlink/share/pyshared/pymavlink/examples/magfit.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python2

'''
fit best estimate of magnetometer offsets
Expand Down
2 changes: 1 addition & 1 deletion mavlink/share/pyshared/pymavlink/examples/magfit_delta.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python2

'''
fit best estimate of magnetometer offsets using the algorithm from
Expand Down
2 changes: 1 addition & 1 deletion mavlink/share/pyshared/pymavlink/examples/magfit_gps.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python2

'''
fit best estimate of magnetometer offsets
Expand Down
2 changes: 1 addition & 1 deletion mavlink/share/pyshared/pymavlink/examples/magtest.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python2

'''
rotate APMs on bench to test magnetometers
Expand Down
2 changes: 1 addition & 1 deletion mavlink/share/pyshared/pymavlink/examples/mavgraph.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python2
'''
graph a MAVLink log file
Andrew Tridgell August 2011
Expand Down
2 changes: 1 addition & 1 deletion mavlink/share/pyshared/pymavlink/examples/mavlogdump.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python2

'''
example program that dumps a Mavlink log file. The log file is
Expand Down
2 changes: 1 addition & 1 deletion mavlink/share/pyshared/pymavlink/examples/mavparms.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python2

'''
extract mavlink parameter values
Expand Down
2 changes: 1 addition & 1 deletion mavlink/share/pyshared/pymavlink/examples/mavtest.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python2

import sys, os

Expand Down
2 changes: 1 addition & 1 deletion mavlink/share/pyshared/pymavlink/examples/mavtester.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python2

'''
test mavlink messages
Expand Down
2 changes: 1 addition & 1 deletion mavlink/share/pyshared/pymavlink/examples/mavtogpx.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python2

'''
example program to extract GPS data from a mavlink log, and create a GPX
Expand Down
2 changes: 1 addition & 1 deletion mavlink/share/pyshared/pymavlink/examples/rotmat.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python2
#
# vector3 and rotation matrix classes
# This follows the conventions in the ArduPilot code,
Expand Down
2 changes: 1 addition & 1 deletion mavlink/share/pyshared/pymavlink/examples/sigloss.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python2

'''
show times when signal is lost
Expand Down
2 changes: 1 addition & 1 deletion mavlink/share/pyshared/pymavlink/examples/wptogpx.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python2

'''
example program to extract GPS data from a waypoint file, and create a GPX
Expand Down
2 changes: 1 addition & 1 deletion mavlink/share/pyshared/pymavlink/fgFDM.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python2
# parse and construct FlightGear NET FDM packets
# Andrew Tridgell, November 2011
# released under GNU GPL version 2 or later
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python2
'''
Use mavgen.py matrixpilot.xml definitions to generate
C and Python MAVLink routines for sending and parsing the protocol
Expand Down
2 changes: 1 addition & 1 deletion mavlink/share/pyshared/pymavlink/generator/gen_all.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python2

'''
Use mavgen.py on all available MAVLink XML definitions to generate
Expand Down
2 changes: 1 addition & 1 deletion mavlink/share/pyshared/pymavlink/generator/mavgen.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python2
'''
parse a MAVLink protocol XML file and generate a python implementation
Expand Down
2 changes: 1 addition & 1 deletion mavlink/share/pyshared/pymavlink/generator/mavgen_c.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python2
'''
parse a MAVLink protocol XML file and generate a C implementation
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python2
'''
parse a MAVLink protocol XML file and generate a python implementation
Expand Down
2 changes: 1 addition & 1 deletion mavlink/share/pyshared/pymavlink/generator/mavparse.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python2
'''
mavlink python parse functions
Expand Down
2 changes: 1 addition & 1 deletion mavlink/share/pyshared/pymavlink/generator/mavtemplate.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python2
'''
simple templating system for mavlink generator
Expand Down
2 changes: 1 addition & 1 deletion mavlink/share/pyshared/pymavlink/generator/mavtestgen.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python2
'''
generate a MAVLink test suite
Expand Down
2 changes: 1 addition & 1 deletion mavlink/share/pyshared/pymavlink/mavextra.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python2
'''
useful extra functions for use by mavlink clients
Expand Down
2 changes: 1 addition & 1 deletion mavlink/share/pyshared/pymavlink/mavutil.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python2
'''
mavlink python utility functions
Expand Down
2 changes: 1 addition & 1 deletion mavlink/share/pyshared/pymavlink/scanwin32.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python2

# this is taken from the pySerial documentation at
# http://pyserial.sourceforge.net/examples.html
Expand Down
2 changes: 1 addition & 1 deletion mavlink/share/pyshared/pymavlink/tools/mavplayback.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python2

'''
play back a mavlink log as a FlightGear FG NET stream, and as a
Expand Down

0 comments on commit 8fa8fdc

Please sign in to comment.