   optimize(&stepperC2, 10, 0);
   optimize(&stepperC1, 10, 0);
   isAutoTune = 0;
-}
-
-void calibrate(AccelStepper *chanel, uint8_t sensorPin, boolean run) {
-  long oldPosition = chanel->currentPosition();
-  chanel->setSpeed(-2000);
-  while (digitalRead(sensorPin) == LOW) {
-    chanel->runSpeed();
-    busLoop();
-  }
-  chanel->stop();
-  chanel->setCurrentPosition(0);
-  if (run) {
-    chanel->moveTo(oldPosition);
-  }
-}
-
-void inline calibrateL(boolean run) {
-  calibrate(&stepperL, optInpinL, run);
-}
-
-void inline calibrateC1(boolean run) {
-  calibrate(&stepperC1, optInpinC1, run);
-}
-
-void inline calibrateC2(boolean run) {
-  calibrate(&stepperC2, optInpinC2, run);
 }
 
 void updateStatus() {

}

void optimize(AccelStepper *chanel, int16_t step, int16_t hysteresis) {
  yeld();
  uint16_t prevSetepPwr = rflPwrVal;
  while (step != 0) {
    chanel->move(step);
    yeld();
    if (prevSetepPwr < (rflPwrVal + hysteresis)) {
      step = -(step >> 1);
    }
    prevSetepPwr = rflPwrVal;
    if ((fwdPwrVal == 0) || (rflPwrVal == 0)) {
      break;
    }
  }
}


// Measured 2964 steps 360 degrees revolution.

#include "proto/device_id.h"  // communication protocol device ID 
#include <AccelStepper.h>     // Accel Stepper library

#define PJON_ID ID_MECH       // PJON definition (communication protocol)
#include "proto/common.h"     // communication protocol library
