renable display at hour mark

break out of cal loop
This commit is contained in:
uvos 2023-10-12 16:02:32 +02:00
parent 70f0f6e34c
commit 9be9ccf044
2 changed files with 14 additions and 3 deletions

View File

@ -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()

View File

@ -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;
}