Skip to content

Commit

Permalink
upgate LW001-BG PRO Chripstack
Browse files Browse the repository at this point in the history
  • Loading branch information
liuwenzheng committed Jan 17, 2024
1 parent 332a7df commit feeb277
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions LW001-BG PRO/LW001-BG PRO on chirpstack_v4.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ function decodeUplink(input) {
var failedTypeCode = bytesToInt(bytes, parse_len++, 1);
data.reasons_for_positioning_failure = posFailedReasonArray[failedTypeCode];
datalen = bytes[parse_len++];
if (reason <= 5) //wifi and ble reason
if (failedTypeCode <= 5) //wifi and ble reason
{
if (datalen) {
for (var i = 0; i < (datalen / 7); i++) {
Expand All @@ -155,7 +155,7 @@ function decodeUplink(input) {
}
data.mac_data = datas;
}
} else if (reason <= 11) //gps reason
} else if (failedTypeCode <= 11) //gps reason
{
pdop = bytes[parse_len++];
if (pdop != 0xff)
Expand Down

0 comments on commit feeb277

Please sign in to comment.