synchrobike
synchrobike copied to clipboard
Nodes randomly become out of sync
Description
I suspect that there is an underlying issue with the LEDs and the mesh network's 'node time' determination that is being causes by interrupts being needed for the mesh networks 'node time' / wifi communication and the WS2811 LEDs probably disabling interrupts via FASTLED_ESP8266_DMA
Investigation
The below log outputs show an instance when a node becomes out of sync (milliseconds in the log are mesh.getNodeTime() / 1000)
Node jumps: +5s
Node jumps: -9s
Notes:
- No
onNodeTimeAdjustedis logged when mesh time changes - After disabling all led functionality the issue no longer seems to appear
Solution
Possible solutions might be:
- Use 2 wire strips to avoid bit banging / process intensive and time sensitive animation writes and would possibly allow us to avoid disabling interrupts
- Keep track of node time outside of the mesh library and only update it when
onNodeTimeAdjustedis called
Possible solution to test: https://github.com/FastLED/FastLED/issues/1415