 
     if (button_now_pressed)
         ++button_pressed_counter;
-    else
-        button_pressed_counter = 0;
+    else{
+        button_pressed_counter = 0; 
+    }
+        
 
     button_was_pressed = button_now_pressed;
     return event;

    switch(eventResult){
        case EV_NONE:               // if nothing append
            //TODO : Ne rien faire de particulier, ou attendre la fin d'une synchronisation
            break;
        case EV_SHORTPRESS:         // if short press
            //TODO : Allumer ou éteindre la LED (a check)
            if(ledState == HIGH){
                if (buttonState == LOW) {
                    turnOff();
                }
            }
            else{
                if (buttonState == LOW) {
                    turnOn();
                }
            }
            break;
        case EV_LONGPRESS:          // if long press


// ######## DEF ########
#define LONGPRESS_LEN    25         // Min nr of loops for a long press
#define DELAY            20        // Delay per loop in ms


// ######## VAR ########
int buttonState = 0;                // variable for reading the pushbutton status
