diff --git a/buzzer_tool/core/commands/info.py b/buzzer_tool/core/commands/info.py index 9d10c39..f65890c 100644 --- a/buzzer_tool/core/commands/info.py +++ b/buzzer_tool/core/commands/info.py @@ -8,7 +8,8 @@ def execute(conn) -> dict: raise BuzzerError("Keine Antwort auf 'info' empfangen.") parts = lines[0].split(';') - if len(parts) != 5: + # Auf 6 Parameter aktualisiert + if len(parts) != 6: raise BuzzerError(f"Unerwartetes Info-Format: {lines[0]}") protocol_version = int(parts[0]) @@ -19,6 +20,7 @@ def execute(conn) -> dict: f_frsize = int(parts[2]) f_blocks = int(parts[3]) f_bfree = int(parts[4]) + image_status = parts[5].strip() # CONFIRMED oder UNCONFIRMED total_kb = (f_blocks * f_frsize) / 1024 free_kb = (f_bfree * f_frsize) / 1024 @@ -31,5 +33,6 @@ def execute(conn) -> dict: "total_kb": total_kb, "free_kb": free_kb, "used_kb": used_kb, - "percent_used": percent_used + "percent_used": percent_used, + "image_status": image_status } \ No newline at end of file diff --git a/firmware/VERSION b/firmware/VERSION index 53d9f1c..967bddc 100644 --- a/firmware/VERSION +++ b/firmware/VERSION @@ -1,5 +1,5 @@ VERSION_MAJOR = 0 -VERSION_MINOR = 0 -PATCHLEVEL = 12 +VERSION_MINOR = 1 +PATCHLEVEL = 0 VERSION_TWEAK = 0 EXTRAVERSION = 0 \ No newline at end of file diff --git a/firmware/src/protocol.c b/firmware/src/protocol.c index 5bd5095..ad58f38 100644 --- a/firmware/src/protocol.c +++ b/firmware/src/protocol.c @@ -75,7 +75,7 @@ int send_info() LOG_ERR("Failed to get filesystem stats: %d", rc); return -rc; } - snprintf(info, sizeof(info), "%u;%s;%lu;%lu;%lu\n", PROTOCOL_VERSION, APP_VERSION_STRING, stat.f_frsize, stat.f_blocks, stat.f_bfree); + snprintf(info, sizeof(info), "%u;%s;%lu;%lu;%lu;%s\n", PROTOCOL_VERSION, APP_VERSION_STRING, stat.f_frsize, stat.f_blocks, stat.f_bfree, boot_is_img_confirmed() ? "CONFIRMED" : "UNCONFIRMED"); usb_write_buffer((const uint8_t *)info, strlen(info)); return 0; } @@ -275,6 +275,7 @@ int confirm_firmware() { return rc; } LOG_INF("Firmware confirmed successfully"); + audio_play("/lfs/sys/confirm"); return 0; }