fix ttn script
This commit is contained in:
parent
9c7a85fa67
commit
7afd16849b
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue