From a3a3e640712f8201ca98da4b4d8d944fc5176154 Mon Sep 17 00:00:00 2001 From: Franziska Kunsmann Date: Sat, 3 Jun 2023 19:03:31 +0200 Subject: [PATCH] rework design to remove c3voc mention --- node.lua | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/node.lua b/node.lua index 80ba863..4441800 100644 --- a/node.lua +++ b/node.lua @@ -27,17 +27,13 @@ function node.render() -- upper: 623 -- lower: 707 - upper_text = "C3VOC: " .. description - - if location == nil or location == '' then - lower_text = "Serial " .. serial - else - lower_text = location .. " - Serial " .. serial - end - + upper_text = description .. " (" .. serial .. ")" upper_width = font:width(upper_text, 40) font:write(960-(upper_width/2), 631, upper_text, 40, 1,1,1,1) - lower_width = font:width(lower_text, 20) - font:write(960-(lower_width/2), 679, lower_text, 20, 1,1,1,1) + if location ~= nil and location ~= '' then + lower_text = location .. " - Serial " .. serial + lower_width = font:width(lower_text, 20) + font:write(960-(lower_width/2), 679, lower_text, 20, 1,1,1,1) + end end