synchrobike icon indicating copy to clipboard operation
synchrobike copied to clipboard

Nodes randomly become out of sync

Open jsonpoindexter opened this issue 1 year ago • 1 comments

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 unknown (4)

Node jumps: -9s unknown

Notes:

  • No onNodeTimeAdjusted is 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 onNodeTimeAdjusted is called

jsonpoindexter avatar Aug 21 '24 14:08 jsonpoindexter

Possible solution to test: https://github.com/FastLED/FastLED/issues/1415

jsonpoindexter avatar Sep 04 '24 19:09 jsonpoindexter