fix doubled padding

was leading to offset of lcd content to the right
This commit is contained in:
Peter Nerlich
2020-11-12 10:11:08 +01:00
committed by GitHub
parent e777c20b41
commit 8c1ba6714e

View File

@ -87,7 +87,7 @@ local generate_line = function(s, ypos)
width = width - 1
local texture = ""
local xpos = math.floor((LCD_WIDTH - 2 * LCD_PADDING - width) / 2 + LCD_PADDING)
local xpos = math.floor((LCD_WIDTH - 2 * LCD_PADDING - width) / 2)
for ii = 1, #parsed do
texture = texture..":"..xpos..","..ypos.."="..parsed[ii]..".png"
xpos = xpos + CHAR_WIDTH + 1