     }
     if (_currentDelays > 2000)
     {
-        delay(floorf(_currentDelays / 1000));
+        delay((int)(_currentDelays / 1000));
         delayMicroseconds(_currentDelays % 1000);
     }
     else

{
    long distX = xPositionToGo(_state.tx);
    long distY = yPositionToGo(_state.ty);

#ifdef DEBUG
    String str = "position:";
    str += _positionX;
    str += ",";
    str += _positionY;
// Serial.println(str);
#endif
    if (distX == 0 && distY == 0)
        return;
    _state.e2 = _state.err;
    if (_state.e2 > -_state.dx)
    {
        _state.err -= _state.dy;
        stepX(_state.dirX);
    }
    if (_state.e2 < _state.dy)
    {
        _state.err += _state.dx;
        stepY(_state.dirY);

    Serial.begin(115200);
    delay(1000);
    Serial.println("opened");
    stepperX.setMicroStep(16);
    stepperY.setMicroStep(16);
}

void loop()
