Another rgb pulse revision, fix unit tests, update package version#26
Merged
fisher-alice merged 4 commits intomainfrom Dec 12, 2022
Merged
Another rgb pulse revision, fix unit tests, update package version#26fisher-alice merged 4 commits intomainfrom
fisher-alice merged 4 commits intomainfrom
Conversation
sanchitmalhotra126
approved these changes
Dec 10, 2022
| } | ||
| }, | ||
| update: { | ||
| writable: true, |
There was a problem hiding this comment.
Is this needed for testing?
This was referenced Dec 12, 2022
Merged
8 tasks
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.
This PR does the following:
Rgbclasspulsemethodtest/rgb.collection.jsandtest/rgb.jsfilesRgbclasspulsemethodThe update to
pulsemethod address the situation whenon()is called while theRgbis pulsing. Beforehand, theRgbwould emit RGB values in thetweenstate of thepulseanimation. Now theRgbwill emit the RGB values stored byprev.Screencast video before update:
before.update.-.on.mp4
Screencast video after update:
after.update.-.on.mp4
Testing
The unit tests that tested
Animation.renderintest/rgb.collection.jswere revised sinceAnimation.renderwas updated by this PR. Instead ofcolor(), theupdatemethod is called.Three tests broke when
gruntwas run.These tests are now fixed and handful of new tests were added in
test/rgb.jsfor thepulsemethod in theRgbclass.Follow-up
I posted 3 PRs to mainline johnny-five so that we can hopefully move to using mainline johnny-five in the future.
Add option to round scaled sensor values - PR
Modify Animation temporalTTL so that it is configurable - PR
Adding a pulse method to the RGB class - PR
For the first 2 PRs, the implementations were a bit different from those for the forked code-dot-org/johnny-five in that the customizations were made to be configurable.
In the case that not all Code.org customizations are approved, we could plan to create a johnny-five wrapper so that we can still use mainline johnny-five and not have to maintain a forked project.
Here is a write-up of the costs/benefits of using mainline vs maintaining forked project.
This is the original investigation in moving off the johnny-five fork.