This commit is contained in:
2025-06-14 17:53:47 -04:00
parent 7000c008ef
commit a6e5fe9e90
5 changed files with 8 additions and 9 deletions

View File

@@ -22,14 +22,14 @@ end
local function watch() local function watch()
end end
function stepUp() local function stepUp()
-- local value = getValue() -- local value = getValue()
-- if value < max then -- if value < max then
-- reactor.setBurnRate(value + rateStep) -- reactor.setBurnRate(value + rateStep)
-- end -- end
end end
function stepDown() local function stepDown()
-- local value = getValue() -- local value = getValue()
-- if value > min then -- if value > min then
-- reactor.setBurnRate(value - rateStep) -- reactor.setBurnRate(value - rateStep)
@@ -43,4 +43,4 @@ local function report()
monitor.clearLine() monitor.clearLine()
monitor.write("Burn Rate: " .. value) monitor.write("Burn Rate: " .. value)
end end
return { report = report, watch = watch } return { report = report, watch = watch, stepUp = stepUp, stepDown = stepDown }

View File

@@ -22,7 +22,7 @@ local function watch()
checkCoolantLevel() checkCoolantLevel()
end end
function checkCoolantLevel() local function checkCoolantLevel()
local coolantLevel = getValue() local coolantLevel = getValue()
return true return true
end end

View File

@@ -20,7 +20,7 @@ local function watch()
end end
function checkStatus() local function checkStatus()
local value = getValue() local value = getValue()
end end

View File

@@ -3,8 +3,7 @@ local min = 212
local function getValue() local function getValue()
-- local kelvin = reactor.getTemperature() or 0 local kelvin = reactor.getTemperature() or 0
local kelvin = 3000
local fahrenheit = (kelvin - 273.15) * 9 / 5 + 32 local fahrenheit = (kelvin - 273.15) * 9 / 5 + 32
return math.floor(fahrenheit * 10000 + 0.5) / 10000 return math.floor(fahrenheit * 10000 + 0.5) / 10000
end end
@@ -27,7 +26,7 @@ local function watch()
checkTemperature() checkTemperature()
end end
function checkTemperature() local function checkTemperature()
local temperature = getValue() local temperature = getValue()
local upperThreshold = max - 20 local upperThreshold = max - 20
local lowerThreshold = min + 20 local lowerThreshold = min + 20

View File

@@ -24,7 +24,7 @@ local function watch()
checkSteamLevel() checkSteamLevel()
end end
function checkSteamLevel() local function checkSteamLevel()
local value = getValue() local value = getValue()
if value > max then if value > max then
print("Warning: Steam above maximum! Taking action.") print("Warning: Steam above maximum! Taking action.")