From 6e51e70b62fe26c421f7d97ae9c1ca83f03a7143 Mon Sep 17 00:00:00 2001 From: Mikayla Fischler Date: Mon, 21 Aug 2023 21:37:56 -0400 Subject: [PATCH] #232 cleanup and fixes --- coordinator/config.lua | 2 +- coordinator/iocontrol.lua | 4 ++-- coordinator/ui/layout/flow_view.lua | 8 ++++++++ 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/coordinator/config.lua b/coordinator/config.lua index 66edbc7..bdf01e2 100644 --- a/coordinator/config.lua +++ b/coordinator/config.lua @@ -36,6 +36,6 @@ config.LOG_PATH = "/log.txt" -- 1 = NEW (replaces existing file on start) config.LOG_MODE = 0 -- true to log verbose debug messages -config.LOG_DEBUG = true +config.LOG_DEBUG = false return config diff --git a/coordinator/iocontrol.lua b/coordinator/iocontrol.lua index 4149500..78cd0e2 100644 --- a/coordinator/iocontrol.lua +++ b/coordinator/iocontrol.lua @@ -193,7 +193,7 @@ function iocontrol.init(conf, comms) io.facility.tank_list = tank_list end - -- create facility tanks + -- create facility tank tables for i = 1, #io.facility.tank_list do if io.facility.tank_list[i] == 2 then table.insert(io.facility.tank_ps_tbl, psil.create()) @@ -307,7 +307,7 @@ function iocontrol.init(conf, comms) end -- create tank tables - if entry.has_tank then + if io.facility.tank_defs[i] == 1 then table.insert(entry.tank_ps_tbl, psil.create()) table.insert(entry.tank_data_tbl, {}) end diff --git a/coordinator/ui/layout/flow_view.lua b/coordinator/ui/layout/flow_view.lua index 5577604..292095c 100644 --- a/coordinator/ui/layout/flow_view.lua +++ b/coordinator/ui/layout/flow_view.lua @@ -247,7 +247,9 @@ local function init(main) PipeNetwork{parent=main,x=139,y=15,pipes=po_pipes,bg=colors.lightGray} + ----------------- -- tank valves -- + ----------------- local next_f_id = 1 @@ -265,7 +267,9 @@ local function init(main) end end + ------------------- -- dynamic tanks -- + ------------------- for i = 1, #tank_list do if tank_list[i] > 0 then @@ -324,7 +328,9 @@ local function init(main) end end + --------- -- SPS -- + --------- local sps = Div{parent=main,x=140,y=3,height=12} @@ -347,7 +353,9 @@ local function init(main) sps_rate.register(facility.sps_ps_tbl[1], "process_rate", function (r) sps_rate.update(r * 1000) end) + ---------------- -- statistics -- + ---------------- TextBox{parent=main,x=145,y=16,text="PROC. WASTE",alignment=TEXT_ALIGN.CENTER,width=19,height=1,fg_bg=wh_gray} local pr_waste = Rectangle{parent=main,x=145,y=17,border=border(1,colors.gray,true),width=19,height=5,thin=true,fg_bg=bw_fg_bg}