summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Justfile12
-rw-r--r--src/c/fastforge.c8
2 files changed, 19 insertions, 1 deletions
diff --git a/Justfile b/Justfile
index 9c5ee3b..d24e97c 100644
--- a/Justfile
+++ b/Justfile
@@ -53,6 +53,18 @@ kill:
pebble kill
# ─────────────────────────────────────────────
+# Emulator recovery
+# ─────────────────────────────────────────────
+
+# Reset the basalt SPI flash to factory state.
+# Use this when 'just dev' hangs on the Pebble boot screen — it means the
+# flash was corrupted (e.g. by killing multiple concurrent qemu processes).
+reset-flash:
+ -pebble kill
+ bunzip2 -k -c ~/.pebble-sdk/SDKs/4.9.148/sdk-core/pebble/basalt/qemu/qemu_spi_flash.bin.bz2 > ~/.pebble-sdk/4.9.148/basalt/qemu_spi_flash.bin
+ @echo "Flash reset to factory state. Run 'just dev' to reinstall."
+
+# ─────────────────────────────────────────────
# Maintenance commands
# ─────────────────────────────────────────────
diff --git a/src/c/fastforge.c b/src/c/fastforge.c
index f128592..dd2a976 100644
--- a/src/c/fastforge.c
+++ b/src/c/fastforge.c
@@ -1037,7 +1037,13 @@ static void refresh_running_edit_window_content(void) {
elapsed = 0;
}
char elapsed_text[20];
- format_duration_hours_minutes(elapsed, elapsed_text, sizeof(elapsed_text));
+ if (elapsed < 60) {
+ /* Show seconds when elapsed is sub-minute so the user can see DOWN/UP
+ * adjustments that would otherwise be invisible at "0h 00m" resolution. */
+ snprintf(elapsed_text, sizeof(elapsed_text), "%ds", (int)elapsed);
+ } else {
+ format_duration_hours_minutes(elapsed, elapsed_text, sizeof(elapsed_text));
+ }
snprintf(s_running_edit_start_text, sizeof(s_running_edit_start_text), "Start %s", start_text);
snprintf(s_running_edit_elapsed_text, sizeof(s_running_edit_elapsed_text), "Elapsed %s", elapsed_text);