refactor: Display-Firmware neutral als P4_Display_Firmware führen
Der Ordner hieß JC_Display_Firmware, bedient seit 1.6.0 aber auch das Waveshare 7inch DSI LCD (H) am ESP32-P4-Pico. Der Name führte in die Irre. - JC_Display_Firmware/ -> P4_Display_Firmware/ (samt Sketch, den Arduino gleichnamig zum Ordner verlangt) - Doku/JC-Display_UART-Protokoll.md -> Doku/P4-Display_UART-Protokoll.md, Verweise und Titel angepasst - Verweise in CLAUDE.md, README und Quelltextköpfen nachgezogen Nur Namen und Pfade, keine Logikänderung. Der Vendor-Ordner JC_Display_Firmware_7zoll/ behält seinen Namen, ebenso die Bezeichner JC_PANEL_TYPE/jc_board_bringup im Quelltext. Enthält außerdem die bereits im Arbeitsverzeichnis liegende, noch nicht committete Ergänzung des Git-Workflows in CLAUDE.md (PRs über die Gitea-API statt der hängenden tea-CLI). Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018QoLDQeUh1dCQz7yYZVb4Y
This commit is contained in:
co-authored by
Claude Opus 5
parent
e0c6784ecf
commit
4f9f686d81
@@ -0,0 +1,46 @@
|
||||
// =====================================================================================
|
||||
// ui.h - LVGL-Benutzeroberflaeche (Dashboard) fuer das P4-Touch-Display
|
||||
// =====================================================================================
|
||||
// Board-AGNOSTISCH: erstellt nur LVGL-Objekte und bindet Bedienaktionen an den
|
||||
// ProtocolClient. Die Display-/Touch-Hardware wird in display_hal.* initialisiert.
|
||||
// =====================================================================================
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "protocol_client.h"
|
||||
#include "machine_state.h"
|
||||
|
||||
// Initialisiert das Dashboard. 'client' wird fuer ausgehende Kommandos benoetigt.
|
||||
void ui_init(ProtocolClient* client);
|
||||
|
||||
// Aktualisiert alle Anzeigen aus dem aktuellen Zustand (bei jedem state-Push aufrufen).
|
||||
void ui_update(const MachineState& st);
|
||||
|
||||
// Fuellt die Profil-Liste (Antwort auf listProfiles).
|
||||
void ui_set_profiles(const String profiles[], int count);
|
||||
|
||||
// Zeigt die Detailwerte des gewaehlten Profils an (Antwort auf getProfileDetails, Roh-JSON).
|
||||
void ui_set_profile_details(const String& json);
|
||||
|
||||
// Fuellt die Statistik-Seite (Antwort auf getUsageStats, Roh-JSON).
|
||||
void ui_set_usage_stats(const String& json);
|
||||
|
||||
// Fuellt die WLAN-Netzliste (Antwort auf scanWifi, Roh-JSON).
|
||||
void ui_set_wifi_networks(const String& json);
|
||||
|
||||
// Zeigt eine kurze Rueckmeldung (z.B. aus ack/error) im Toast-Bereich an.
|
||||
void ui_toast(const char* txt, bool error);
|
||||
|
||||
// true, solange der Standby-Aufweck-Dialog sichtbar ist. Die Helligkeitssteuerung (onState)
|
||||
// haelt das Display dann hell, damit der Dialog lesbar bleibt.
|
||||
bool ui_wake_dialog_open();
|
||||
|
||||
// Setzt den On-Screen-Diagnosetext (UART-Zaehler/letzte Rohzeile). Muss vom Aufrufer
|
||||
// (im realen Modus) unter hal_lock()/hal_unlock() aufgerufen werden.
|
||||
void ui_set_debug(const char* txt);
|
||||
|
||||
// --- OTA-Update-Overlay (Aufrufe unter hal_lock()/hal_unlock()) ---
|
||||
void ui_ota_begin(); // Vollbild-Overlay einblenden
|
||||
void ui_ota_progress(uint32_t bytes); // empfangene Bytes aktualisieren
|
||||
void ui_ota_done(); // Erfolg (Neustart folgt)
|
||||
void ui_ota_fail(const char* msg); // Fehler anzeigen
|
||||
Reference in New Issue
Block a user