             }
         }
     }
+    _sys.isFinish = false;
+    _sys.allowEnding = false;
     switch (code)
     {
     case 'm':

    uint8_t powerPin = 10;
    String buffer = "";
    bool isFinish = true;
};
SystemStatus _sys;
MeStepper steppers[NUM_AXIS] = {MeStepper(SLOT_1), MeStepper(SLOT_2)};

    _sys.statesLength--;
    if (_sys.statesLength <= 0)
    {
        finishCommand();
    }
}
void calcPlanned()
{
    if (_sys.plannedLength < POINTS_COUNT)
    {
        if (_sys.statesLength > 1)
        {
            _sys.allowEnding = true;
            MotionState currentState = _sys.state;
            shiftState();
            MotionState nextState = _sys.state;
            PlannerPoint point;
            point.dir[0] = currentState.targetPosition[0] < nextState.targetPosition[0];
            point.dir[1] = currentState.targetPosition[1] < nextState.targetPosition[1];
            point.targetCount[0] = abs(nextState.targetPosition[0] - currentState.targetPosition[0]);
            point.targetCount[1] = abs(nextState.targetPosition[1] - currentState.targetPosition[1]);
            point.delta[0] = (point.targetCount[0]);
            point.delta[1] = (point.targetCount[1]);
            point.totalCount = point.delta[0] + point.delta[1];
            point.enterSpeed = _sys.plannedIndex > 0 ? _sys.points[_sys.plannedIndex - 1].exitSpeed : _sys.defaultSpeed;
            point.speed = fmax(1, currentState.speed);
            point.exitSpeed = fmax(1, sqrt(nextState.speed));
            point.acceleration = currentState.acceleration;
            long dist = sqrt(point.delta[0] * point.delta[0] + point.delta[1] * point.delta[1]) / 2;
            point.accelCount = point.totalCount - min(dist, _sys.defaultAccelCount);
            point.decelCount = min(dist, _sys.defaultDecelCount);
            point.power = currentState.power;
            point.err = (point.delta[0] > point.delta[1] ? point.delta[0] : -point.delta[1]) / 2;
            _sys.points[_sys.plannedIndex] = point;
            _sys.plannedIndex++;
            _sys.plannedLength++;
        }
        else
        {
        }
    }
}
/**
