Merge pull request #294 from MikaylaFischler/devel

2023.07.19 Hotfix
This commit is contained in:
Mikayla 2023-07-19 19:18:48 -04:00 committed by GitHub
commit bdbb3071b3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 37 additions and 21 deletions

View File

@ -22,7 +22,7 @@ local sounder = require("coordinator.sounder")
local apisessions = require("coordinator.session.apisessions")
local COORDINATOR_VERSION = "v0.21.1"
local COORDINATOR_VERSION = "v0.21.2"
local println = util.println
local println_ts = util.println_ts

View File

@ -52,6 +52,8 @@ function pgi.delete_pkt_entry(session_id)
if not success then
log.error(util.c("PGI: failed to delete PKT entry (", result, ")"), true)
end
else
log.debug(util.c("PGI: tried to delete unknown PKT entry ", session_id))
end
end

View File

@ -7,7 +7,7 @@ local flasher = require("graphics.flasher")
local core = {}
core.version = "1.0.1"
core.version = "1.0.2"
core.flasher = flasher
core.events = events

View File

@ -71,7 +71,8 @@ function element.new(args, child_offset_x, child_offset_y)
p_window = nil, ---@type table
position = { x = 1, y = 1 }, ---@type coordinate_2d
bounds = { x1 = 1, y1 = 1, x2 = 1, y2 = 1 }, ---@class element_bounds
next_y = 1,
next_y = 1, -- next child y coordinate
next_id = 0, -- next child ID
subscriptions = {},
mt = {}
}
@ -352,13 +353,14 @@ function element.new(args, child_offset_x, child_offset_y)
local child_element = child.get()
if key == nil then
table.insert(protected.children, child_element)
return #protected.children
else
protected.children[key] = child_element
return key
local id = key ---@type string|integer|nil
if id == nil then
id = self.next_id
self.next_id = self.next_id + 1
end
protected.children[id] = child_element
return id
end
-- remove a child element

File diff suppressed because one or more lines are too long

View File

@ -30,7 +30,7 @@ local sna_rtu = require("rtu.dev.sna_rtu")
local sps_rtu = require("rtu.dev.sps_rtu")
local turbinev_rtu = require("rtu.dev.turbinev_rtu")
local RTU_VERSION = "v1.5.4"
local RTU_VERSION = "v1.5.5"
local RTU_UNIT_TYPE = types.RTU_UNIT_TYPE
local RTU_UNIT_HW_STATE = databus.RTU_UNIT_HW_STATE

View File

@ -308,7 +308,9 @@ function threads.thread__comms(smem)
-- thread loop
while true do
-- check for messages in the message queue
local handle_start = util.time()
-- check for messages in the message queue while not shut down
while comms_queue.ready() and not rtu_state.shutdown do
local msg = comms_queue.pop()
@ -324,10 +326,16 @@ function threads.thread__comms(smem)
end
end
-- quick yield
util.nop()
-- max 100ms spent processing queue
if util.time() - handle_start > 100 then
log.warning("comms thread exceeded 100ms queue process limit")
break
end
end
-- quick yield
util.nop()
-- check for termination request
if rtu_state.shutdown then
rtu_comms.close(rtu_state)
@ -414,6 +422,12 @@ function threads.thread__unit_comms(smem, unit)
util.nop()
end
-- check for termination request
if rtu_state.shutdown then
log.info("rtu unit thread exiting -> " .. short_name)
break
end
-- check if multiblock is still formed if this is a multiblock
if unit.is_multiblock and (util.time_ms() - last_f_check > 250) then
local is_formed = unit.device.isFormed()
@ -507,12 +521,6 @@ function threads.thread__unit_comms(smem, unit)
-- update hw status
databus.tx_unit_hw_status(unit.uid, unit.hw_state)
-- check for termination request
if rtu_state.shutdown then
log.info("rtu unit thread exiting -> " .. short_name)
break
end
-- delay before next check
last_update = util.adaptive_delay(COMMS_SLEEP, last_update)
end

View File

@ -60,6 +60,8 @@ function pgi.delete_rtu_entry(session_id)
if not success then
log.error(util.c("PGI: failed to delete RTU entry (", result, ")"), true)
end
else
log.debug(util.c("PGI: tried to delete unknown RTU entry ", session_id))
end
end
@ -87,6 +89,8 @@ function pgi.delete_pdg_entry(session_id)
if not success then
log.error(util.c("PGI: failed to delete PDG entry (", result, ")"), true)
end
else
log.debug(util.c("PGI: tried to delete unknown PDG entry ", session_id))
end
end

View File

@ -21,7 +21,7 @@ local supervisor = require("supervisor.supervisor")
local svsessions = require("supervisor.session.svsessions")
local SUPERVISOR_VERSION = "v0.20.3"
local SUPERVISOR_VERSION = "v0.20.4"
local println = util.println
local println_ts = util.println_ts