only ramp up on reactor plc

This commit is contained in:
Mikayla Fischler 2024-04-09 22:19:53 -04:00
parent da300607f1
commit a22f5562cf
2 changed files with 4 additions and 3 deletions

View File

@ -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.7.5"
local R_PLC_VERSION = "v1.7.6"
local println = util.println
local println_ts = util.println_ts

View File

@ -662,8 +662,9 @@ function threads.thread__setpoint_control(smem)
if (type(cur_burn_rate) == "number") and (setpoints.burn_rate ~= cur_burn_rate) and rps.is_active() then
last_burn_sp = setpoints.burn_rate
-- update without ramp if <= 2.5 mB/t change
running = math.abs(setpoints.burn_rate - cur_burn_rate) > 2.5
-- update without ramp if <= 2.5 mB/t increase
-- no need to ramp down, as the ramp up poses the safety risks
running = (setpoints.burn_rate - cur_burn_rate) > 2.5
if running then
log.debug(util.c("SPCTL: starting burn rate ramp from ", cur_burn_rate, " mB/t to ", setpoints.burn_rate, " mB/t"))