mirror of
https://github.com/MikaylaFischler/cc-mek-scada.git
synced 2024-08-30 18:22:34 +00:00
luacheck fixes
This commit is contained in:
parent
8064b33a36
commit
b2e21cb6d9
@ -18,7 +18,7 @@ local iocontrol = {}
|
||||
---@class ioctl
|
||||
local io = {}
|
||||
|
||||
-- luacheck push ignore
|
||||
-- luacheck push ignore success
|
||||
|
||||
-- placeholder acknowledge function for type hinting
|
||||
---@param success boolean
|
||||
|
File diff suppressed because one or more lines are too long
@ -113,7 +113,7 @@ end
|
||||
---@return table lines
|
||||
function util.strwrap(str, limit) return cc_strings.wrap(str, limit) end
|
||||
|
||||
-- luacheck push no unused varargs
|
||||
-- luacheck push no unused args
|
||||
|
||||
-- concatenation with built-in to string
|
||||
---@nodiscard
|
||||
|
@ -120,9 +120,7 @@ function redstone.new(session_id, unit_id, advert, out_queue)
|
||||
local io_f = {
|
||||
---@nodiscard
|
||||
read = function () return rsio.digital_is_active(port, self.phy_io.digital_in[port].phy) end,
|
||||
---@param active boolean
|
||||
---@diagnostic disable-next-line: unused-local
|
||||
write = function (active) end
|
||||
write = function () end
|
||||
}
|
||||
|
||||
self.db.io[port] = io_f
|
||||
@ -155,9 +153,7 @@ function redstone.new(session_id, unit_id, advert, out_queue)
|
||||
---@nodiscard
|
||||
---@return integer
|
||||
read = function () return self.phy_io.analog_in[port].phy end,
|
||||
---@param value integer
|
||||
---@diagnostic disable-next-line: unused-local
|
||||
write = function (value) end
|
||||
write = function () end
|
||||
}
|
||||
|
||||
self.db.io[port] = io_f
|
||||
|
@ -166,6 +166,8 @@ function unit_session.new(session_id, unit_id, advert, out_queue, log_tag, txn_t
|
||||
|
||||
-- PUBLIC TEMPLATE FUNCTIONS --
|
||||
|
||||
-- luacheck push no unused args
|
||||
|
||||
-- handle a packet
|
||||
---@param m_pkt modbus_frame
|
||||
---@diagnostic disable-next-line: unused-local
|
||||
@ -180,6 +182,8 @@ function unit_session.new(session_id, unit_id, advert, out_queue, log_tag, txn_t
|
||||
log.debug("template unit_session.update() called", true)
|
||||
end
|
||||
|
||||
-- luacheck pop
|
||||
|
||||
-- invalidate build cache
|
||||
function public.invalidate_cache()
|
||||
log.debug("template unit_session.invalidate_cache() called", true)
|
||||
|
@ -14,7 +14,7 @@ local supervisor = require("supervisor.supervisor")
|
||||
|
||||
local svsessions = require("supervisor.session.svsessions")
|
||||
|
||||
local SUPERVISOR_VERSION = "v0.15.5"
|
||||
local SUPERVISOR_VERSION = "v0.15.6"
|
||||
|
||||
local println = util.println
|
||||
local println_ts = util.println_ts
|
||||
|
@ -15,7 +15,7 @@ local println = util.println
|
||||
|
||||
-- supervisory controller communications
|
||||
---@nodiscard
|
||||
---@param version string supervisor version
|
||||
---@param _version string supervisor version
|
||||
---@param num_reactors integer number of reactors
|
||||
---@param cooling_conf table cooling configuration table
|
||||
---@param modem table modem device
|
||||
@ -23,7 +23,7 @@ local println = util.println
|
||||
---@param svctl_listen integer listening port for supervisor access
|
||||
---@param range integer trusted device connection range
|
||||
---@diagnostic disable-next-line: unused-local
|
||||
function supervisor.comms(version, num_reactors, cooling_conf, modem, dev_listen, svctl_listen, range)
|
||||
function supervisor.comms(_version, num_reactors, cooling_conf, modem, dev_listen, svctl_listen, range)
|
||||
local self = {
|
||||
last_est_acks = {}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user