stc15: reduce sleep after baudrate switch

We just sleep 200 ms, but apparently that's already too much with some
handshake baudrates. Cut it in half to fix
failures with "-l 9600" in some cases.

Addresses #17.
This commit is contained in:
Grigori Goronzy 2021-01-09 01:18:56 +01:00
parent 384471f765
commit 3cf2cb38e7

View File

@ -1406,7 +1406,7 @@ class Stc15Protocol(Stc15AProtocol):
response = self.read_packet()
if len(response) < 1 or response[0] != 0x01:
raise StcProtocolException("incorrect magic in handshake packet")
time.sleep(0.2)
time.sleep(0.1)
self.ser.baudrate = self.baud_transfer
def switch_baud_ext(self):
@ -1426,7 +1426,7 @@ class Stc15Protocol(Stc15AProtocol):
response = self.read_packet()
if len(response) < 1 or response[0] != 0x01:
raise StcProtocolException("incorrect magic in handshake packet")
time.sleep(0.2)
time.sleep(0.1)
self.ser.baudrate = self.baud_transfer
# for switching back to RC, program factory values