diff --git a/coordinator/startup.lua b/coordinator/startup.lua index 9294633..a3cf6fa 100644 --- a/coordinator/startup.lua +++ b/coordinator/startup.lua @@ -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 diff --git a/coordinator/ui/pgi.lua b/coordinator/ui/pgi.lua index 5e4077f..b603465 100644 --- a/coordinator/ui/pgi.lua +++ b/coordinator/ui/pgi.lua @@ -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 diff --git a/graphics/core.lua b/graphics/core.lua index cff4ff5..534d4e2 100644 --- a/graphics/core.lua +++ b/graphics/core.lua @@ -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 diff --git a/graphics/element.lua b/graphics/element.lua index 4630a53..145ee0c 100644 --- a/graphics/element.lua +++ b/graphics/element.lua @@ -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 diff --git a/supervisor/panel/pgi.lua b/supervisor/panel/pgi.lua index 9065f72..dd8b202 100644 --- a/supervisor/panel/pgi.lua +++ b/supervisor/panel/pgi.lua @@ -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 diff --git a/supervisor/startup.lua b/supervisor/startup.lua index 123ba21..59f5c4f 100644 --- a/supervisor/startup.lua +++ b/supervisor/startup.lua @@ -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