Removed jQuery

This commit is contained in:
David Carley
2022-09-02 01:08:11 +00:00
parent c6a3732750
commit a5b2f39c5d
11 changed files with 95 additions and 104 deletions

View File

@@ -1,7 +1,7 @@
"use strict";
// Must match modbus.c
const exports = {
const constants = {
DISCONNECTED: 0,
OK: 1,
CRC: 2,
@@ -9,15 +9,15 @@ const exports = {
TIMEDOUT: 4
};
exports.status_to_string =
function (status) {
switch (status) {
case exports.OK: return "Ok";
case exports.CRC: return "CRC error";
case exports.INVALID: return "Invalid response";
case exports.TIMEDOUT: return "Timedout";
default: return "Disconnected";
}
};
module.exports = exports;
module.exports = {
...constants,
status_to_string: function (status) {
switch (status) {
case constants.OK: return "Ok";
case constants.CRC: return "CRC error";
case constants.INVALID: return "Invalid response";
case constants.TIMEDOUT: return "Timedout";
default: return "Disconnected";
}
}
};