codewithher / CC-Lantern

Wrapper library for programming cultural lanterns.
GNU General Public License v3.0
0 stars 0 forks source link

22 Migrate Color Wheel Activity #22 #24

Closed innaamogolonova closed 2 months ago

innaamogolonova commented 5 months ago

Why:

Closes the following issues (all PRs must close an issue):

What's being changed

Simplifies the rainbow() method in act3 examples to implement Lantern.h library, making the function easier to read.

Testing instructions

The easiest way to test is to run the rainbow method in activity 3 which double as testing files.

You can verify that the code works appropriately by visually inspecting the colors that result from the activity function calls.

Check off the following

totally-not-frito-lays commented 5 months ago

Just asking for a bit more clarity. The code works well as is really enjoyable to watch.

Something interesting I noted is that when giving invalid input (ie. negative numbers) such as rainbow(-5) the behavior here is different than from CC-Library-Lantern. In CC-Library-Lantern the behavior was rapidly changing colors. In CC-Lantern (this repo), the behavior runs slowly, starting at orange.

This may be a quirk of our implementation of the wait() wrapper function. I'll open up a ticket for this.

Opened ticket #25 for this. Bounds handling inside this function is the easiest way to resolve this for now but it may be worth some exploration to see if this occurs for other functions.

Just to clarify, this PR does not need to resolve #25.

innaamogolonova commented 4 months ago

Addressed the changes requested by: