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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

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