From b3459ed47ca3d8475aeb5744cfe39c88f0befa51 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Tue, 29 Jan 2019 09:32:18 +0100 Subject: gps-track: strip trailing binary zeros --- gps-track | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gps-track b/gps-track index 5a828fd..158821d 100644 --- a/gps-track +++ b/gps-track @@ -11,6 +11,8 @@ :local Gps [ / system gps monitor once as-value ]; if ($Gps->"valid" = true) do={ + :set ($Gps->"latitude") [ :pick ($Gps->"latitude") 0 [ :find ($Gps->"latitude") "\00" ] ]; + :set ($Gps->"longitude") [ :pick ($Gps->"longitude") 0 [ :find ($Gps->"longitude") "\00" ] ]; :tool fetch mode=https check-certificate=yes-without-crl \ $GpsTrackUrl keep-result=no \ http-method=post http-content-type="application/json" \ -- cgit v1.2.3-54-g00ecf