mirror of
https://github.com/Laxilef/OTGateway.git
synced 2025-12-11 18:54:28 +05:00
feat: added diagnostic code polling via opentherm, added hex value for fault code and diag code
This commit is contained in:
@@ -665,4 +665,13 @@ function form2json(data, noCastItems = []) {
|
||||
|
||||
let object = Array.from(data).reduce(method, {});
|
||||
return JSON.stringify(object);
|
||||
}
|
||||
|
||||
function dec2hex(i) {
|
||||
let hex = parseInt(i).toString(16);
|
||||
if (hex.length % 2 != 0) {
|
||||
hex = "0" + hex;
|
||||
}
|
||||
|
||||
return hex.toUpperCase();
|
||||
}
|
||||
Reference in New Issue
Block a user