new rendering engine

This commit is contained in:
2026-06-19 02:55:33 +02:00
parent 0a90d6a5d7
commit 81a4167382
53 changed files with 1668 additions and 378 deletions

View File

@@ -3,7 +3,7 @@ use std::thread;
use esp_idf_hal::io::Write;
use esp_idf_svc::http::server::{Configuration as HttpConfig, EspHttpServer};
use esp_idf_svc::nvs::{EspNvsPartition, NvsDefault};
use client_domain::{BoundingBox, DisplayPort};
use client_domain::{BoundingBox, Color, DisplayPort, FontSize};
use log::{info, error};
use super::{DeviceConfig, save_config};
@@ -190,12 +190,14 @@ fn hex_val(b: u8) -> Option<u8> {
}
const FULL_SCREEN: BoundingBox = BoundingBox { x: 0, y: 0, width: 320, height: 240 };
const WHITE: Color = Color(0xFF, 0xFF, 0xFF);
const DARK_BG: Color = Color(0x08, 0x10, 0x18);
fn draw_setup_screen<D: DisplayPort>(display: &mut D) {
let _ = display.fill_background(FULL_SCREEN);
let _ = display.draw_text("K-Frame Setup", 0, 0, BoundingBox { x: 80, y: 50, width: 160, height: 20 });
let _ = display.draw_text("Connect to WiFi:", 0, 0, BoundingBox { x: 40, y: 90, width: 240, height: 14 });
let _ = display.draw_text("KFrame-Setup", 0, 0, BoundingBox { x: 80, y: 110, width: 160, height: 14 });
let _ = display.draw_text("Then open browser", 0, 0, BoundingBox { x: 40, y: 150, width: 240, height: 14 });
let _ = display.draw_text("to configure", 0, 0, BoundingBox { x: 60, y: 170, width: 200, height: 14 });
let _ = display.fill_rect(FULL_SCREEN, DARK_BG);
let _ = display.draw_text_span("K-Frame Setup", 100, 50, WHITE, FontSize::Small);
let _ = display.draw_text_span("Connect to WiFi:", 60, 90, WHITE, FontSize::Small);
let _ = display.draw_text_span("KFrame-Setup", 90, 110, WHITE, FontSize::Small);
let _ = display.draw_text_span("Then open browser", 60, 150, WHITE, FontSize::Small);
let _ = display.draw_text_span("to configure", 80, 170, WHITE, FontSize::Small);
}