Skip to content

Commit

Permalink
Merge pull request schodet#139 from dlech/fix-bt
Browse files Browse the repository at this point in the history
fix TypeError when connecting via Bluetooth
  • Loading branch information
GoldSloth authored Apr 28, 2018
2 parents 4e92a66 + e8e2ead commit 754b908
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions nxt/bluesock.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,13 @@ def send(self, data):

def recv(self):
data = self.sock.recv(2)
l0 = ord(data[0])
l1 = ord(data[1])
l0 = data[0]
l1 = data[1]
plen = l0 + (l1 << 8)
data = self.sock.recv(plen)
if self.debug:
print('Recv:', end=' ')
print(':'.join('%02x' % ord(c) for c in data))
print(':'.join('%02x' % c for c in data))
return data

def _check_brick(arg, value):
Expand Down

0 comments on commit 754b908

Please sign in to comment.