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 do
local updateColor = function (data) local updateColor = function (data)
if (data.amountOfChars > 0) then if (data.amountOfChars > 0) then
local div = tonumber(data.drawnCharacters/data.amountOfChars) local div = tonumber(data.drawnCharacters/data.amountOfChars)
if (div < 1) then if (div < 1) then
return data.colorFg return data.colorFg
elseif (div < 2) then elseif (div < 2) then
return data.colorMin1 return data.colorMin1
elseif (div < 3) then elseif (div < 3) then
return data.colorMin2 return data.colorMin2
elseif (div < 4) then elseif (div < 4) then
return data.colorMin3 return data.colorMin3
elseif (div < 5) then elseif (div < 5) then
return data.colorMin4 return data.colorMin4
else else
return data.colorFg return data.colorFg
end end
else else
return data.colorFg return data.colorFg
end end

View File

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

View File

@ -64,7 +64,7 @@ function display_timestat(hours, minutes, longmode)
ret.before=1 ret.before=1
elseif (minutes==9) then elseif (minutes==9) then
-- Hande if three quater or quater before is displayed -- 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 ret.threequater=1
else else
ret.quater = 1 ret.quater = 1