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