add missing files, support display blanking
This commit is contained in:
23
main.cpp
23
main.cpp
@ -66,13 +66,10 @@ volatile uint8_t displayDevider = 1;
|
||||
|
||||
ISR(TIMER1_COMPA_vect)
|
||||
{
|
||||
if(displayDevider > 1)
|
||||
{
|
||||
TIMSK2 = 0;
|
||||
W433DataReciver::staticInterrupt();
|
||||
writePin(&PORTB, PB5, !readPin(&PORTB, PB5));
|
||||
TIMSK2 = 1;
|
||||
}
|
||||
TIMSK2 = 0;
|
||||
W433DataReciver::staticInterrupt();
|
||||
writePin(&PORTB, PB5, !readPin(&PORTB, PB5));
|
||||
TIMSK2 = 1;
|
||||
}
|
||||
|
||||
ISR(TIMER2_OVF_vect)
|
||||
@ -89,6 +86,12 @@ ISR(TIMER2_OVF_vect)
|
||||
|
||||
void buttonHandler(uint8_t index, uint8_t type, void* data)
|
||||
{
|
||||
if(display.getBlank())
|
||||
{
|
||||
display.setBlank(false);
|
||||
return;
|
||||
}
|
||||
|
||||
if(!setting)
|
||||
{
|
||||
if(index == 0 && type == Buttons::RELEASED)
|
||||
@ -483,10 +486,8 @@ int main()
|
||||
}
|
||||
#endif
|
||||
|
||||
if(time.min > 45)
|
||||
displayDevider = 16;
|
||||
else
|
||||
displayDevider = 1;
|
||||
if(time.min == 45)
|
||||
display.setBlank(true);
|
||||
|
||||
if(time.hour == 0 && time.min == 0 && time.sec == timeOffsetSeconds+10)
|
||||
{
|
||||
|
Reference in New Issue
Block a user