#93 added reset RPS command to iocontrol/gui

This commit is contained in:
Mikayla Fischler
2022-10-07 10:19:37 -04:00
parent 62ac993dae
commit 9d60777223
5 changed files with 22 additions and 93 deletions

View File

@@ -44,6 +44,11 @@ function iocontrol.init(conf, comms)
log.debug(util.c("sent unit ", i, ": SCRAM"))
end,
reset_rps = function ()
comms.send_command(i, CRDN_COMMANDS.RESET_RPS)
log.debug(util.c("sent unit ", i, ": RESET_RPS"))
end,
set_burn = function (rate)
comms.send_command(i, CRDN_COMMANDS.SET_BURN, rate)
log.debug(util.c("sent unit ", i, ": SET_BURN = ", rate))

View File

@@ -16,7 +16,7 @@ local config = require("coordinator.config")
local coordinator = require("coordinator.coordinator")
local renderer = require("coordinator.renderer")
local COORDINATOR_VERSION = "alpha-v0.5.0"
local COORDINATOR_VERSION = "alpha-v0.5.1"
local print = util.print
local println = util.println

View File

@@ -19,10 +19,9 @@ local DataIndicator = require("graphics.elements.indicators.data")
local IndicatorLight = require("graphics.elements.indicators.light")
local TriIndicatorLight = require("graphics.elements.indicators.trilight")
local HazardButton = require("graphics.elements.controls.hazard_button")
local MultiButton = require("graphics.elements.controls.multi_button")
local PushButton = require("graphics.elements.controls.push_button")
local SCRAMButton = require("graphics.elements.controls.scram_button")
local StartButton = require("graphics.elements.controls.start_button")
local SpinboxNumeric = require("graphics.elements.controls.spinbox_numeric")
local TEXT_ALIGN = core.graphics.TEXT_ALIGN
@@ -240,8 +239,9 @@ local function init(parent, id)
-- reactor controls --
StartButton{parent=main,x=12,y=44,callback=unit.start,fg_bg=scram_fg_bg}
SCRAMButton{parent=main,x=22,y=44,callback=unit.scram,fg_bg=scram_fg_bg}
HazardButton{parent=main,x=2,y=44,text="START",accent=colors.lightBlue,callback=unit.start,fg_bg=scram_fg_bg}
HazardButton{parent=main,x=12,y=44,text="SCRAM",accent=colors.yellow,callback=unit.scram,fg_bg=scram_fg_bg}
HazardButton{parent=main,x=22,y=44,text="RESET",accent=colors.red,callback=unit.reset_rps,fg_bg=scram_fg_bg}
local burn_control = Div{parent=main,x=12,y=40,width=19,height=3,fg_bg=cpair(colors.gray,colors.white)}
local burn_rate = SpinboxNumeric{parent=burn_control,x=2,y=1,whole_num_precision=4,fractional_precision=1,arrow_fg_bg=cpair(colors.gray,colors.white),fg_bg=cpair(colors.black,colors.white)}