mirror of
https://github.com/MikaylaFischler/cc-mek-scada.git
synced 2024-08-30 18:22:34 +00:00
Merge branch 'devel' into front-panels
This commit is contained in:
@ -172,7 +172,7 @@ function rtu.new_session(id, in_queue, out_queue, timeout, advertisement, facili
|
||||
end
|
||||
|
||||
if unit ~= nil then
|
||||
table.insert(self.units, unit)
|
||||
self.units[i] = unit
|
||||
elseif u_type ~= RTU_UNIT_TYPE.VIRTUAL then
|
||||
_reset_config()
|
||||
log.error(util.c(log_header, "bad advertisement: error occured while creating a unit (type is ", type_string, ")"))
|
||||
@ -187,9 +187,7 @@ function rtu.new_session(id, in_queue, out_queue, timeout, advertisement, facili
|
||||
self.connected = false
|
||||
|
||||
-- mark all RTU unit sessions as closed so the reactor unit knows
|
||||
for i = 1, #self.units do
|
||||
self.units[i].close()
|
||||
end
|
||||
for _, unit in pairs(self.units) do unit.close() end
|
||||
end
|
||||
|
||||
-- send a MODBUS packet
|
||||
@ -352,9 +350,7 @@ function rtu.new_session(id, in_queue, out_queue, timeout, advertisement, facili
|
||||
|
||||
local time_now = util.time()
|
||||
|
||||
for i = 1, #self.units do
|
||||
self.units[i].update(time_now)
|
||||
end
|
||||
for _, unit in pairs(self.units) do unit.update(time_now) end
|
||||
|
||||
----------------------
|
||||
-- update periodics --
|
||||
|
@ -19,7 +19,7 @@ local supervisor = require("supervisor.supervisor")
|
||||
|
||||
local svsessions = require("supervisor.session.svsessions")
|
||||
|
||||
local SUPERVISOR_VERSION = "v0.16.0"
|
||||
local SUPERVISOR_VERSION = "v0.16.1"
|
||||
|
||||
local println = util.println
|
||||
local println_ts = util.println_ts
|
||||
@ -45,7 +45,6 @@ cfv.assert_type_int(config.NUM_REACTORS)
|
||||
cfv.assert_type_table(config.REACTOR_COOLING)
|
||||
cfv.assert_type_str(config.LOG_PATH)
|
||||
cfv.assert_type_int(config.LOG_MODE)
|
||||
cfv.assert_type_bool(config.LOG_DEBUG)
|
||||
|
||||
assert(cfv.valid(), "bad config file: missing/invalid fields")
|
||||
|
||||
@ -67,7 +66,7 @@ end
|
||||
-- log init
|
||||
----------------------------------------
|
||||
|
||||
log.init(config.LOG_PATH, config.LOG_MODE, config.LOG_DEBUG)
|
||||
log.init(config.LOG_PATH, config.LOG_MODE, config.LOG_DEBUG == true)
|
||||
|
||||
log.info("========================================")
|
||||
log.info("BOOTING supervisor.startup " .. SUPERVISOR_VERSION)
|
||||
|
Reference in New Issue
Block a user