diff --git a/tools/can_example.py b/tools/can_example.py index f6ce94f2..d44a5033 100644 --- a/tools/can_example.py +++ b/tools/can_example.py @@ -18,7 +18,7 @@ print("Waiting for calibration to finish...") while True: msg = bus.recv() if msg.arbitration_id == (axisID << 5 | 0x01): - current_state = msg.data[4] | msg.data[5] << 8 | msg.data[6] << 16 | msg.data[7] << 24 + current_state = msg.data[4] if current_state == 0x1: print("\nAxis has returned to Idle state.") break @@ -50,4 +50,4 @@ for msg in bus: print("Axis has entered closed loop") else: print("Axis failed to enter closed loop") - break \ No newline at end of file + break