updated globals list, fixed packet references that were linking to old controller mistakenly
This commit is contained in:
3
.vscode/settings.json
vendored
3
.vscode/settings.json
vendored
@@ -6,6 +6,7 @@
|
||||
"rs",
|
||||
"bit",
|
||||
"parallel",
|
||||
"colors"
|
||||
"colors",
|
||||
"textutils"
|
||||
]
|
||||
}
|
||||
@@ -234,7 +234,7 @@ threads.thread__unit_comms = function (smem, unit)
|
||||
elseif msg.qtype == mqueue.TYPE.PACKET then
|
||||
-- received a packet
|
||||
unit.modbus_busy = true
|
||||
local return_code, reply = unit.modbus_io.handle_packet(packet)
|
||||
local return_code, reply = unit.modbus_io.handle_packet(msg.message)
|
||||
rtu_comms.send_modbus(reply)
|
||||
unit.modbus_busy = false
|
||||
end
|
||||
|
||||
@@ -99,8 +99,8 @@ rtu.new_session = function (id, in_queue, out_queue)
|
||||
self.connected = false
|
||||
elseif pkt.type == SCADA_MGMT_TYPES.RTU_ADVERT then
|
||||
-- RTU unit advertisement
|
||||
for i = 1, packet.length do
|
||||
local unit = packet.data[i]
|
||||
for i = 1, pkt.length do
|
||||
local unit = pkt.data[i]
|
||||
end
|
||||
else
|
||||
log.debug(log_header .. "handler received unsupported SCADA_MGMT packet type " .. pkt.type)
|
||||
|
||||
Reference in New Issue
Block a user