Closed kevin-tritz closed 4 months ago
@dhalbert I would assume we would want to do the same work to ESP32SPI
to keep them similar, but worry about adding adafruit_ticks
as another frozen library. Thoughts?
@dhalbert I would assume we would want to do the same work to
ESP32SPI
to keep them similar, but worry about addingadafruit_ticks
as another frozen library. Thoughts?
adafruit_ticks.mpy
is only 634 bytes, so I think that's fine.
Time monotonic continues to lose precision as uptime gets longer. This will cause spurious timeouts to occur after a few days depending on the duration of the socket timeout (e.g. 100msec), but will cause spurious timeouts even at 1sec if the uptime gets long enough. I've replaced all of the time.monotonics with adafruit_ticks.ticks_ms and the appropriate tick_diff math to compare with timeouts. This could also be fixed by using time.monotonic_ns as long as the nanosecond ints were subtracted from each other first before being divided into float seconds. Closes #152