This commit is contained in:
2025-06-14 18:01:55 -04:00
parent a6e5fe9e90
commit 2515a47860
5 changed files with 41 additions and 33 deletions

View File

@@ -19,8 +19,7 @@ end
-- sleep(0.05) -- Update every tenth second -- sleep(0.05) -- Update every tenth second
-- end -- end
-- end -- end
local function watch()
end
local function stepUp() local function stepUp()
-- local value = getValue() -- local value = getValue()
@@ -36,6 +35,10 @@ local function stepDown()
-- end -- end
end end
local function watch()
end
local function report() local function report()
local color = color() local color = color()
monitor.setBackgroundColor(color) monitor.setBackgroundColor(color)

View File

@@ -10,6 +10,10 @@ local function color()
return colors.black return colors.black
end end
local function checkCoolantLevel()
local coolantLevel = getValue()
return true
end
-- local function watch() -- local function watch()
-- while true do -- while true do
@@ -22,11 +26,6 @@ local function watch()
checkCoolantLevel() checkCoolantLevel()
end end
local function checkCoolantLevel()
local coolantLevel = getValue()
return true
end
local function report() local function report()
local value = getValue() local value = getValue()
local color = color() local color = color()

View File

@@ -15,14 +15,16 @@ end
-- end -- end
-- end -- end
local function checkStatus()
local value = getValue()
end
local function watch() local function watch()
checkStatus() checkStatus()
end end
local function checkStatus()
local value = getValue()
end
local function report() local function report()
local value = getValue() local value = getValue()

View File

@@ -8,24 +8,6 @@ local function getValue()
return math.floor(fahrenheit * 10000 + 0.5) / 10000 return math.floor(fahrenheit * 10000 + 0.5) / 10000
end end
local function color()
local temperature = getValue()
return colors.black
end
-- local function watch()
-- while true do
-- print("Temperature: " .. getValue())
-- checkTemperature()
-- sleep(0.05) -- Update every tenth second
-- end
-- end
local function watch()
checkTemperature()
end
local function checkTemperature() local function checkTemperature()
local temperature = getValue() local temperature = getValue()
local upperThreshold = max - 20 local upperThreshold = max - 20
@@ -40,6 +22,27 @@ local function checkTemperature()
end end
end end
local function color()
local temperature = getValue()
return colors.black
end
-- local function watch()
-- while true do
-- print("Temperature: " .. getValue())
-- checkTemperature()
-- sleep(0.05) -- Update every tenth second
-- end
-- end
local function watch()
checkTemperature()
end
local function report() local function report()
local value = getValue() local value = getValue()
local color = color() local color = color()

View File

@@ -19,11 +19,6 @@ end
-- end -- end
-- end -- end
local function watch()
checkSteamLevel()
end
local function checkSteamLevel() local function checkSteamLevel()
local value = getValue() local value = getValue()
if value > max then if value > max then
@@ -45,6 +40,11 @@ local function checkSteamLevel()
end end
end end
local function watch()
checkSteamLevel()
end
local function report() local function report()
local color = color() local color = color()
monitor.setBackgroundColor(color) monitor.setBackgroundColor(color)
@@ -52,4 +52,5 @@ local function report()
monitor.clearLine() monitor.clearLine()
monitor.write("Turbine Steam: " .. value .. "%") monitor.write("Turbine Steam: " .. value .. "%")
end end
return { report = report, watch = watch } return { report = report, watch = watch }