 
 #define     ENCODER_INTEGRAL_FORCE      1
 
-// endcoder needed variables
+// encoder needed variables
 uint32_t encoderSpeed, setPoint = 1000, powerLevel, encoderLastSignalChange = 0, encoderLastTimeBetweenPeaks = 0, bufferForEncoder;
 
 // main tasks time handling

  
  // send end to tester
  Serial.write(0xFC);
}
    // static flag for peak detection
    static uint8_t peakStarted = 0;

    // in case the peak ended we need to update the last time between peaks
    if (1 == peakStarted)
    {
        // load the new peak to peak time in the variable
        encoderLastTimeBetweenPeaks = micros() - encoderLastSignalChange;

        // reset peak started flag
