@@ -66,7 +66,7 @@ def __init__(self):
66
66
self ._bottom_tof = None
67
67
self ._linear_velocity = None
68
68
self ._angular_velocity = None
69
- self ._angular_velocity = ''
69
+ self ._last_ack = ''
70
70
self ._version = [None , None , None ]
71
71
72
72
@staticmethod
@@ -191,7 +191,7 @@ def _wait_for_ack(self) -> None:
191
191
Waits until receives 0x00 ack from robot
192
192
:return:
193
193
"""
194
- while self ._angular_velocity != 0x00 :
194
+ while self ._last_ack != 0x00 :
195
195
sleep_ms (20 )
196
196
197
197
@staticmethod
@@ -231,7 +231,7 @@ def is_target_reached(self) -> bool:
231
231
It also responds with an ack received message
232
232
:return:
233
233
"""
234
- if self ._angular_velocity != ord ('M' ) and self ._angular_velocity != ord ('R' ):
234
+ if self ._last_ack != ord ('M' ) and self ._last_ack != ord ('R' ):
235
235
sleep_ms (50 )
236
236
return False
237
237
else :
@@ -476,7 +476,7 @@ def get_ack(self):
476
476
Returns last acknowledgement
477
477
:return:
478
478
"""
479
- return self ._angular_velocity
479
+ return self ._last_ack
480
480
481
481
# def send_ack(self):
482
482
# self._packeter.packetC1B(ord('X'), ACK_)
@@ -597,7 +597,7 @@ def _parse_message(self) -> int:
597
597
_ , self ._linear_velocity , self ._angular_velocity = self ._packeter .unpacketC2F ()
598
598
elif code == ord ('x' ):
599
599
# robot ack
600
- _ , self ._angular_velocity = self ._packeter .unpacketC1B ()
600
+ _ , self ._last_ack = self ._packeter .unpacketC1B ()
601
601
elif code == ord ('z' ):
602
602
# robot ack
603
603
_ , self ._x , self ._y , self ._theta = self ._packeter .unpacketC3F ()
0 commit comments