updayeed
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
local function getValue(reactor)
|
||||
local kelvin = reactor.getTemperature() or 0
|
||||
local fahrenheit = (kelvin - 273.15) * 9 / 5 + 32
|
||||
return math.floor(fahrenheit * 100 + 0.5) / 100
|
||||
return math.floor(fahrenheit * 10000 + 0.5) / 10000
|
||||
end
|
||||
|
||||
local function color(reactor)
|
||||
@@ -20,6 +20,6 @@ local function report(reactor, monitor)
|
||||
local color = color(reactor)
|
||||
monitor.setBackgroundColor(color)
|
||||
monitor.clearLine()
|
||||
monitor.write("Temperature: " .. value .. "°F")
|
||||
monitor.write("Temperature: " .. value .. "F")
|
||||
end
|
||||
return { report = report, watch = watch }
|
||||
Reference in New Issue
Block a user