luacheck fixes
This commit is contained in:
@@ -1,6 +1,5 @@
|
|||||||
local comms = require("scada-common.comms")
|
local comms = require("scada-common.comms")
|
||||||
local log = require("scada-common.log")
|
local log = require("scada-common.log")
|
||||||
local ppm = require("scada-common.ppm")
|
|
||||||
local util = require("scada-common.util")
|
local util = require("scada-common.util")
|
||||||
local types = require("scada-common.types")
|
local types = require("scada-common.types")
|
||||||
|
|
||||||
@@ -252,15 +251,15 @@ function coordinator.comms(version, nic, wl_nic, sv_watchdog)
|
|||||||
local public = {}
|
local public = {}
|
||||||
|
|
||||||
-- switch the current active NIC
|
-- switch the current active NIC
|
||||||
---@param _nic nic
|
---@param act_nic nic
|
||||||
function public.switch_nic(_nic)
|
function public.switch_nic(act_nic)
|
||||||
nic.closeAll()
|
nic.closeAll()
|
||||||
|
|
||||||
-- configure receive channels
|
-- configure receive channels
|
||||||
_nic.closeAll()
|
act_nic.closeAll()
|
||||||
_nic.open(config.CRD_Channel)
|
act_nic.open(config.CRD_Channel)
|
||||||
|
|
||||||
nic = _nic
|
nic = act_nic
|
||||||
end
|
end
|
||||||
|
|
||||||
-- try to connect to the supervisor if not already linked
|
-- try to connect to the supervisor if not already linked
|
||||||
|
|||||||
@@ -116,7 +116,8 @@ if not disp_ok then
|
|||||||
disp_ok, disp_err = backplane.init_displays(config)
|
disp_ok, disp_err = backplane.init_displays(config)
|
||||||
|
|
||||||
if not disp_ok then
|
if not disp_ok then
|
||||||
println("monitor configuration invalid, please reconfigure")
|
println(disp_err)
|
||||||
|
println("please reconfigure")
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -833,15 +833,15 @@ function plc.comms(version, nic, reactor, rps, conn_watchdog)
|
|||||||
local public = {}
|
local public = {}
|
||||||
|
|
||||||
-- switch the current active NIC
|
-- switch the current active NIC
|
||||||
---@param _nic nic
|
---@param act_nic nic
|
||||||
function public.switch_nic(_nic)
|
function public.switch_nic(act_nic)
|
||||||
nic.closeAll()
|
nic.closeAll()
|
||||||
|
|
||||||
-- configure receive channels
|
-- configure receive channels
|
||||||
_nic.closeAll()
|
act_nic.closeAll()
|
||||||
_nic.open(config.PLC_Channel)
|
act_nic.open(config.PLC_Channel)
|
||||||
|
|
||||||
nic = _nic
|
nic = act_nic
|
||||||
end
|
end
|
||||||
|
|
||||||
-- reconnect a newly connected reactor
|
-- reconnect a newly connected reactor
|
||||||
|
|||||||
10
rtu/rtu.lua
10
rtu/rtu.lua
@@ -362,15 +362,15 @@ function rtu.comms(version, nic, conn_watchdog)
|
|||||||
local public = {}
|
local public = {}
|
||||||
|
|
||||||
-- switch the current active NIC
|
-- switch the current active NIC
|
||||||
---@param _nic nic
|
---@param act_nic nic
|
||||||
function public.switch_nic(_nic)
|
function public.switch_nic(act_nic)
|
||||||
nic.closeAll()
|
nic.closeAll()
|
||||||
|
|
||||||
-- configure receive channels
|
-- configure receive channels
|
||||||
_nic.closeAll()
|
act_nic.closeAll()
|
||||||
_nic.open(config.RTU_Channel)
|
act_nic.open(config.RTU_Channel)
|
||||||
|
|
||||||
nic = _nic
|
nic = act_nic
|
||||||
end
|
end
|
||||||
|
|
||||||
-- unlink from the server
|
-- unlink from the server
|
||||||
|
|||||||
Reference in New Issue
Block a user