Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blue dot in spectrum? #412

Closed
kriegsman opened this issue Feb 21, 2017 · 2 comments
Closed

Blue dot in spectrum? #412

kriegsman opened this issue Feb 21, 2017 · 2 comments

Comments

@kriegsman
Copy link
Member

@kriegsman kriegsman commented Feb 21, 2017

From G+
https://plus.google.com/u/0/102302399546211644090/posts/UoWjJcHrp6B?cfem=1

Hi!

I am using FastLED in combination with the hsv2rgb_spectrum() function. While cycling a rainbow pattern, I noticed a blue dot running across the LEDs.

https://www.youtube.com/watch?v=IYAWEHtRvAE

After further investigation it turned out that when CHSV(255, 255, 255) (red) is passed to hsv2rgb_spectrum(), consistently results in 0, 0, 251 (blue). Regardless of the saturation or value, if the hue is 255, red remains 0 and blue changes accordingly. With a hue of either 254 or 256, the result will again be red, going round as expected.

CHSV hsv = CHSV(255, 255, 255);
CRGB rgb;

hsv2rgb_spectrum(hsv, rgb); // 0, 0, 251

Am I misunderstanding how to use this function? Since CHSV(255, 255, 255) is indeed red when used on its own, I would expect a result that approaches that when converted to spectrum RGB. Thank you for your reply!

@focalintent
Copy link
Member

@focalintent focalintent commented Feb 21, 2017

Another victim of fixing scale8?

@kriegsman
Copy link
Member Author

@kriegsman kriegsman commented Feb 21, 2017

That's what I'm wondering, right?
Some times I think maybe I should save all those unit-test-y things that I've written over the years, and, you know, run them or something.
Anyway, I'll take a look at this one.

@kriegsman kriegsman closed this in 77416b5 Feb 22, 2017
adammhaile added a commit to ManiacalLabs/FastLED that referenced this issue Jul 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.