added Luacheck GitHub action (#210)

* added shields.io elements
* #209 luacheck action
* #209 cleanup to pass luacheck
* added check statuses to readme
This commit is contained in:
Mikayla
2023-04-12 16:02:29 -04:00
committed by GitHub
parent 3ae39b2455
commit c987d14d8d
35 changed files with 93 additions and 114 deletions

View File

@@ -14,9 +14,6 @@ local ESTABLISH_ACK = comms.ESTABLISH_ACK
local SCADA_MGMT_TYPE = comms.SCADA_MGMT_TYPE
local RTU_UNIT_TYPE = types.RTU_UNIT_TYPE
local print = util.print
local println = util.println
local print_ts = util.print_ts
local println_ts = util.println_ts
-- create a new RTU unit
@@ -347,8 +344,8 @@ function rtu.comms(version, modem, local_port, server_port, range, conn_watchdog
if protocol == PROTOCOL.MODBUS_TCP then
---@cast packet modbus_frame
if rtu_state.linked then
local return_code = false
local reply = modbus.reply__neg_ack(packet)
local return_code ---@type boolean
local reply ---@type modbus_packet
-- handle MODBUS instruction
if packet.unit_id <= #units then