Skip to content

Replace usage of millis() in effects with strip.now - sync effects across wled instances #72

@arneboe

Description

@arneboe

Is your feature request related to a problem? Please describe.
Some/most effects in FX.cpp directly use millis(). This causes problems when running several wled fixtures
that should all display the same effect. The animations of the fixtures will be out of sync because the timing on each esp is slightly different (e.g. they did not start at exactly the same microsecond).

Describe the solution you'd like
strip.now already exists and is updated on every frame. All effects should use strip.now instead of millis().
This way we gain the ability to manipulate the time.
In a second step a method to reset the time to a certain value could be implemented.
Using this method, usermods can be implemented to achieve time sync between several wled fixtures (e.g. via artnet/dmx/wifi).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestfxed in mdevfixed in latest mdev source code

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions