diff --git a/scada-common/ppm.lua b/scada-common/ppm.lua index 34a6a60..e6a95e8 100644 --- a/scada-common/ppm.lua +++ b/scada-common/ppm.lua @@ -141,7 +141,9 @@ local function peri_init(iface) local funcs = peripheral.wrap(iface) if (type(funcs) == "table") and (type(funcs[key]) == "function") then -- add this function then return it + self.fault_counts[key] = 0 self.device[key] = protect_peri_function(key, funcs[key]) + log.info(util.c("PPM: [@", iface, "] initialized previously undefined field ", key, "()")) return self.device[key] diff --git a/scada-common/util.lua b/scada-common/util.lua index 5433ab9..98a1667 100644 --- a/scada-common/util.lua +++ b/scada-common/util.lua @@ -22,7 +22,7 @@ local t_pack = table.pack local util = {} -- scada-common version -util.version = "1.2.1" +util.version = "1.2.2" util.TICK_TIME_S = 0.05 util.TICK_TIME_MS = 50