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
|
---@class ioctl
|
||||||
local io = {}
|
local io = {}
|
||||||
|
|
||||||
-- luacheck push ignore
|
-- luacheck push ignore success
|
||||||
|
|
||||||
-- placeholder acknowledge function for type hinting
|
-- placeholder acknowledge function for type hinting
|
||||||
---@param success boolean
|
---@param success boolean
|
||||||
|
File diff suppressed because one or more lines are too long
@ -113,7 +113,7 @@ end
|
|||||||
---@return table lines
|
---@return table lines
|
||||||
function util.strwrap(str, limit) return cc_strings.wrap(str, limit) end
|
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
|
-- concatenation with built-in to string
|
||||||
---@nodiscard
|
---@nodiscard
|
||||||
|
@ -120,9 +120,7 @@ function redstone.new(session_id, unit_id, advert, out_queue)
|
|||||||
local io_f = {
|
local io_f = {
|
||||||
---@nodiscard
|
---@nodiscard
|
||||||
read = function () return rsio.digital_is_active(port, self.phy_io.digital_in[port].phy) end,
|
read = function () return rsio.digital_is_active(port, self.phy_io.digital_in[port].phy) end,
|
||||||
---@param active boolean
|
write = function () end
|
||||||
---@diagnostic disable-next-line: unused-local
|
|
||||||
write = function (active) end
|
|
||||||
}
|
}
|
||||||
|
|
||||||
self.db.io[port] = io_f
|
self.db.io[port] = io_f
|
||||||
@ -155,9 +153,7 @@ function redstone.new(session_id, unit_id, advert, out_queue)
|
|||||||
---@nodiscard
|
---@nodiscard
|
||||||
---@return integer
|
---@return integer
|
||||||
read = function () return self.phy_io.analog_in[port].phy end,
|
read = function () return self.phy_io.analog_in[port].phy end,
|
||||||
---@param value integer
|
write = function () end
|
||||||
---@diagnostic disable-next-line: unused-local
|
|
||||||
write = function (value) end
|
|
||||||
}
|
}
|
||||||
|
|
||||||
self.db.io[port] = io_f
|
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 --
|
-- PUBLIC TEMPLATE FUNCTIONS --
|
||||||
|
|
||||||
|
-- luacheck push no unused args
|
||||||
|
|
||||||
-- handle a packet
|
-- handle a packet
|
||||||
---@param m_pkt modbus_frame
|
---@param m_pkt modbus_frame
|
||||||
---@diagnostic disable-next-line: unused-local
|
---@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)
|
log.debug("template unit_session.update() called", true)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- luacheck pop
|
||||||
|
|
||||||
-- invalidate build cache
|
-- invalidate build cache
|
||||||
function public.invalidate_cache()
|
function public.invalidate_cache()
|
||||||
log.debug("template unit_session.invalidate_cache() called", true)
|
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 svsessions = require("supervisor.session.svsessions")
|
||||||
|
|
||||||
local SUPERVISOR_VERSION = "v0.15.5"
|
local SUPERVISOR_VERSION = "v0.15.6"
|
||||||
|
|
||||||
local println = util.println
|
local println = util.println
|
||||||
local println_ts = util.println_ts
|
local println_ts = util.println_ts
|
||||||
|
@ -15,7 +15,7 @@ local println = util.println
|
|||||||
|
|
||||||
-- supervisory controller communications
|
-- supervisory controller communications
|
||||||
---@nodiscard
|
---@nodiscard
|
||||||
---@param version string supervisor version
|
---@param _version string supervisor version
|
||||||
---@param num_reactors integer number of reactors
|
---@param num_reactors integer number of reactors
|
||||||
---@param cooling_conf table cooling configuration table
|
---@param cooling_conf table cooling configuration table
|
||||||
---@param modem table modem device
|
---@param modem table modem device
|
||||||
@ -23,7 +23,7 @@ local println = util.println
|
|||||||
---@param svctl_listen integer listening port for supervisor access
|
---@param svctl_listen integer listening port for supervisor access
|
||||||
---@param range integer trusted device connection range
|
---@param range integer trusted device connection range
|
||||||
---@diagnostic disable-next-line: unused-local
|
---@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 = {
|
local self = {
|
||||||
last_est_acks = {}
|
last_est_acks = {}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user