renable display at hour mark
break out of cal loop
This commit is contained in:
parent
70f0f6e34c
commit
9be9ccf044
2 changed files with 14 additions and 3 deletions
11
main.cpp
11
main.cpp
|
|
@ -528,16 +528,21 @@ int main()
|
|||
}
|
||||
#endif
|
||||
|
||||
if(time.min == 45)
|
||||
if(time.min == 45 && time.sec == 0)
|
||||
display.setBlank(true);
|
||||
else if(time.min == 0 && time.sec == 0)
|
||||
display.setBlank(false);
|
||||
|
||||
if(time.hour == 0 && time.min == 0 && time.sec == timeOffsetSeconds+10)
|
||||
{
|
||||
DS1302::Timeval timeSet = time;
|
||||
timeSet.sec = 10;
|
||||
clock.setTime(timeSet);
|
||||
display.setString("CAL ");
|
||||
_delay_ms(500);
|
||||
while(clock.getTime().sec <= timeOffsetSeconds+10)
|
||||
{
|
||||
display.setString("CAL ");
|
||||
_delay_ms(500);
|
||||
}
|
||||
}
|
||||
++i;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue