Added temp and water

This commit is contained in:
2026-08-08 01:05:40 +01:00
parent f8d9727a38
commit 838e253ab1
3 changed files with 43 additions and 4 deletions

View File

@@ -13,7 +13,7 @@ public class MatrixRenderer
}
//
public async Task DrawAndSendFrameAsync(float currentTemp)
public async Task DrawAndSendFrameAsync(float currentTemp, int currentWater)
//public async Task DrawAndSendFrameAsync(string currentTemp)
{
// 1. Create a 64x64 canvas
@@ -41,7 +41,8 @@ public class MatrixRenderer
// DrawText now takes the string, X, Y, the font, and the paint
//canvas.DrawText($"{currentTemp:F1}c", 4, 32, textFont, textPaint);
// DrawText now takes the string, X, Y, alignment, the font, and the paint
canvas.DrawText($"{currentTemp:F1}c", 4, 32, SKTextAlign.Left, textFont, textPaint);
canvas.DrawText($"{currentTemp:F1}c", 4, 12, SKTextAlign.Left, textFont, textPaint);
canvas.DrawText($"{currentWater:F1}%", 4, 32, SKTextAlign.Left, textFont, textPaint);
// 4. Convert 32-bit RGBA to 24-bit RGB for WLED
byte[] rgbaBytes = bitmap.Bytes;