feat: complete overhaul of UI using GPUI (GPU-accelerated modern cockpit)

This commit is contained in:
bleackstorm committed 2026-11-05 20:42:14 +01:00
1 parent 886eed7825
commit be48fbdedf
29 files changed
+7422 -136

No files matched your search

+4
View File
@@ -84,6 +84,10 @@ pub struct AppConfig {
#[arg(long, default_value_t = false)]
pub head_tracking_enabled: bool,
/// Moteur d'interface graphique : "gpui" (GPU-accéléré moderne Tailwind) ou "egui" (classique)
#[arg(long, default_value = "gpui")]
pub gui_engine: String,
/// Adresse IP du Backpack Wi-Fi du module RadioMaster Nomad (en mode AP ELRS : 10.0.0.1)
#[arg(long, default_value = "10.0.0.1")]
pub nomad_ip: String,
+1 -7
View File
@@ -1,6 +1,6 @@
use crate::config::AppConfig;
use crate::engine::{FpvEngineController, SubsystemStatus};
use crate::logger::LogBuffer;
use crate::logger::{LogBuffer, LogFilter};
use crate::nomad_elrs::NomadHeadTracker;
use eframe::egui::{self, Color32, RichText, TextureHandle, TextureOptions};
use log::Level;
@@ -9,12 +9,6 @@ use std::process::Command;
use std::sync::Arc;
use std::time::Duration;
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
enum LogFilter {
All,
WarningsAndErrors,
ErrorsOnly,
}
pub struct SteamFrameGuiApp {
cfg: AppConfig,
+1007
View File
File diff suppressed because it is too large. Load diff
+17
View File
@@ -8,6 +8,13 @@ use std::sync::Arc;
const MAX_LOG_ENTRIES: usize = 1000;
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum LogFilter {
All,
WarningsAndErrors,
ErrorsOnly,
}
#[derive(Debug, Clone)]
pub struct LogEntry {
pub timestamp: String,
@@ -48,6 +55,16 @@ impl GuiLogger {
impl Log for GuiLogger {
fn enabled(&self, metadata: &Metadata) -> bool {
let t = metadata.target();
if t.starts_with("blade_graphics")
|| t.starts_with("naga")
|| t.starts_with("zbus")
|| t.starts_with("tracing")
|| t.starts_with("calloop")
|| t.starts_with("winit")
{
return metadata.level() <= Level::Warn;
}
metadata.level() <= Level::Info
}
+8 -1
View File
@@ -2,6 +2,7 @@ mod config;
mod dome_projection;
mod engine;
mod gui;
mod gui_gpui;
mod logger;
mod nomad_elrs;
mod telemetry_osd;
@@ -23,7 +24,8 @@ fn main() -> Result<()> {
let log_buffer = GuiLogger::init(&cfg.log_file);
log::info!(
"=== Démarrage de SteamFrame FPV v0.2 (Fichier journal : {}) ===",
"=== Démarrage de SteamFrame FPV v0.2 (Moteur IHM : {}, Fichier journal : {}) ===",
cfg.gui_engine,
cfg.log_file
);
@@ -39,6 +41,11 @@ fn main() -> Result<()> {
return Ok(());
}
if cfg.gui_engine.eq_ignore_ascii_case("gpui") {
log::info!("Démarrage de l'interface moderne GPU-accélérée (GPUI)...");
return gui_gpui::run_gpui_app(cfg, log_buffer);
}
let native_options = eframe::NativeOptions {
viewport: eframe::egui::ViewportBuilder::default()
.with_title("SteamFrame FPV - Eachine Sphere Link & RadioMaster Nomad")