Files
k-frame/crates/client-esp32/src/config.rs
Gabriel Kaszewski a384e36616 end-to-end working: ESP32 connects to server, renders widgets
boot logo (procedural hexagon + K), WiFi (WPA auto-detect with retries),
TCP client connects and receives ScreenUpdate/DataUpdate messages,
display renders widget data. Makefile with esp-flash/server/desktop targets.

known issues: boot logo not cleared, text overlaps, occasional reconnect
2026-06-18 22:31:48 +02:00

27 lines
809 B
Rust

use std::time::Duration;
use esp_idf_hal::units::Hertz;
use client_domain::BoundingBox;
pub const SCREEN_WIDTH: u16 = 320;
pub const SCREEN_HEIGHT: u16 = 240;
pub const SCREEN: BoundingBox = BoundingBox {
x: 0,
y: 0,
width: SCREEN_WIDTH,
height: SCREEN_HEIGHT,
};
// Physical panel dimensions (before rotation)
pub const PANEL_WIDTH: u16 = 240;
pub const PANEL_HEIGHT: u16 = 320;
pub const SPI_BAUDRATE: Hertz = Hertz(26_000_000);
pub const SPI_BUFFER_SIZE: usize = 512;
pub const NET_THREAD_STACK_SIZE: usize = 8192;
pub const NET_READ_TIMEOUT: Duration = Duration::from_millis(10);
pub const NET_POLL_INTERVAL: Duration = Duration::from_millis(50);
pub const NET_RECONNECT_DELAY: Duration = Duration::from_secs(2);
pub const RENDER_POLL_INTERVAL: Duration = Duration::from_millis(100);