From 41b7a68f3e92bd7c74f24209e9ff503e861b8d83 Mon Sep 17 00:00:00 2001 From: Mikayla Fischler Date: Tue, 14 May 2024 20:10:21 -0400 Subject: [PATCH] #487 stop retrying failed disable when needing to enable --- supervisor/session/plc.lua | 5 ++++- supervisor/startup.lua | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/supervisor/session/plc.lua b/supervisor/session/plc.lua index a863fe2..a4a8271 100644 --- a/supervisor/session/plc.lua +++ b/supervisor/session/plc.lua @@ -658,6 +658,7 @@ function plc.new_session(id, s_addr, reactor_id, in_queue, out_queue, timeout, f local cmd = message.message if cmd == PLC_S_CMDS.ENABLE then -- enable reactor + self.acks.disable = true if not self.auto_lock then _send(RPLC_TYPE.RPS_ENABLE, {}) end @@ -714,6 +715,7 @@ function plc.new_session(id, s_addr, reactor_id, in_queue, out_queue, timeout, f self.auto_cmd_token = 0 self.ramping_rate = true self.acks.burn_rate = false + self.acks.disable = true self.retry_times.burn_rate_req = util.time() + INITIAL_WAIT _send(RPLC_TYPE.MEK_BURN_RATE, { self.commanded_burn_rate, self.ramping_rate }) end @@ -721,13 +723,14 @@ function plc.new_session(id, s_addr, reactor_id, in_queue, out_queue, timeout, f elseif cmd.key == PLC_S_DATA.AUTO_BURN_RATE then -- set automatic burn rate if self.auto_lock then - cmd.val = math.floor(cmd.val * 100) / 100 -- round to 100ths place + cmd.val = math.floor(cmd.val * 100) / 100 -- round to 100ths place if cmd.val >= 0 and cmd.val <= self.sDB.mek_struct.max_burn then self.auto_cmd_token = util.time_ms() self.commanded_burn_rate = cmd.val -- this is only for manual control, only retry auto ramps self.acks.burn_rate = not self.ramping_rate + self.acks.disable = true self.retry_times.burn_rate_req = util.time() + INITIAL_AUTO_WAIT _send(RPLC_TYPE.AUTO_BURN_RATE, { self.commanded_burn_rate, self.ramping_rate, self.auto_cmd_token }) diff --git a/supervisor/startup.lua b/supervisor/startup.lua index 86fd13b..f83e973 100644 --- a/supervisor/startup.lua +++ b/supervisor/startup.lua @@ -21,7 +21,7 @@ local supervisor = require("supervisor.supervisor") local svsessions = require("supervisor.session.svsessions") -local SUPERVISOR_VERSION = "v1.3.10" +local SUPERVISOR_VERSION = "v1.3.11" local println = util.println local println_ts = util.println_ts