Skip to content

Commit 3a97d2a

Browse files
chore: added new waiting
Update sas.py
2 parents 84b42bc + c48ed0b commit 3a97d2a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

sas.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ def __init__(
3636
key="44", # Key
3737
debug_level="DEBUG", # Debug Level
3838
perpetual=False, # When this is true the lib will try forever to connect to the serial
39-
check_last_transaction = True
39+
check_last_transaction = True,
40+
wait_for_wake_up = 0.01
4041
):
4142
# Let's address some internal var
4243
self.poll_timeout = timeout
@@ -51,6 +52,7 @@ def __init__(
5152
self.my_key = key
5253
self.poll_address= poll_address
5354
self.perpetual = perpetual
55+
self.wait_for_wake_up = wait_for_wake_up
5456

5557
# Init the Logging system
5658
self.log = log_to_stderr()
@@ -175,7 +177,7 @@ def _send_command(
175177

176178
self.connection.flush()
177179
self.connection.parity = serial.PARITY_SPACE
178-
180+
time.sleep(self.wait_for_wake_up)
179181
self.connection.write((buf_header[1:]))
180182

181183
except Exception as e:

0 commit comments

Comments
 (0)