From 24696a1daebde91a305a96cf90c222b796dbe2cb Mon Sep 17 00:00:00 2001 From: Jefta Date: Wed, 27 Dec 2023 22:59:36 +0100 Subject: [PATCH] Fixed bug Trimmed end of data so no \n at the end --- .../shared/components/serial-output/serial-output.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/modules/shared/components/serial-output/serial-output.component.ts b/src/app/modules/shared/components/serial-output/serial-output.component.ts index 43a3c313..d524a3d0 100644 --- a/src/app/modules/shared/components/serial-output/serial-output.component.ts +++ b/src/app/modules/shared/components/serial-output/serial-output.component.ts @@ -63,7 +63,7 @@ export class SerialOutputComponent implements AfterViewInit, OnInit { } this.serialDataSubscription = this.robotWiredState.serialData$.subscribe((data: SerialData[]) => { - this.serialDataAsJSON = data.map(item => ({ time: item.time, data: item.data })); + this.serialDataAsJSON = data.map(item => ({ time: item.time, data: item.data.trim() })); // Additional logic if needed... }); }