Revert backlight to active-high, implement Draw_Sunflower_Pattern boot screen for empty storage states

This commit is contained in:
drjones
2026-07-05 02:48:46 -07:00
parent 388963e067
commit bb9db04311
4 changed files with 42 additions and 6 deletions

View File

@@ -122,3 +122,38 @@ void Draw_Candle_Flicker() {
LCD_addWindow(71, 125, 101, 167, canvas);
}
void Draw_Sunflower_Pattern() {
clearScreen();
// Fill the screen with a stylized sunflower:
// Center of screen is x=86, y=160.
uint16_t line[172];
for (int y = 0; y < 320; y++) {
for (int x = 0; x < 172; x++) {
int dx = x - 86;
int dy = y - 160;
int dist2 = dx*dx + dy*dy;
if (dist2 < 30*30) {
// Sunflower center (brown)
line[x] = 0x5140; // dark brown
} else if (dist2 < 65*65 && (abs(dx) < 15 || abs(dy) < 15 || abs(dx-dy) < 12 || abs(dx+dy) < 12)) {
// Golden petals
line[x] = 0xFDA0; // Golden orange/yellow
} else if (dist2 < 70*70 && (abs(dx) < 22 || abs(dy) < 22)) {
// Outer petals highlight
line[x] = 0xFFE0; // Yellow
} else {
// Charcoal background
line[x] = 0x18C3; // Very dark warm gray
}
}
// Swap bytes for ST7789 SPI big-endian transfer
for (int x = 0; x < 172; x++) {
line[x] = __builtin_bswap16(line[x]);
}
LCD_addWindow(0, y, 171, y, line);
}
}