From ca8531cf2607508aed07fb26955530fb2b0e5848 Mon Sep 17 00:00:00 2001 From: Serge <5920850+seerge@users.noreply.github.com> Date: Sat, 27 Jan 2024 21:43:06 +0100 Subject: [PATCH] Matrix Pixel Fix --- app/AnimeMatrix/AnimeMatrixDevice.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/AnimeMatrix/AnimeMatrixDevice.cs b/app/AnimeMatrix/AnimeMatrixDevice.cs index 915d39d7..3b4c1740 100644 --- a/app/AnimeMatrix/AnimeMatrixDevice.cs +++ b/app/AnimeMatrix/AnimeMatrixDevice.cs @@ -278,7 +278,7 @@ namespace Starlight.AnimeMatrix if (x >= FirstX(y) && x < Width()) SetLedLinear(RowToLinearAddress(y) - FirstX(y) + x, value); - } + } public void SetLedDiagonal(int x, int y, byte color, int deltaX = 0, int deltaY = 0) { @@ -287,6 +287,9 @@ namespace Starlight.AnimeMatrix int plX = (x - y) / 2; int plY = x + y; + + if (x - y == -1) plX = -1; + SetLedPlanar(plX, plY, color); }