Add LVSolarBuck64 firmware and debug console with uv support
STM32G474RB firmware for solar buck converter with MPPT, CC control, Vfly compensation, and adaptive deadtime. Includes Textual TUI debug console for real-time telemetry, parameter tuning, and SQLite logging. Added pyproject.toml for uv: `cd code64 && uv run debug-console` Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
28
code64/debug_console/widgets/status_bar.py
Normal file
28
code64/debug_console/widgets/status_bar.py
Normal file
@@ -0,0 +1,28 @@
|
||||
"""Connection status bar."""
|
||||
from textual.widgets import Static
|
||||
|
||||
|
||||
class StatusBar(Static):
|
||||
"""Bottom status bar showing connection info."""
|
||||
|
||||
DEFAULT_CSS = """
|
||||
StatusBar {
|
||||
dock: bottom;
|
||||
height: 1;
|
||||
background: $primary-background;
|
||||
color: $text;
|
||||
padding: 0 1;
|
||||
}
|
||||
"""
|
||||
|
||||
def __init__(self):
|
||||
super().__init__("")
|
||||
self.connected = False
|
||||
self.pkt_count = 0
|
||||
self.drop_count = 0
|
||||
self.last_seq = 0
|
||||
self.fps = 0.0
|
||||
|
||||
def refresh_status(self):
|
||||
conn = "[green]CONN:OK[/green]" if self.connected else "[red]CONN:LOST[/red]"
|
||||
self.update(f" {conn} PKTS:{self.pkt_count} DROPS:{self.drop_count} SEQ:{self.last_seq} FPS:{self.fps:.1f}")
|
||||
Reference in New Issue
Block a user