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

@@ -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()