Browse Source

Use unsigned byte for weight

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

4
wii-pair/daemon.py

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

Loading…
Cancel
Save