Minute 1 to 4 are also correctly set, next to the displayed logic

This commit is contained in:
ollo 2016-04-20 17:51:28 +02:00
parent bf3304cc38
commit 1fe0a2b80c
3 changed files with 53 additions and 3 deletions

1
.gitignore vendored
View File

@ -1 +1,2 @@
wlancfg.lua
*.swp

View File

@ -133,8 +133,59 @@ checkWords(leds, expected, 13 , 00)
-- test the minutes inbetween
leds=display_timestat(14,01)
expected={}
expected.itis=1
expected.two=1
expected.min1=1
expected.clock=1
checkWords(leds, expected, 14 , 01)
leds=display_timestat(15,02)
expected={}
expected.itis=1
expected.three=1
expected.min2=1
expected.clock=1
checkWords(leds, expected, 15 , 02)
leds=display_timestat(16,03)
expected={}
expected.itis=1
expected.four=1
expected.min3=1
expected.clock=1
checkWords(leds, expected, 16 , 03)
leds=display_timestat(17,04)
expected={}
expected.itis=1
expected.five=1
expected.min4=1
expected.clock=1
checkWords(leds, expected, 17 , 04)
leds=display_timestat(18,06)
expected={}
expected.fiveMin=1
expected.after=1
expected.min1=1
expected.six=1
checkWords(leds, expected, 18 , 06)
leds=display_timestat(19,09)
expected={}
expected.fiveMin=1
expected.after=1
expected.min4=1
expected.seven=1
checkWords(leds, expected, 19 , 09)
leds=display_timestat(20,17)
expected={}
expected.quater=1
expected.after=1
expected.min2=1
expected.eight=1
checkWords(leds, expected, 20 , 17)

View File

@ -20,9 +20,7 @@ function display_timestat(hours, minutes, longmode)
-- transcode minutes
local minutesLeds = minutes%5
minutes=minutes/5
minutes=math.floor(minutes/5)
-- "It is" only display each half hour and each hour
-- or if longmode is set