Skip to content

Commit

Permalink
Fix regarding unicolor when luminosity not 100%
Browse files Browse the repository at this point in the history
  • Loading branch information
Cherozene committed Sep 14, 2021
1 parent a5d849a commit e0d2d1e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ihm/scripts/ambi_fixe.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
def set_unicolor_leds(n_leds, r, g, b, ser):
data = ''
for i in range(n_leds):
data += '{},{},{},{};'.format(i, r*LUMINOSITY, g*LUMINOSITY, b*LUMINOSITY)
data += '{},{},{},{};'.format(i, int(r*LUMINOSITY), int(g*LUMINOSITY), int(b*LUMINOSITY))
data += '!' # délimiteur pour Arduino
#print(data)
send_data(ser, data)
Expand Down

0 comments on commit e0d2d1e

Please sign in to comment.