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

Clearification on Documentation event::Event::Periodic #182

Open
Skarlett opened this issue May 10, 2023 · 1 comment
Open

Clearification on Documentation event::Event::Periodic #182

Skarlett opened this issue May 10, 2023 · 1 comment
Labels
documentation Improvements or additions to documentation events Relates to driver event handling/generation. good first issue Good for newcomers

Comments

@Skarlett
Copy link

Skarlett commented May 10, 2023

Periodic(Duration, Option<Duration>)
Periodic events rely upon two parameters: a period and an optional phase.

If the phase is None, then the event will first fire in one period. Periodic events repeat automatically so long as the action in >>> EventData returns None.

It's a bit vague, but I think I understand it best with the SongFade example. The phase is the initial waiting period before firing period at the interval specificed in a period.

I think this can be described better as

Periodic(Duration, Option<Duration>)
Periodic events rely upon two parameters: a period and an optional phase.

If the phase is None, then the event will first fire in one period. Periodic events repeat automatically so long as the action in >>> EventData returns None.

Otherwise if phase is present, then the duration of the phase is completed before firing the first period.

The terms period and phase probably should be better defined, and perhaps an illustration outlining the event timeline will satisfy

@FelixMcFelix
Copy link
Member

I agree that this is a little unclear. An ASCII diagram or similar would go a long way!

@FelixMcFelix FelixMcFelix added documentation Improvements or additions to documentation good first issue Good for newcomers events Relates to driver event handling/generation. labels May 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation events Relates to driver event handling/generation. good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants