diff --git a/pocket/iocontrol.lua b/pocket/iocontrol.lua index 0e97602..158c0ec 100644 --- a/pocket/iocontrol.lua +++ b/pocket/iocontrol.lua @@ -50,12 +50,14 @@ local function __generic_ack(success) end -- luacheck: unused args local config = nil ---@type pkt_config +local comms = nil ---@type pocket_comms -- initialize facility-independent components of pocket iocontrol ----@param comms pocket_comms +---@param pkt_comms pocket_comms ---@param nav pocket_nav ---@param cfg pkt_config -function iocontrol.init_core(comms, nav, cfg) +function iocontrol.init_core(pkt_comms, nav, cfg) + comms = pkt_comms config = cfg io.nav = nav @@ -102,9 +104,6 @@ function iocontrol.init_core(comms, nav, cfg) io.api = { get_unit = function (unit) comms.api__get_unit(unit) end } - - -- pass IO control here since it can't be require'd due to a require loop - process.init(io, comms) end -- initialize facility-dependent components of pocket iocontrol @@ -374,6 +373,9 @@ function iocontrol.init_fac(conf) table.insert(io.units, entry) end + + -- pass IO control here since it can't be require'd due to a require loop + process.init(io, comms) end -- set network link state diff --git a/pocket/ui/apps/guide.lua b/pocket/ui/apps/guide.lua index ea494cf..2e93eb7 100644 --- a/pocket/ui/apps/guide.lua +++ b/pocket/ui/apps/guide.lua @@ -209,7 +209,7 @@ local function new_view(root) PushButton{parent=fps,x=2,y=1,text="<",fg_bg=btn_fg_bg,active_fg_bg=btn_active,callback=main_page.nav_to} local fp_common_page = guide_section(sect_construct_data, fps_page, "Common Items", docs.fp.common, 100) - local fp_rplc_page = guide_section(sect_construct_data, fps_page, "Reactor PLC", docs.fp.r_plc, 100) + local fp_rplc_page = guide_section(sect_construct_data, fps_page, "Reactor PLC", docs.fp.r_plc, 150) local fp_rtu_page = guide_section(sect_construct_data, fps_page, "RTU Gateway", docs.fp.rtu_gw, 100) PushButton{parent=fps,y=3,text="Common Items >",fg_bg=btn_fg_bg,active_fg_bg=btn_active,callback=fp_common_page.nav_to} @@ -221,7 +221,7 @@ local function new_view(root) TextBox{parent=gls,y=1,text="Glossary",alignment=ALIGN.CENTER} PushButton{parent=gls,x=3,y=1,text="<",fg_bg=btn_fg_bg,active_fg_bg=btn_active,callback=main_page.nav_to} - local gls_abbv_page = guide_section(sect_construct_data, gls_page, "Abbreviations", docs.glossary.abbvs, 130) + local gls_abbv_page = guide_section(sect_construct_data, gls_page, "Abbreviations", docs.glossary.abbvs, 140) local gls_term_page = guide_section(sect_construct_data, gls_page, "Terminology", docs.glossary.terms, 100) PushButton{parent=gls,y=3,text="Abbreviations >",fg_bg=btn_fg_bg,active_fg_bg=btn_active,callback=gls_abbv_page.nav_to}