gps-track: strip trailing binary zeros

This commit is contained in:
Christian Hesse 2019-01-29 09:32:18 +01:00
parent 9c71b191c1
commit b3459ed47c

View file

@ -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" \