timesync(experimental)
This commit is contained in:
1 parent
c64f087faa
commit
7ab0d8fcd6
4 files changed
+94
-86
No files matched your search
@@ -63,6 +63,18 @@ function Decoder(bytes, port) {
|
||||
return decode(bytes, [uint16], ['voltage']);
|
||||
}
|
||||
|
||||
if (port === 9) {
|
||||
// timesync request
|
||||
if (bytes.length === 1) {
|
||||
decoded.timesync_opcode = bytes[0];
|
||||
}
|
||||
if (bytes.length === 2) {
|
||||
decoded.timesync_opcode = bytes[0];
|
||||
decoded.timesync_seqno = bytes[1];
|
||||
}
|
||||
return decoded;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user