   digitalWrite(PIN_DUSTEXTRACT, dustextract);
 
   if (laststate != machinestate) {
-#if DEBUG5
+#if DEBUG3
     Serial.print("State: <");
-    Serial.print(machinestateNames[laststate]);
+    Serial.print(machinestateName[laststate]);
     Serial.print("> to <");
-    Serial.print(machinestateNames[machinestate]);
+    Serial.print(machinestateName[machinestate]);
     Serial.print("> O="); Serial.print(overload);
     Serial.print(" 1="); Serial.print(v1);
     Serial.print(" 2="); Serial.print(v2);


  static unsigned long last_wifi_ok = 0;
  if (WiFi.status() != WL_CONNECTED) {
    if (machinestate <= WAITINGFORCARD)
      machinestate = NOCONN;
    if ( millis() - last_wifi_ok > 10000) {
      Log.println("Connection dead for 10 seconds now -- Rebooting...");
      ESP.restart();
    }
  } else { 
    if (machinestate == NOCONN)
      machinestate == WAITINGFORCARD;
    last_wifi_ok = millis();
  };
  
#ifdef OTA
  ArduinoOTA.handle();
#endif

  MFRC522::Uid uid = mfrc522.uid;
#endif

  if (uid.size == 0)
    return 0;

  lasttag[0] = 0;
