From cbab90cfb45e48c77fadf97b2687acecee67a687 Mon Sep 17 00:00:00 2001 From: cheetah Date: Mon, 29 Mar 2021 16:21:59 +0200 Subject: [PATCH] Update gpsonly.js --- birdy-slim-iot/payload-formatters/gpsonly.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/birdy-slim-iot/payload-formatters/gpsonly.js b/birdy-slim-iot/payload-formatters/gpsonly.js index cb1e0e1..2782561 100644 --- a/birdy-slim-iot/payload-formatters/gpsonly.js +++ b/birdy-slim-iot/payload-formatters/gpsonly.js @@ -5,7 +5,7 @@ function Decoder(bytes, port) { decoded.latitude /= 10e4; decoded.longitude = ((bytes[4]<<24)>>>0) + ((bytes[5]<<16)>>>0) + ((bytes[6]<<8)>>>0) + bytes[7]; decoded.longitude /= 10e4; - decoded.dur = bytes[8]; + decoded.lastGPSAcquisition = bytes[8]; return decoded; } @@ -16,7 +16,7 @@ function decodeUplink(input) { data.latitude /= 10e4; data.longitude = ((bytes[4]<<24)>>>0) + ((bytes[5]<<16)>>>0) + ((bytes[6]<<8)>>>0) + bytes[7]; data.longitude /= 10e4; - data.dur = bytes[8]; + data.lastGPSAcquisition = bytes[8]; return { data, warnings: [],