Verified Commit def4a2bb authored by Clayton Craft's avatar Clayton Craft
Browse files

stm_agps: readjust/shorten delay in readline()

So 500ms was too long.. the app would fall too far behind reading
messages from the device that it couldn't validate commands it sent to
the device in time (e.g. setting time, pulling almanac, etc)

100ms seems to work, CPU usage for the app is 3-5% on a librem 5 though
when it's actively servicing a client..
parent 99a74adf
......@@ -59,7 +59,7 @@ class STM_AGPS:
else:
self._buf.extend(data)
# sleep to prevent spinning faster than the device can write
await trio.sleep(0.5)
await trio.sleep(0.1)
async def _write(self, data):
await self._ser.write(data)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment