Files
kxkmandClaude Sonnet 4.6 defc5eba2d style: clang-format-18 all firmware sources (full sweep)
Previous commit only formatted 3 files; CI checks all 27 files
in src/, include/, test/. Format the full set to clear firmware-lint.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
2026-03-27 05:46:03 +01:00

36 lines
1.1 KiB
C++
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#pragma once
#include "voice_controller.h"
#include "wifi_manager.h"
/// LCD UI renderer for the Waveshare 1.85" round display (ST77916 QSPI).
/// Uses ESP32_Display_Panel for hardware abstraction.
class LcdUi : public UiRenderer {
public:
/// Initialise the display panel and backlight.
bool Begin();
/// UiRenderer implementation — draw current state on the round LCD.
void Render(const MediaSnapshot &media, VoicePhase phase, const std::string &headline,
const std::string &summary, bool show_ring) override;
/// Show WiFi status screen (connecting, AP mode, etc.).
void RenderWifi(WifiManager::State state, const std::string &info,
const std::string &ap_ssid = "", const std::string &ap_pass = "",
const std::string &ap_ip = "");
/// Set backlight brightness (0100).
void SetBrightness(uint8_t level);
/// Push current framebuffer to LCD.
void Flush();
private:
void DrawBackground();
void DrawCenteredText(int y, const char *text, uint16_t color, int size);
void DrawStatusBar(const MediaSnapshot &media);
void DrawVoiceRing(VoicePhase phase);
bool initialized_ = false;
};