hide empty location
This commit is contained in:
parent
db856a70c7
commit
379f85749c
1 changed files with 7 additions and 2 deletions
7
node.lua
7
node.lua
|
@ -3,7 +3,7 @@ util.init_hosted()
|
||||||
local json = require "json"
|
local json = require "json"
|
||||||
|
|
||||||
local serial = sys.get_env "SERIAL"
|
local serial = sys.get_env "SERIAL"
|
||||||
local location = "<please wait>"
|
local location = ""
|
||||||
local description = "<please wait>"
|
local description = "<please wait>"
|
||||||
|
|
||||||
util.data_mapper{
|
util.data_mapper{
|
||||||
|
@ -28,7 +28,12 @@ function node.render()
|
||||||
-- lower: 707
|
-- lower: 707
|
||||||
|
|
||||||
upper_text = "C3VOC: " .. description
|
upper_text = "C3VOC: " .. description
|
||||||
|
|
||||||
|
if location == nil or location == '' then
|
||||||
|
lower_text = "Serial " .. serial
|
||||||
|
else
|
||||||
lower_text = location .. " - Serial " .. serial
|
lower_text = location .. " - Serial " .. serial
|
||||||
|
end
|
||||||
|
|
||||||
upper_width = font:width(upper_text, 40)
|
upper_width = font:width(upper_text, 40)
|
||||||
font:write(960-(upper_width/2), 631, upper_text, 40, 1,1,1,1)
|
font:write(960-(upper_width/2), 631, upper_text, 40, 1,1,1,1)
|
||||||
|
|
Loading…
Reference in a new issue