This commit is contained in:
Constantin Gierczak--Galle 2023-12-15 11:17:19 +01:00
parent f014c52c7b
commit 844bf74f54

View file

@ -55,8 +55,8 @@ class Filling(Enum):
def widen(colors: List[Color], width: int): def widen(colors: List[Color], width: int):
L = [] L = []
map(L.extend, [[e] * width for e in colors]) return map(L.extend, [[e] * width for e in colors])
return L
def blendLedBar_simple(colors: List[Color], def blendLedBar_simple(colors: List[Color],
length: int, length: int,
@ -83,9 +83,6 @@ def blendLedBar_simple(colors: List[Color],
gap = length - total_len * factor gap = length - total_len * factor
# TODO: Add GREATEST
# The idea is to first add a repetition to the already longest
# repetition to hurt the color ratio as little as possible
if gap == 0: if gap == 0:
return reduplicate(deduped, rep_nb) return reduplicate(deduped, rep_nb)
# If there is still # If there is still