Skip to content

Commit

Permalink
Merge pull request #55 from leewillis77/main
Browse files Browse the repository at this point in the history
Return the correct value for rgb_color in get_pixel_rgb
  • Loading branch information
tinue authored Jan 14, 2023
2 parents e963d05 + 72a5bd5 commit f35a2e1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apa102_pi/driver/apa102.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ def get_pixel_rgb(self, led_num):
output = {"rgb_color": 0, "brightness": 0}
pixel = self.get_pixel(led_num)

output["rgb_color"] = pixel["red"] << 8 | pixel["green"] << 8 | pixel["blue"]
output["rgb_color"] = pixel["red"] << 16 | pixel["green"] << 8 | pixel["blue"]
output["bright_percent"] = pixel["bright_percent"]

return output
Expand Down

0 comments on commit f35a2e1

Please sign in to comment.