aboutsummaryrefslogtreecommitdiff
path: root/Tools
diff options
context:
space:
mode:
authorLorenz Meier <lm@inf.ethz.ch>2014-02-09 18:34:54 +0100
committerLorenz Meier <lm@inf.ethz.ch>2014-02-09 18:34:54 +0100
commit70964dd87c72b2b9bd475645654e894ba827ac64 (patch)
tree233e68587abfabe7cb77383804b948f9d54adef6 /Tools
parentf52f15c7914983ea1569e584e516d53d21cdde56 (diff)
downloadpx4-firmware-70964dd87c72b2b9bd475645654e894ba827ac64.tar.gz
px4-firmware-70964dd87c72b2b9bd475645654e894ba827ac64.tar.bz2
px4-firmware-70964dd87c72b2b9bd475645654e894ba827ac64.zip
Update upload script from bootloader repo
Diffstat (limited to 'Tools')
-rwxr-xr-xTools/px_uploader.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/Tools/px_uploader.py b/Tools/px_uploader.py
index 23dc48450..e4a8b3c05 100755
--- a/Tools/px_uploader.py
+++ b/Tools/px_uploader.py
@@ -381,7 +381,7 @@ class uploader(object):
for byte in range(0,32*6,4):
x = self.__getOTP(byte)
self.otp = self.otp + x
- print(binascii.hexlify(x).decode('utf-8') + ' ', end='')
+ print(binascii.hexlify(x).decode('Latin-1') + ' ', end='')
# see src/modules/systemlib/otp.h in px4 code:
self.otp_id = self.otp[0:4]
self.otp_idtype = self.otp[4:5]
@@ -389,17 +389,17 @@ class uploader(object):
self.otp_pid = self.otp[12:8:-1]
self.otp_coa = self.otp[32:160]
# show user:
- print("type: " + self.otp_id.decode('utf-8'))
- print("idtype: " + binascii.b2a_qp(self.otp_idtype).decode('utf-8'))
- print("vid: " + binascii.hexlify(self.otp_vid).decode('utf-8'))
- print("pid: "+ binascii.hexlify(self.otp_pid).decode('utf-8'))
- print("coa: "+ binascii.b2a_base64(self.otp_coa).decode('utf-8'))
+ print("type: " + self.otp_id.decode('Latin-1'))
+ print("idtype: " + binascii.b2a_qp(self.otp_idtype).decode('Latin-1'))
+ print("vid: " + binascii.hexlify(self.otp_vid).decode('Latin-1'))
+ print("pid: "+ binascii.hexlify(self.otp_pid).decode('Latin-1'))
+ print("coa: "+ binascii.b2a_base64(self.otp_coa).decode('Latin-1'))
print("sn: ", end='')
for byte in range(0,12,4):
x = self.__getSN(byte)
x = x[::-1] # reverse the bytes
self.sn = self.sn + x
- print(binascii.hexlify(x).decode('utf-8'), end='') # show user
+ print(binascii.hexlify(x).decode('Latin-1'), end='') # show user
print('')
print("erase...")
self.__erase()