From 6d1058cbe417d12175862085139a1d9bd7dbf1d2 Mon Sep 17 00:00:00 2001 From: Joacim Breiler Date: Sat, 21 Dec 2024 16:50:56 +0100 Subject: [PATCH] Add action for reset in terminal --- src/pages/terminal/Terminal.tsx | 23 ++++++++++++++++++++--- src/panels/navigation/Navigation.tsx | 8 +++++--- src/services/InstallService.ts | 2 +- src/utils/flash.ts | 2 +- 4 files changed, 27 insertions(+), 8 deletions(-) diff --git a/src/pages/terminal/Terminal.tsx b/src/pages/terminal/Terminal.tsx index 65e1342..853b51d 100644 --- a/src/pages/terminal/Terminal.tsx +++ b/src/pages/terminal/Terminal.tsx @@ -14,6 +14,7 @@ import { faArrowsRotate, faCodeBranch, faLockOpen, + faPowerOff, faQuestion, faSquarePollHorizontal } from "@fortawesome/free-solid-svg-icons"; @@ -135,6 +136,10 @@ const Terminal = () => { xtermRef.current?.terminal.focus(); }; + const onReset = () => { + controllerService.serialPort.write(Buffer.from([0x18])); + }; + const onUnlock = () => { controllerService?.send(new Command("$X")); }; @@ -160,20 +165,32 @@ const Terminal = () => {
+