From a1b6ff4bcc673e07a49add7337b4f20dcee68f58 Mon Sep 17 00:00:00 2001 From: Mikayla Fischler Date: Wed, 21 Aug 2024 19:18:55 -0400 Subject: [PATCH] luacheck fixes --- supervisor/facility_update.lua | 7 ++++--- supervisor/session/svsessions.lua | 6 ++---- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/supervisor/facility_update.lua b/supervisor/facility_update.lua index 2927023..43fe86b 100644 --- a/supervisor/facility_update.lua +++ b/supervisor/facility_update.lua @@ -824,8 +824,9 @@ end --#endregion ----@param _self _facility_self -return function (_self) - self = _self +-- link the self instance and return the update interface +---@param fac_self _facility_self +return function (fac_self) + self = fac_self return update end diff --git a/supervisor/session/svsessions.lua b/supervisor/session/svsessions.lua index e4fd99e..ff17bb9 100644 --- a/supervisor/session/svsessions.lua +++ b/supervisor/session/svsessions.lua @@ -300,10 +300,8 @@ function svsessions.check_rtu_id(unit, list, max) -- add to the list for the user if fail_code > 0 and fail_code ~= 3 then - local r_id = unit.get_reactor() - local idx = unit.get_device_idx() - local type = unit.get_unit_type() - local msg = "? (error)" + local r_id, idx, type = unit.get_reactor(), unit.get_device_idx(), unit.get_unit_type() + local msg if r_id == 0 then msg = "the facility's "