You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
nLineCountTimeout=50# maximum number of lines read before timeout
170
170
lineCounter=0
171
-
lastTransmisionSuccess=True
172
-
173
-
qeueIdSuccess= {}
174
-
timeLastTrasmissionWasAsked=time.time()
175
-
t0=time.time()
176
171
whileself.running:
177
172
178
173
# Check if the last command went through successfully
179
-
ifcurrentIdentifierisnotNone:
180
-
try:
181
-
lastTransmisionSuccess=qeueIdSuccess[str(currentIdentifier)][0] # contains the success of the last transmission
182
-
timeLastTrasmissionWasAsked=qeueIdSuccess[str(currentIdentifier)][1] # contains the time when the last transmission was asked in case we need to timeout
183
-
iftime.time() -timeLastTrasmissionWasAsked>0.1: #timeout to wait until ESP32 responds
184
-
lastTransmisionSuccess=True# something went wrong, we have to free serial now!
185
-
exceptExceptionase:
186
-
time.sleep(0.01) # add an artifical delay in case the esp32 did reply but we didn't catch it and then free the serial connection
0 commit comments