From d7ea68ed3a9b0b931c2ec55c7565c59fc29dd18c Mon Sep 17 00:00:00 2001 From: Mikayla Fischler Date: Thu, 29 Aug 2024 22:49:20 -0400 Subject: [PATCH] #403 reactor PLC docs --- pocket/ui/apps/guide.lua | 2 +- pocket/ui/docs.lua | 10 +++++++--- pocket/ui/pages/guide_section.lua | 2 +- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/pocket/ui/apps/guide.lua b/pocket/ui/apps/guide.lua index 50e58b9..d1fc2c8 100644 --- a/pocket/ui/apps/guide.lua +++ b/pocket/ui/apps/guide.lua @@ -214,7 +214,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, 150) + local fp_rplc_page = guide_section(sect_construct_data, fps_page, "Reactor PLC", docs.fp.r_plc, 180) local fp_rtu_page = guide_section(sect_construct_data, fps_page, "RTU Gateway", docs.fp.rtu_gw, 70) PushButton{parent=fps,y=3,text="Common Items >",fg_bg=btn_fg_bg,active_fg_bg=btn_active,callback=fp_common_page.nav_to} diff --git a/pocket/ui/docs.lua b/pocket/ui/docs.lua index c815897..17c47d0 100644 --- a/pocket/ui/docs.lua +++ b/pocket/ui/docs.lua @@ -162,9 +162,9 @@ docs.fp = { target = docs.fp.common sect("Core Status") -doc("fp_status", "STATUS", "This is always lit, except on the Reactor PLC. For that, it is green once initialized and OK (has all its peripherals) and red if something is wrong, in which case you should refer to the other indicator lights.") +doc("fp_status", "STATUS", "This is always lit, except on the Reactor PLC (see Reactor PLC section).") doc("fp_heartbeat", "HEARTBEAT", "This alternates between lit and unlit as the main loop on the device runs. If this freezes, something is wrong and the logs will indicate why.") -sect("Network") +sect("Hardware & Network") doc("fp_modem", "MODEM", "This lights up if the wireless/ender modem is connected. In parentheses is the unique computer ID of this device, which will show up in places such as the supervisor's connection lists.") doc("fp_modem", "NETWORK", "This is present when in standard color modes and indicates the network status using multiple colors.") list(DOC_LIST_TYPE.LED, { "not linked", "linked", "link denied", "bad comms version", "duplicate PLC" }, { colors.gray, colors.green, colors.red, colors.orange, colors.yellow }) @@ -176,7 +176,11 @@ doc("fp_fw", "FW", "Firmware application version of this device.") doc("fp_nt", "NT", "Network (comms) version this device has. These must match between devices in order for them to connect.") target = docs.fp.r_plc -sect("Network") +sect("Core Status") +doc("fp_status", "STATUS", "This is green once the PLC is initialized and OK (has all its peripherals) and red if something is wrong, in which case you should refer to the other indicator lights (REACTOR & MODEM).") +sect("Hardware & Network") +doc("fp_rplc_reactor", "REACTOR", "This indicates the status of the connected reactor peripheral.") +list(DOC_LIST_TYPE.LED, { "disconnected", "unformed", "ok" }, { colors.red, colors.yellow, colors.green }) doc("fp_nt_collision", "NT COLLISION", "(color accessibility modes only)", "This indicates the Reactor PLC unit ID is a duplicate of another already connected Reactor PLC.") sect("Co-Routine States") doc("fp_rplc_rt_main", "RT MAIN", "This lights up as long as the device's main loop co-routine is running, which it should be as long as STATUS is green.") diff --git a/pocket/ui/pages/guide_section.lua b/pocket/ui/pages/guide_section.lua index 326cbd5..55a094c 100644 --- a/pocket/ui/pages/guide_section.lua +++ b/pocket/ui/pages/guide_section.lua @@ -42,7 +42,7 @@ return function (data, base_page, title, items, scroll_height) TextBox{parent=section_view_div,y=1,text=title,alignment=ALIGN.CENTER} PushButton{parent=section_view_div,x=3,y=1,text="<",fg_bg=btn_fg_bg,active_fg_bg=btn_active,callback=section_page.nav_to} - local name_list = ListBox{parent=section_div,x=1,y=3,scroll_height=30,nav_fg_bg=cpair(colors.lightGray,colors.gray),nav_active=cpair(colors.white,colors.gray)} + local name_list = ListBox{parent=section_div,x=1,y=3,scroll_height=40,nav_fg_bg=cpair(colors.lightGray,colors.gray),nav_active=cpair(colors.white,colors.gray)} local def_list = ListBox{parent=section_view_div,x=1,y=3,scroll_height=scroll_height,nav_fg_bg=cpair(colors.lightGray,colors.gray),nav_active=cpair(colors.white,colors.gray)} local _end