From 197e5b4859e7ecd6935969a9b538d020152187f3 Mon Sep 17 00:00:00 2001 From: Eduard Iten Date: Fri, 27 Feb 2026 12:36:22 +0100 Subject: [PATCH] sync --- buzzer_tool/buzzer.py | 15 ++++++++++++--- firmware/VERSION | 2 +- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/buzzer_tool/buzzer.py b/buzzer_tool/buzzer.py index ef2bcd1..b753c83 100644 --- a/buzzer_tool/buzzer.py +++ b/buzzer_tool/buzzer.py @@ -38,6 +38,10 @@ def main(): rm_parser.add_argument("path", type=str, help="Pfad der zu löschenden Datei/Ordner") rm_parser.add_argument("-r", "--recursive", action="store_true", help="Ordnerinhalte rekursiv löschen") + # Befehl: confirm + confirm_parser = subparsers.add_parser("confirm", help="Bestätigt die aktuell laufende Firmware") + + reboot_parser = subparsers.add_parser("reboot", help="Startet den Buzzer neu") # Argumente parsen args = parser.parse_args() config = load_config(args) @@ -56,10 +60,15 @@ def main(): with BuzzerConnection(config) as conn: # 1. Immer die Info holen und anzeigen sys_info = info.execute(conn) - print(f"Buzzer Firmware: v{sys_info['app_version']} (Protokoll v{sys_info['protocol_version']})") - print(f"LittleFS Status: {sys_info['used_kb']:.1f} KB / {sys_info['total_kb']:.1f} KB belegt ({sys_info['percent_used']:.1f}%)") - print("-" * 55) + # Neu: Status auslesen und Farbe zuweisen (Grün für CONFIRMED, Gelb für UNCONFIRMED) + status = sys_info.get("image_status", "UNKNOWN") + status_color = "\033[32m" if status == "CONFIRMED" else "\033[33m" + + # Neu: Die print-Anweisung enthält nun den formatierten Status + print(f"Buzzer Firmware: v{sys_info['app_version']} [{status_color}{status}\033[0m] (Protokoll v{sys_info['protocol_version']})") + print(f"LittleFS Status: {sys_info['used_kb']:.1f} KB / {sys_info['total_kb']:.1f} KB belegt ({sys_info['percent_used']:.1f}%)") + print("-" * 55) # 2. Spezifisches Kommando ausführen if args.command == "ls": print(f"Inhalt von '{args.path}':\n") diff --git a/firmware/VERSION b/firmware/VERSION index 967bddc..e16ca64 100644 --- a/firmware/VERSION +++ b/firmware/VERSION @@ -1,5 +1,5 @@ VERSION_MAJOR = 0 VERSION_MINOR = 1 -PATCHLEVEL = 0 +PATCHLEVEL = 1 VERSION_TWEAK = 0 EXTRAVERSION = 0 \ No newline at end of file