Added temp and water
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user