fixed acknowledge packets to use error flag, fixed 'static'-like function scope of modbus functions

This commit is contained in:
Mikayla Fischler
2022-09-18 22:02:17 -04:00
parent 3267e7ff13
commit 88c34d8bca
4 changed files with 41 additions and 42 deletions

View File

@@ -353,7 +353,7 @@ function rtu.comms(version, modem, local_port, server_port, conn_watchdog)
-- check if there are more than 3 active transactions
-- still queue the packet, but this may indicate a problem
if unit.pkt_queue.length() > 3 then
reply = unit.modbus_io.reply__srv_device_busy(packet)
reply = modbus.reply__srv_device_busy(packet)
log.debug("queueing new request with " .. unit.pkt_queue.length() ..
" transactions already in the queue" .. unit_dbg_tag)
end