updated
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
local function getValue(env)
|
||||
local value = env.getRadiation()
|
||||
print(value.radiation, value.unit)
|
||||
local stringValue = tostring(value.radiation) .. tostring(value.unit)
|
||||
local stringValue = tostring(value.radiation) .. " " .. tostring(value.unit)
|
||||
return stringValue
|
||||
end
|
||||
|
||||
|
||||
3
main.lua
3
main.lua
@@ -35,6 +35,9 @@ local function runDisplay()
|
||||
monitor.setTextScale(1)
|
||||
while true do
|
||||
monitor.setCursorPos(1, 0)
|
||||
setNewLine()
|
||||
monitor.setBackgroundColor(colors.blue)
|
||||
monitor.write("Reactor Readings:")
|
||||
local drivers = {
|
||||
{ Label = "Status", driver = statusDriver},
|
||||
{ Label = "Temperature", driver = tempDriver },
|
||||
|
||||
@@ -43,7 +43,6 @@ local function report()
|
||||
local value = getValue()
|
||||
local color = colors.black
|
||||
monitor.setBackgroundColor(color)
|
||||
|
||||
setNewLine()
|
||||
monitor.write("Temperature: " .. value .. "F")
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user