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

Make use of LightCall::from_light_color_values for restoring state #48

Open
mmakaay opened this issue Aug 11, 2021 · 0 comments
Open

Make use of LightCall::from_light_color_values for restoring state #48

mmakaay opened this issue Aug 11, 2021 · 0 comments
Assignees

Comments

@mmakaay
Copy link
Owner

mmakaay commented Aug 11, 2021

I currently make use of the RTC state store to restore state. This method works, but is not very clean code-wise, because I need to redefine a struct in my code for decoding the RTC data.
I ran into the LightCall::from_light_color_values() method, which might make things a lot cleaner.

With the current_values of the light output, I can store the active state.
With code like this, I can restore the state:

auto call = the_light.make_call();
call.from_light_color_values(id(global_var));
call.perform();
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

No branches or pull requests

1 participant