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.
|
||||
// Battery is 1/100 of a volt, offset by 2v for a range of 2.00 to 4.56 volts.
|
||||
//
|
||||
|
||||
function Decoder(bytes, port) {
|
||||
var decoded = {};
|
||||
|
||||
|
@ -61,3 +62,10 @@ function Decoder(bytes, port) {
|
|||
|
||||
return decoded;
|
||||
}
|
||||
|
||||
// Wrapper for ChirpStack V4:
|
||||
function decodeUplink(input) {
|
||||
return {
|
||||
data: Decoder(input.bytes, input.fPort)
|
||||
};
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue