     // If you just entered duty cycle mode
     // start first window
     if (!inDutyCycleMode) {
-      windowStartTime = millis();
+      windowStartTime = currentMillis;
     }
 
     // 1min is 60'000 ms    

double temperature;
double setpoint;
double dutyCycle;
PID temperaturePID(&temperature, &dutyCycle, &setpoint, 50, 0, 0, DIRECT);
  
const int adcSubstract = 51;
const int adcMax = 784;

  kCOMM_ERROR = 000, 
  kSTATUS = 001,
  kTEMPERATURE = 002, 
  kINOUTSET = 003,
  kSEND_CMDS_END, // Mustnt delete this line
};

#define STATMSG "1,"
#define INOUTSETMSG "3,"
#define ENDMSG ";\r\n"

// Commands we send from the PC and want to recieve on the Arduino.
