fix ttn script

This commit is contained in:
Tobias Brunner 2023-06-04 21:54:32 +02:00
parent 9c7a85fa67
commit 7afd16849b
Signed by: tobru
SSH Key Fingerprint: SHA256:kywVhvCA+MIxL6eBgoQa+BfC/ROJqcfD2bpy1PR6Ebk
1 changed files with 2 additions and 2 deletions

View File

@ -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;