Repository navigation
BetterLightStrips 1.2.0
The following changes to the engine have been made:
- Fixed a bug with multiple strip segments that would re-initialize a pattern twice during a state change. This was due to a reference-equals being used when a value-equals was proper.
- Fixed a bug with a transition being applied to multiple segments overriding itself. This was a bug caused by invoking a global state change request in the scheduler, rather than a state request for a specific segment.
- Patterns and transitions now have independent instances for independent light strips. This fixes some bugs and overall makes things smoother.
- This introduces a minor breaking change!
The following patterns have been added:
GradientLightPattern: A very powerful light pattern that can display pretty much any form of linear gradient, and even allows for an animation between multiple gradients over time.- Also created the
Gradientobject model.
- Also created the
The following transitions have been added:
RandomLightTransition: A transition that flips pixels at random from one pattern to the next. Can optionally flash to a specified color before switching, and the amount of pixels per tick can be changed.
Breaking Changes
From 1.1: Because patterns are now separate instances for each segment, a Supplier<LightPattern> is now being used in the .withStateAll() and .withTransitionAll() methods to replace the original, single instance LightPattern argument.
If you are using your configuration class in the standard way, the changes are quite minimal.
LightScheduler.configure()
//.withStateAll("patternA", // previous
.withStateAll("patternA", () -> // new
new SolidLightPattern(Color.kRed))
//.withTransitionAll("patternA", "patternB", // previous
.withTransitionAll("patternA, "patternB", () -> // new
new FadeLightTransition()
.withColor(Color.kWhite))
//.withUnknownBehavior( // previous
.withUnknownBehavior(() -> // new
new RandomLightPattern());To install: Extract betterlights.v1.2.0.zip and place the net/betterlights directory in your src folder.