From 55e4fed9d8e281ea031bd0c2d4cfbcddb3a58cf7 Mon Sep 17 00:00:00 2001 From: Mikayla Date: Fri, 7 Nov 2025 18:51:42 +0000 Subject: [PATCH] luacheck fixes --- coordinator/coordinator.lua | 11 +++++------ coordinator/startup.lua | 3 ++- reactor-plc/plc.lua | 10 +++++----- rtu/rtu.lua | 10 +++++----- rtu/startup.lua | 2 +- 5 files changed, 18 insertions(+), 18 deletions(-) diff --git a/coordinator/coordinator.lua b/coordinator/coordinator.lua index 324486e..18d75ff 100644 --- a/coordinator/coordinator.lua +++ b/coordinator/coordinator.lua @@ -1,6 +1,5 @@ local comms = require("scada-common.comms") local log = require("scada-common.log") -local ppm = require("scada-common.ppm") local util = require("scada-common.util") local types = require("scada-common.types") @@ -252,15 +251,15 @@ function coordinator.comms(version, nic, wl_nic, sv_watchdog) local public = {} -- switch the current active NIC - ---@param _nic nic - function public.switch_nic(_nic) + ---@param act_nic nic + function public.switch_nic(act_nic) nic.closeAll() -- configure receive channels - _nic.closeAll() - _nic.open(config.CRD_Channel) + act_nic.closeAll() + act_nic.open(config.CRD_Channel) - nic = _nic + nic = act_nic end -- try to connect to the supervisor if not already linked diff --git a/coordinator/startup.lua b/coordinator/startup.lua index b2dd23c..4c4233d 100644 --- a/coordinator/startup.lua +++ b/coordinator/startup.lua @@ -116,7 +116,8 @@ if not disp_ok then disp_ok, disp_err = backplane.init_displays(config) if not disp_ok then - println("monitor configuration invalid, please reconfigure") + println(disp_err) + println("please reconfigure") return end end diff --git a/reactor-plc/plc.lua b/reactor-plc/plc.lua index e388575..33eaf7b 100644 --- a/reactor-plc/plc.lua +++ b/reactor-plc/plc.lua @@ -833,15 +833,15 @@ function plc.comms(version, nic, reactor, rps, conn_watchdog) local public = {} -- switch the current active NIC - ---@param _nic nic - function public.switch_nic(_nic) + ---@param act_nic nic + function public.switch_nic(act_nic) nic.closeAll() -- configure receive channels - _nic.closeAll() - _nic.open(config.PLC_Channel) + act_nic.closeAll() + act_nic.open(config.PLC_Channel) - nic = _nic + nic = act_nic end -- reconnect a newly connected reactor diff --git a/rtu/rtu.lua b/rtu/rtu.lua index 0a26693..379ef55 100644 --- a/rtu/rtu.lua +++ b/rtu/rtu.lua @@ -362,15 +362,15 @@ function rtu.comms(version, nic, conn_watchdog) local public = {} -- switch the current active NIC - ---@param _nic nic - function public.switch_nic(_nic) + ---@param act_nic nic + function public.switch_nic(act_nic) nic.closeAll() -- configure receive channels - _nic.closeAll() - _nic.open(config.RTU_Channel) + act_nic.closeAll() + act_nic.open(config.RTU_Channel) - nic = _nic + nic = act_nic end -- unlink from the server diff --git a/rtu/startup.lua b/rtu/startup.lua index 6338a1c..b6699ba 100644 --- a/rtu/startup.lua +++ b/rtu/startup.lua @@ -94,7 +94,7 @@ local function main() }, -- system objects - ---@class rtu_sys + ---@class rtu_sys rtu_sys = { rtu_comms = nil, ---@type rtu_comms conn_watchdog = nil, ---@type watchdog