diff --git a/main.cpp b/main.cpp index ebf2635..7f6b2c2 100644 --- a/main.cpp +++ b/main.cpp @@ -26,7 +26,7 @@ #define COMMAND_BUFFER_SIZE 64 #define SNPRINTF_BUFFER_SIZE 96 -#define welcomeString "HELO SAS" +#define welcomeString "HELOJANA" static constexpr bool bdayMsg = false; void buttonHandler(uint8_t index, uint8_t type, void* data); @@ -70,8 +70,10 @@ ISR(TIMER2_OVF_vect) { display.tick(); buttons.tick(); - if(ringging && ((timer % 4 == 0 && timer < 128) || (timer > 128 && timer % 16 == 0)) ) writePin(&PORTD, PD4, true); - else writePin(&PORTD, PD4, false); + if(ringging && ((timer % 4 == 0 && timer < 128) || (timer > 128 && timer % 16 == 0))) + writePin(&PORTD, PD4, true); + else + writePin(&PORTD, PD4, false); ++timer; } @@ -90,8 +92,15 @@ void buttonHandler(uint8_t index, uint8_t type, void* data) } else if(index == 1 && type == Buttons::RELEASED ) { - if(!ringging) if(++alm > 3) alm = 0; - else ringging = false; + if(!ringging) + { + if(++alm > 3) + alm = 0; + } + else + { + ringging = false; + } } else if(index == 1 && type == Buttons::LONG_PRESSED ) { @@ -339,7 +348,6 @@ int main() TCCR1B = 1<