@ -190,6 +190,20 @@ try:
r = b''
for w in wiis:
if m[0] == ord('w'):
# Return weight
v = 0
if w.weight is not None:
v = round(w.weight)
r += struct.pack('b', v)
elif m[0] == ord('b'):
# Return battery
if w.board.battery is not None:
v = round(w.board.battery*100)
else:
# Return balance
if w.pos_x is None:
v = -128