updated
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user