|
|
@ -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: |
|
|
|