packed_decoder.js: added timesync port 2
This commit is contained in:
parent
87d6d95726
commit
17a1ae2856
@ -30,7 +30,13 @@ function Decoder(bytes, port) {
|
||||
|
||||
if (port === 2) {
|
||||
// device status data
|
||||
return decode(bytes, [uint16, uptime, uint8, uint32, uint8, uint8], ['voltage', 'uptime', 'cputemp', 'memory', 'reset0', 'reset1']);
|
||||
if (bytes.length === 17) {
|
||||
return decode(bytes, [uint16, uptime, uint8, uint32, uint8, uint8], ['voltage', 'uptime', 'cputemp', 'memory', 'reset0', 'reset1']);
|
||||
}
|
||||
// epoch time answer
|
||||
if (bytes.length === 4) {
|
||||
return decode(bytes, [uint32], ['time']);
|
||||
}
|
||||
}
|
||||
|
||||
if (port === 3) {
|
||||
|
Loading…
Reference in New Issue
Block a user