mirror of
https://github.com/MikaylaFischler/cc-mek-scada.git
synced 2024-08-30 18:22:34 +00:00
#232 cleanup and fixes
This commit is contained in:
@ -36,6 +36,6 @@ config.LOG_PATH = "/log.txt"
|
|||||||
-- 1 = NEW (replaces existing file on start)
|
-- 1 = NEW (replaces existing file on start)
|
||||||
config.LOG_MODE = 0
|
config.LOG_MODE = 0
|
||||||
-- true to log verbose debug messages
|
-- true to log verbose debug messages
|
||||||
config.LOG_DEBUG = true
|
config.LOG_DEBUG = false
|
||||||
|
|
||||||
return config
|
return config
|
||||||
|
@ -193,7 +193,7 @@ function iocontrol.init(conf, comms)
|
|||||||
io.facility.tank_list = tank_list
|
io.facility.tank_list = tank_list
|
||||||
end
|
end
|
||||||
|
|
||||||
-- create facility tanks
|
-- create facility tank tables
|
||||||
for i = 1, #io.facility.tank_list do
|
for i = 1, #io.facility.tank_list do
|
||||||
if io.facility.tank_list[i] == 2 then
|
if io.facility.tank_list[i] == 2 then
|
||||||
table.insert(io.facility.tank_ps_tbl, psil.create())
|
table.insert(io.facility.tank_ps_tbl, psil.create())
|
||||||
@ -307,7 +307,7 @@ function iocontrol.init(conf, comms)
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- create tank tables
|
-- 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_ps_tbl, psil.create())
|
||||||
table.insert(entry.tank_data_tbl, {})
|
table.insert(entry.tank_data_tbl, {})
|
||||||
end
|
end
|
||||||
|
@ -247,7 +247,9 @@ local function init(main)
|
|||||||
|
|
||||||
PipeNetwork{parent=main,x=139,y=15,pipes=po_pipes,bg=colors.lightGray}
|
PipeNetwork{parent=main,x=139,y=15,pipes=po_pipes,bg=colors.lightGray}
|
||||||
|
|
||||||
|
-----------------
|
||||||
-- tank valves --
|
-- tank valves --
|
||||||
|
-----------------
|
||||||
|
|
||||||
local next_f_id = 1
|
local next_f_id = 1
|
||||||
|
|
||||||
@ -265,7 +267,9 @@ local function init(main)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-------------------
|
||||||
-- dynamic tanks --
|
-- dynamic tanks --
|
||||||
|
-------------------
|
||||||
|
|
||||||
for i = 1, #tank_list do
|
for i = 1, #tank_list do
|
||||||
if tank_list[i] > 0 then
|
if tank_list[i] > 0 then
|
||||||
@ -324,7 +328,9 @@ local function init(main)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
---------
|
||||||
-- SPS --
|
-- SPS --
|
||||||
|
---------
|
||||||
|
|
||||||
local sps = Div{parent=main,x=140,y=3,height=12}
|
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)
|
sps_rate.register(facility.sps_ps_tbl[1], "process_rate", function (r) sps_rate.update(r * 1000) end)
|
||||||
|
|
||||||
|
----------------
|
||||||
-- statistics --
|
-- statistics --
|
||||||
|
----------------
|
||||||
|
|
||||||
TextBox{parent=main,x=145,y=16,text="PROC. WASTE",alignment=TEXT_ALIGN.CENTER,width=19,height=1,fg_bg=wh_gray}
|
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}
|
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}
|
||||||
|
Reference in New Issue
Block a user