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
-- end
-- end
local function watch()
end
local function stepUp()
-- local value = getValue()
@@ -36,6 +35,10 @@ local function stepDown()
-- end
end
local function watch()
end
local function report()
local color = color()
monitor.setBackgroundColor(color)

View File

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

View File

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

View File

@@ -8,24 +8,6 @@ local function getValue()
return math.floor(fahrenheit * 10000 + 0.5) / 10000
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 temperature = getValue()
local upperThreshold = max - 20
@@ -40,6 +22,27 @@ local function checkTemperature()
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 value = getValue()
local color = color()

View File

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