From eca303e289f42aea421e3abaf5a15a1bfd6ec3d1 Mon Sep 17 00:00:00 2001 From: Mikayla Fischler Date: Wed, 19 Apr 2023 21:21:19 -0400 Subject: [PATCH] #208 ui cleanup for indicating emergency coolant status --- reactor-plc/panel/front_panel.lua | 16 ++++++++-------- reactor-plc/startup.lua | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/reactor-plc/panel/front_panel.lua b/reactor-plc/panel/front_panel.lua index dee017b..9d1a051 100644 --- a/reactor-plc/panel/front_panel.lua +++ b/reactor-plc/panel/front_panel.lua @@ -80,11 +80,17 @@ local function init(monitor) local active = LED{parent=status,x=2,width=12,label="RCT ACTIVE",colors=cpair(colors.green,colors.green_off)} - local status_trip_rct = Rectangle{parent=status,width=20,height=3,x=1,y=2,border=border(1,colors.lightGray,true),even_inner=true,fg_bg=cpair(colors.black,colors.ivory)} + -- only show emergency coolant LED if emergency coolant is configured for this device + if type(config.EMERGENCY_COOL) == "table" then + local emer_cool = LED{parent=status,x=2,width=14,label="EMER COOLANT",colors=cpair(colors.yellow,colors.yellow_off)} + databus.rx_field("emer_cool", emer_cool.update) + end + + local status_trip_rct = Rectangle{parent=status,width=20,height=3,x=1,border=border(1,colors.lightGray,true),even_inner=true,fg_bg=cpair(colors.black,colors.ivory)} local status_trip = Div{parent=status_trip_rct,width=18,height=1,fg_bg=cpair(colors.black,colors.lightGray)} local scram = LED{parent=status_trip,width=10,label="RPS TRIP",colors=cpair(colors.red,colors.red_off),flash=true,period=flasher.PERIOD.BLINK_250_MS} - local controls_rct = Rectangle{parent=status,width=17,height=3,x=1,y=5,border=border(1,colors.white,true),even_inner=true,fg_bg=cpair(colors.black,colors.ivory)} + local controls_rct = Rectangle{parent=status,width=17,height=3,x=1,border=border(1,colors.white,true),even_inner=true,fg_bg=cpair(colors.black,colors.ivory)} local controls = Div{parent=controls_rct,width=15,height=1,fg_bg=cpair(colors.black,colors.white)} PushButton{parent=controls,x=1,y=1,min_width=7,text="SCRAM",callback=databus.rps_scram,fg_bg=cpair(colors.black,colors.red),active_fg_bg=cpair(colors.black,colors.red_off)} PushButton{parent=controls,x=9,y=1,min_width=7,text="RESET",callback=databus.rps_reset,fg_bg=cpair(colors.black,colors.yellow),active_fg_bg=cpair(colors.black,colors.yellow_off)} @@ -92,12 +98,6 @@ local function init(monitor) databus.rx_field("reactor_active", active.update) databus.rx_field("rps_scram", scram.update) - -- only show emergency coolant LED if emergency coolant is configured for this device - if type(config.EMERGENCY_COOL) == "table" then - local emer_cool = LED{parent=status,x=9,width=14,label="EMER COOLANT",colors=cpair(colors.yellow,colors.yellow_off)} - databus.rx_field("emer_cool", emer_cool.update) - end - -- -- about footer -- diff --git a/reactor-plc/startup.lua b/reactor-plc/startup.lua index 17be32a..eb2d6e8 100644 --- a/reactor-plc/startup.lua +++ b/reactor-plc/startup.lua @@ -18,7 +18,7 @@ local plc = require("reactor-plc.plc") local renderer = require("reactor-plc.renderer") local threads = require("reactor-plc.threads") -local R_PLC_VERSION = "v1.1.8" +local R_PLC_VERSION = "v1.1.9" local println = util.println local println_ts = util.println_ts