         digitalWrite(P_LED_DATA, HIGH);
         break;
       case LED_STATE_FLASHING:
-        if (currentlyFlashing) {
-          digitalWrite(P_LED_DATA, HIGH);
-        } else {
-          digitalWrite(P_LED_DATA, LOW);
-        }
-        currentlyFlashing = !currentlyFlashing;
+        flashed = true;
+        digitalWrite(P_LED_DATA, flashingCurrentState);
         break;
     }
 

  pinMode(P_LED_CLOCK, OUTPUT);
  pinMode(P_LED_LATCH, OUTPUT);

  states[1] = LED_STATE_FLASHING;
  states[4] = LED_STATE_ON;
  states[5] = LED_STATE_ON;
  states[8] = LED_STATE_ON;
  states[10] = LED_STATE_ON;
  shiftOut();

  //Thread setup
  flasherThread = Thread();
  flasherThread.setInterval(1000);
  flasherThread.onRun(threadCallback);
}

void loop() {


Thread flasherThread;

bool flashingCurrentState = true;
bool flashed = false;

void setup() {
  Serial.begin(115200);
