renable display at hour mark
break out of cal loop
This commit is contained in:
parent
70f0f6e34c
commit
9be9ccf044
6
CL56.cpp
6
CL56.cpp
@ -1,4 +1,5 @@
|
||||
#include "CL56.h"
|
||||
#include <avr/interrupt.h>
|
||||
|
||||
DualCl56::DualCl56(ShiftReg<16>* shiftReg):
|
||||
_shiftReg(shiftReg)
|
||||
@ -179,7 +180,12 @@ void DualCl56::setBlank(bool blankIn)
|
||||
{
|
||||
_blank = blankIn;
|
||||
if(_blank)
|
||||
{
|
||||
cli();
|
||||
_shiftReg->clear();
|
||||
_shiftReg->clear();
|
||||
sei();
|
||||
}
|
||||
}
|
||||
|
||||
bool DualCl56::getBlank()
|
||||
|
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…
x
Reference in New Issue
Block a user