Browse Source

Use unsigned byte for weight

master
klonfish 8 years ago committed by klonfish
parent
commit
5d6c66d167
  1. 4
      wii-pair/daemon.py

4
wii-pair/daemon.py

@ -200,13 +200,13 @@ try:
v = 0 v = 0
if w.weight is not None: if w.weight is not None:
v = round(w.weight) v = round(w.weight)
r += struct.pack('b', v) r += struct.pack('B', v)
elif m[0] == ord('b'): elif m[0] == ord('b'):
# Return battery # Return battery
v = 0 v = 0
if w.board.battery is not None: if w.board.battery is not None:
v = round(w.board.battery*100) v = round(w.board.battery*100)
r += struct.pack('b', v) r += struct.pack('B', v)
else: else:
# Return balance # Return balance
if w.pos_x is None: if w.pos_x is None:

Loading…
Cancel
Save