kopia lustrzana https://github.com/Max-Plastix/tbeam-helium-mapper
Update unified_decoder.js to work also with ChirpStack V4
ChirpStack V4 needs decodeUplink, this wraps the Decoder with itpull/9/head
rodzic
00cec9c130
commit
88e52f18b5
|
@ -5,6 +5,7 @@
|
||||||
// Accuracy is a dummy value required by some Integrations.
|
// Accuracy is a dummy value required by some Integrations.
|
||||||
// Battery is 1/100 of a volt, offset by 2v for a range of 2.00 to 4.56 volts.
|
// Battery is 1/100 of a volt, offset by 2v for a range of 2.00 to 4.56 volts.
|
||||||
//
|
//
|
||||||
|
|
||||||
function Decoder(bytes, port) {
|
function Decoder(bytes, port) {
|
||||||
var decoded = {};
|
var decoded = {};
|
||||||
|
|
||||||
|
@ -60,4 +61,11 @@ function Decoder(bytes, port) {
|
||||||
}
|
}
|
||||||
|
|
||||||
return decoded;
|
return decoded;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Wrapper for ChirpStack V4:
|
||||||
|
function decodeUplink(input) {
|
||||||
|
return {
|
||||||
|
data: Decoder(input.bytes, input.fPort)
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
Ładowanie…
Reference in New Issue