mirror of
https://github.com/andvikt/mega_hacs.git
synced 2025-12-11 17:14:28 +05:00
- fix order for ws28xx
This commit is contained in:
@@ -1,5 +1,15 @@
|
||||
from itertools import permutations
|
||||
order ='brg'
|
||||
rgb = 'rgb'
|
||||
|
||||
RGB_COMBINATIONS = [''.join(x) for x in permutations('rgb')]
|
||||
map_to_order = [rgb.index(x) for x in order]
|
||||
map_from_order = [order.index(x) for x in rgb]
|
||||
|
||||
print(RGB_COMBINATIONS)
|
||||
|
||||
_rgb = [
|
||||
rgb[x] for x in map_to_order
|
||||
]
|
||||
_order = [
|
||||
_rgb[x] for x in map_from_order
|
||||
]
|
||||
|
||||
print(_rgb, _order)
|
||||
Reference in New Issue
Block a user