Repository navigation
fix: give the Dot its own busy program - #7
Merged
Merged
Conversation
The busy program rolls a four-LED comet along the strip. The Dot has two LEDs, so it showed only a slice of the comet, and the LEDs looked like they flickered. On a PulseDot volume, the plugin now writes a two-LED program. Both LEDs pulse cyan, the second one 260 ms after the first, like upstream cyan-roll-2.LED. The other programs do not use LED positions, so they stay the same on both devices.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
In direct mode, the busy program rolls a four-LED comet along the strip. The SidePulse Pro has eight LEDs, so the comet moves smoothly. The SidePulse Dot has two LEDs. It shows only a slice of the comet, and each LED is dark for most of the cycle, so the LEDs look like they flicker.
This change adds a two-LED busy program for the Dot. Both LEDs pulse cyan, and the second LED starts 260 ms after the first. Upstream SidePulse uses the same pattern in
cyan-roll-2.LED.The plugin selects the program from the volume name. A volume whose name starts with
PulseDotgets the Dot program. Every other device gets the comet. The idle, waiting, error, and done programs do not use LED positions, so they do not change.The
brightnessoption applies to the Dot program too. The self-check inplugin.mjsmakes sure that the Dot program stays within the controller limits. The version changes to 0.4.1, so the merge publishes the release.Test
Run these commands from the repository root, on the
dot-busy-programbranch:npm test node test/run.mjs DotThe first command shows
69 of 69 passed. The second command shows2 of 2 passed.To see the program on a real Dot, connect the Dot, stop the SidePulse service, and run:
The busy state shows two cyan pulses, one after the other, with no flicker.