From 9ad8a4e313b5bd1694cee18322055d822b3ad5d5 Mon Sep 17 00:00:00 2001 From: specCon18 Date: Wed, 26 Mar 2025 18:38:28 -0400 Subject: [PATCH] Print is println? --- main.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/main.go b/main.go index 64dd823..214b6de 100644 --- a/main.go +++ b/main.go @@ -79,12 +79,14 @@ func parseGcodeLine(line string){ //TODO: P:1 Write lookup table for G/M codes to get which params are required } else if strings.HasPrefix(line, "G") || strings.HasPrefix(line,"M") { c,l := extractCommand(line) - fmt.Println(c) - parseGcodeLine(l) + fmt.Print(c) + if l != "" { + parseGcodeLine(l) + } } else if strings.HasPrefix(line,"*"){ - fmt.Println("is a checksum") + fmt.Print("is a checksum") } else if strings.HasPrefix(line,";"){ - fmt.Sprintf("Comment: %s\n",line) + fmt.Print(line) } }