#476 fixed PPM not initing fault counter in __index handler when a function is found

This commit is contained in:
Mikayla Fischler 2024-04-16 15:55:40 -04:00
parent 0d8d7aeb15
commit a786404092
2 changed files with 3 additions and 1 deletions

View File

@ -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]

View File

@ -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