#include "CoreXY.hpp"
#include "FreeRTOS.h"

#include <math.h>

CoreXYMaschine::CoreXYMaschine(TMC2209_UART * uart_driver0, TMC2209_UART * uart_driver1, TMC2209_step_dual * step_driver) {
    this->uart_driver0 = uart_driver0;
    this->uart_driver1 = uart_driver1;
    this->step_driver = step_driver;

    this->uart_driver0->init();
    this->uart_driver1->init();

    this->xMoveMutex = xSemaphoreCreateMutex();

    initLimitSW();
    setMotorEnabled(true);
}
