Moved the three quarter logic into the wordclock module

This commit is contained in:
ollo 2017-02-28 18:36:08 +01:00
parent 0ec3e0c159
commit 4be4e3fcee
2 changed files with 10 additions and 9 deletions

View File

@ -36,14 +36,8 @@ function generateLEDs(words, color)
buf= buf .. space:rep(4)
end
-- line3----------------------------------------------
--TODO ggf. auch ueber viertel vor abbildbar
if (words.threequater == 1) then
if (threequater ~= nil) then
buf= buf .. color:rep(11) -- Dreiviertel
else
buf= buf .. space:rep(4)
buf= buf .. color:rep(7) -- VIERTEL
end
buf= buf .. color:rep(11) -- Dreiviertel
elseif (words.quater == 1) then
buf= buf .. space:rep(4)
buf= buf .. color:rep(7) -- VIERTEL
@ -51,7 +45,7 @@ function generateLEDs(words, color)
buf= buf .. space:rep(11)
end
--line 4-------- even row (so inverted) -------------
if ((words.before == 1) or (words.threequater == 1 and threequater == nil)) then
if ((words.before == 1) or (words.threequater == 1)) then
buf=buf .. space:rep(2)
buf= buf .. color:rep(3) -- VOR
else

View File

@ -62,7 +62,13 @@ function display_timestat(hours, minutes, longmode)
ret.twenty=1
ret.before=1
elseif (minutes==9) then
ret.threequater=1
-- Hande if three quater or quater before is displayed
if (threequater ~= nil) then
ret.threequater=1
else
ret.quater = 1
ret.before = 1
end
elseif (minutes==10) then
ret.tenMin=1
ret.before=1
@ -125,3 +131,4 @@ function display_timestat(hours, minutes, longmode)
collectgarbage()
return ret
end