From 840262722046174f8e842a157559888e5a66dcdb Mon Sep 17 00:00:00 2001 From: Martin Hebnes Pedersen Date: Sun, 25 Feb 2024 18:09:06 +0100 Subject: [PATCH] Remove trailing space in GPSValid insertion tag Winlink Express does include this, and neither should we. --- internal/forms/builder.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/internal/forms/builder.go b/internal/forms/builder.go index 8b9c19d2..b29910fa 100644 --- a/internal/forms/builder.go +++ b/internal/forms/builder.go @@ -302,6 +302,7 @@ func insertionTagReplacer(m *Manager, tagStart, tagEnd string) func(string) stri "UDay": formatDay(now, time.UTC), "GPS": positionFmt(degreeMinute, nowPos), + "GPSValid": validPos, "GPS_DECIMAL": positionFmt(decimal, nowPos), "GPS_SIGNED_DECIMAL": positionFmt(signedDecimal, nowPos), "GridSquare": positionFmt(gridSquare, nowPos), @@ -311,9 +312,6 @@ func insertionTagReplacer(m *Manager, tagStart, tagEnd string) func(string) stri // By reading the embedded javascript, they appear to be signed decimal. "GPSLatitude": fmt.Sprintf("%.4f", nowPos.Lat), "GPSLongitude": fmt.Sprintf("%.4f", nowPos.Lon), - // TODO: Why a trailing space here? - // Some forms also adds a whitespace in their declaration, so we end up with two trailing spaces.. - "GPSValid": fmt.Sprintf("%s ", validPos), // TODO (other insertion tags found in Standard Forms): // SeqNum