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