From 7afd16849b8f5196e46919f9bf3dd4618339bfb7 Mon Sep 17 00:00:00 2001 From: Tobias Brunner Date: Sun, 4 Jun 2023 21:54:32 +0200 Subject: [PATCH] fix ttn script --- ttnscripts/rak2171.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ttnscripts/rak2171.js b/ttnscripts/rak2171.js index 891ad60..309a45d 100644 --- a/ttnscripts/rak2171.js +++ b/ttnscripts/rak2171.js @@ -44,7 +44,7 @@ function Decode(fPort, bytes) { decoded.lat = (((bytes[14] << 24) | (bytes[15] << 16) | (bytes[16] << 8) | bytes[17]) * 0.000001).toFixed(6); decoded.acc = bytes[18]; decoded.gps_start = bytes[19]; - decoded.location = "(" + decoded.latitude + "," + decoded.longitude + ")"; + decoded.location = "(" + decoded.lat + "," + decoded.lng + ")"; break; case 0xCC: // SOS decoded.sos = 1; @@ -62,7 +62,7 @@ function Decode(fPort, bytes) { decoded.phone += bytes[i].toString(); } } - decoded.location = "(" + decoded.latitude + "," + decoded.longitude + ")"; + decoded.location = "(" + decoded.lat + "," + decoded.lng + ")"; break; case 0xCD: decoded.sos = 0;