From 57191e941016f15a9c52de7e95e7bb2a04c9de13 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Fri, 4 Sep 2026 20:32:43 -0700 Subject: pos: reset the device and release the serial port when leaving the flasher Connecting loads the esptool stub and parks the chip in the ROM download mode; only a successful flash reset it and closed the port. Navigating away, a failed connect, or a failed flash left the device looking frozen (OLED keeps its last frame, LED pin pulled up, keypad dead) with the browser still holding the port. Reset + release on component destroy and pagehide, on connect failure, and from a new Disconnect button. Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_01VMi2Y1oKPZ3TeeFmLej47y --- src/routes/(app)/pos/+page.svelte | 40 +++++++++++++++++++++++++++++++++------ 1 file changed, 34 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/routes/(app)/pos/+page.svelte b/src/routes/(app)/pos/+page.svelte index eb074b1a..5a11d148 100644 --- a/src/routes/(app)/pos/+page.svelte +++ b/src/routes/(app)/pos/+page.svelte @@ -1,5 +1,6 @@