#575 ensure max burn is a number for multiplying

This commit is contained in:
Mikayla 2024-12-10 23:22:15 +00:00
parent 6838d21bd7
commit 849caa2521
2 changed files with 2 additions and 2 deletions

View File

@ -22,7 +22,7 @@ local supervisor = require("supervisor.supervisor")
local svsessions = require("supervisor.session.svsessions") local svsessions = require("supervisor.session.svsessions")
local SUPERVISOR_VERSION = "v1.5.17" local SUPERVISOR_VERSION = "v1.5.18"
local println = util.println local println = util.println
local println_ts = util.println_ts local println_ts = util.println_ts

View File

@ -813,7 +813,7 @@ function unit.new(reactor_id, num_boilers, num_turbines, ext_idle)
if limit > 0 then if limit > 0 then
self.db.control.lim_br100 = math.floor(limit * 100) self.db.control.lim_br100 = math.floor(limit * 100)
if self.plc_i ~= nil then if (self.plc_i ~= nil) and (type(self.plc_i.get_struct().max_burn) == "number") then
if limit > self.plc_i.get_struct().max_burn then if limit > self.plc_i.get_struct().max_burn then
self.db.control.lim_br100 = math.floor(self.plc_i.get_struct().max_burn * 100) self.db.control.lim_br100 = math.floor(self.plc_i.get_struct().max_burn * 100)
end end