We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents b566a87 + 7c6d3fe commit d162167Copy full SHA for d162167
arduino_alvik/arduino_alvik.py
@@ -254,13 +254,19 @@ def _wait_for_ack(self) -> None:
254
sleep_ms(20)
255
self._waiting_ack = None
256
257
- def _wait_for_fw_check(self) -> bool:
+ def _wait_for_fw_check(self, timeout=5) -> bool:
258
"""
259
Waits until receives version from robot, check required version and return true if everything is ok
260
+ :param timeout: wait for fw timeout in seconds
261
:return:
262
263
+ start = ticks_ms()
264
while self._fw_version == [None, None, None]:
265
266
+ if ticks_diff(ticks_ms(), start) < timeout * 1000:
267
+ print("Could not get FW version")
268
+ return False
269
+
270
if self.check_firmware_compatibility():
271
return True
272
else:
0 commit comments