Skip to content

Commit 80b0c4d

Browse files
committed
Reapply "Shorten device-info wait and set binary time"
This reverts commit d0de9e7.
1 parent d0de9e7 commit 80b0c4d

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

src/explorepy/explore.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,11 +106,12 @@ def connect(self, device_name=None, mac_address=None, file_path=None):
106106
cnt_limit = 20 if self.debug else 15
107107
while "adc_mask" not in self.stream_processor.device_info:
108108
logger.info("Waiting for device info packet...")
109-
time.sleep(1)
109+
time.sleep(.5)
110110
if cnt >= cnt_limit:
111111
raise ConnectionAbortedError(
112112
"Could not get info packet from the device")
113113
cnt += 1
114+
self.set_binary_time()
114115
if self.stream_processor.device_info['is_imp_mode'] is True:
115116
self.stream_processor.disable_imp()
116117
logger.info(
@@ -659,8 +660,6 @@ def set_binary_time(self):
659660
Returns:
660661
bool: True for success, False otherwise
661662
"""
662-
self._check_connection()
663-
664663
cmd = SetBinaryTime(self)
665664
if self.stream_processor.configure_device(cmd):
666665
logger.info('Device set to current time.')

0 commit comments

Comments
 (0)