Skip to content

Commit ec41cc9

Browse files
committed
Fix exception when using Nearest LedCountHandling
1 parent a788fc5 commit ec41cc9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Source/TTController.Service/TTService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ void ApplyConfig(IDictionary<PortIdentifier, List<LedColor>> colorMap)
370370
var newColors = new List<LedColor>();
371371
for (var i = 0; i < config.LedCount; i++) {
372372
var idx = (int)Math.Round((i / (config.LedCount - 1d)) * (colors.Count - 1d));
373-
newColors.Add(colors[i]);
373+
newColors.Add(colors[idx]);
374374
}
375375

376376
colors = newColors;

0 commit comments

Comments
 (0)