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

Function getNearestToAngleAndLevel(uint8_t angle, uint8_t level) still return numbers below 255 #36

Open
eziologico opened this issue Dec 8, 2020 · 1 comment

Comments

@eziologico
Copy link

Hi,
I'm using your great project since years but the mentioned function involved in Meteors effects still doesn't work properly.
I have a tree with 350 Leds and the last part of Leds (above 255) ar not involved in those effects.
Debuging the funtion with a Serial.println(nearestIndex) the number of Led never goes above 255.
Maybe it's stil a bug related to more then 255 Leds...

Thank you for your help,
Ezio

@eziologico
Copy link
Author

For those who want to solve this problem.
I finally found the problem, it's in line 120 of Map.h file, uint8_t` nearestIndex = 0;
It must be uint16_t as i is uint16_t and compared to NUM_LEDS and then nearestIndex assume the value of i.
There is still an issue in Meteors.h as the LEDs of level "0" are not involved in the effects, I'll continue investigating...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant