Moved the three quarter logic into the wordclock module
This commit is contained in:
parent
0ec3e0c159
commit
4be4e3fcee
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user