Closed leewillis77 closed 1 year ago
Fixes the issue where get_pixel_rgb() returns an incorrect value for rgb_color due to a bit-shifting error.
Script to show the issue:
#!/usr/bin/python3 from apa102_pi.driver import apa102 strip = apa102.APA102(30, 'rgb') strip.clear_strip() strip.set_pixel_rgb(1, 8421504, bright_percent=100) stored_data = strip.get_pixel_rgb(1) print('color returned: ' + str(stored_data['rgb_color']))
The expected output is: color returned: 8421504
color returned: 8421504
The actual output is: color returned: 32896
color returned: 32896
Thanks for the quick merge & release!
Fixes the issue where get_pixel_rgb() returns an incorrect value for rgb_color due to a bit-shifting error.
Script to show the issue:
The expected output is:
color returned: 8421504
The actual output is:
color returned: 32896