Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement soft artnet sync for LEDs #64

Merged
merged 8 commits into from
Feb 11, 2024
Merged

Implement soft artnet sync for LEDs #64

merged 8 commits into from
Feb 11, 2024

Conversation

SpComb
Copy link
Member

@SpComb SpComb commented Jan 16, 2024

Implement best-effort LEDs update synchronization for multiple Art-NET universes without explicit ArtSync frames (hard sync) from the sender. This attempts to match the LEDs update rate to the implicit Art-NET refresh rate, avoiding output tearing and reducing the number of LED updates for smoother results. This is particularly significant with larger numbers of LEDs where the maximum update rate is closer to the incoming Art-NET refresh rate.

When artnet_sync_timeout is configured, LED output updates are buffered until any of:

  • An explicit Art-Sync frame is received
  • All Art-NET universes have been buffered (full sync)
  • More than artnet_sync_timeout ms have passed since the first buffered Art-NET universe was received (timeout sync)
  • A second Art-NET frame was received for a buffered Art-NET universe (missed sync)

Using leds stats for testing: With an appropriate artnet_sync_timeout value matched to the expected refresh rate, this should ideally result in a leds task update rate that exactly matches the Art-NET refresh rate with zero sync misses/timeouts. However, if Art-NET frames are being dropped, or the sender is only sending Art-NET frames for some of the output universes, then the the sync missed/timeout should kick in and keep the output updating.

@SpComb SpComb merged commit d5abe73 into master Feb 11, 2024
3 checks passed
@SpComb SpComb deleted the leds-artnet-soft-sync branch February 11, 2024 10:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant