Skip to content

Commit

Permalink
Merge pull request #100 from cyberman54/development
Browse files Browse the repository at this point in the history
packed_decoder.js small corrections
  • Loading branch information
cyberman54 authored Jun 23, 2018
2 parents bbed612 + b6937b3 commit e7c4cde
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/TTN/packed_decoder.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ function Decoder(bytes, port) {
var bytesToInt = function (bytes) {
var i = 0;
for (var x = 0; x < bytes.length; x++) {
i |= +(bytes[x] << (x * 8));
i |= (bytes[x] << (x * 8));
}
return i;
};
Expand Down Expand Up @@ -124,7 +124,7 @@ var bitmap = function (byte) {
var bm = ('00000000' + Number(i).toString(2)).substr(-8).split('').map(Number).map(Boolean);
return ['adr', 'screensaver', 'screen', 'countermode', 'blescan', 'antenna', 'filter', 'gpsmode']
.reduce(function (obj, pos, index) {
obj[pos] = bm[index];
obj[pos] = +bm[index];
return obj;
}, {});
};
Expand Down

0 comments on commit e7c4cde

Please sign in to comment.