Formating added

This commit is contained in:
Ollo 2020-12-10 22:15:27 +01:00
parent efe5b38e58
commit 6746d62567
3 changed files with 17 additions and 17 deletions

View File

@ -3,20 +3,20 @@ local M
do
local updateColor = function (data)
if (data.amountOfChars > 0) then
local div = tonumber(data.drawnCharacters/data.amountOfChars)
if (div < 1) then
return data.colorFg
elseif (div < 2) then
return data.colorMin1
elseif (div < 3) then
return data.colorMin2
elseif (div < 4) then
return data.colorMin3
elseif (div < 5) then
return data.colorMin4
else
return data.colorFg
end
local div = tonumber(data.drawnCharacters/data.amountOfChars)
if (div < 1) then
return data.colorFg
elseif (div < 2) then
return data.colorMin1
elseif (div < 3) then
return data.colorMin2
elseif (div < 4) then
return data.colorMin3
elseif (div < 5) then
return data.colorMin4
else
return data.colorFg
end
else
return data.colorFg
end

View File

@ -72,9 +72,9 @@ function displayTime()
invertRows=true
end
displayword.generateLEDs(words, color, color1, color2, color3, color4, invertRows)
if (displayword.data.drawnCharacters ~= nil) then
if (displayword.data.drawnCharacters ~= nil) then
ledBuf = displayword.generateLEDs(words, color, color1, color2, color3, color4, invertRows, displayword.data.drawnCharacters)
end
end
end
displayword = nil
if (ledBuf ~= nil) then

View File

@ -64,7 +64,7 @@ function display_timestat(hours, minutes, longmode)
ret.before=1
elseif (minutes==9) then
-- Hande if three quater or quater before is displayed
if (threequater ~= nil) then
if ((threequater ~= nil) and (threequater==true or threequater=="on")) then
ret.threequater=1
else
ret.quater = 1