Skip to content
This repository has been archived by the owner on Nov 18, 2020. It is now read-only.

Always start modes with initial settings #32

Merged
merged 1 commit into from
Dec 31, 2019

Conversation

LarsMichelsen
Copy link
Collaborator

In previous versions the board kept runtime information per mode
when switching between modes. This could have odd effects, for
example the "color wipe" mode could be invisible for some time
when it was in the "fade out" phase when switching to the mode.

@LarsMichelsen
Copy link
Collaborator Author

LarsMichelsen commented Dec 15, 2019

Please do not merge this for the moment. I just recognized that the reset is not good for the options that are persisted in the config :). Will fix this first and update the PR.

In previous versions the board kept runtime information per mode when
switching between modes. This could have odd effects, for example the
"color wipe" mode could be invisible for some time when it was in the
"fade out" phase when switching to the mode.

This change now separates the mode member variables into two categories:

Config: These are initialized with their default values at class level
once and need to be overridden with the applyConfig() method.

State: These are not allowed to be persisted with the config and may
change at any time during animation. They need to be initialized in the
initialize() method.
@LarsMichelsen
Copy link
Collaborator Author

Just updated this PR. Feel free to try / merge.

@thebigpotatoe thebigpotatoe added the enhancement New feature or request label Dec 30, 2019
@thebigpotatoe
Copy link
Owner

Looks good, but will need to merge with #36. I'll hold off for now.

@thebigpotatoe
Copy link
Owner

Decided to merge this, works great and i think it will be important to have for the library restructure.

@thebigpotatoe thebigpotatoe merged commit e3be723 into thebigpotatoe:master Dec 31, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants