force device to rsync on serial port

This commit is contained in:
Kevin Hester
2021-05-03 17:06:45 +08:00
parent 895315f64d
commit d6fff6cc02
3 changed files with 39 additions and 33 deletions

View File

@@ -780,8 +780,8 @@ class StreamInterface(MeshInterface):
"""
# Send some bogus UART characters to force a sleeping device to wake, and if the reading statemachine was parsing a bad packet make sure
# we write enought start bytes to force it to resync
p = bytearray([START1] * 32)
# we write enought start bytes to force it to resync (we don't use START1 because we want to ensure it is looking for START1)
p = bytearray([START2] * 32)
self._writeBytes(p)
time.sleep(0.1) # wait 100ms to give device time to start running