diff --git a/RELENTLESS/src/globals.cpp b/RELENTLESS/src/globals.cpp index 2c3baba..2612f7a 100644 --- a/RELENTLESS/src/globals.cpp +++ b/RELENTLESS/src/globals.cpp @@ -1,29 +1,21 @@ #include "globals.hpp" namespace globals { - std::shared_ptr controller(new Controller(ControllerId::master)); + pros::Controller master(CONTROLLER_MASTER); + + pros::Motor motor_fl(4, MOTOR_GEARSET_6, true); + pros::Motor motor_ml(4, MOTOR_GEARSET_6, true); + pros::Motor motor_bl(4, MOTOR_GEARSET_6, true); + pros::Motor motor_fr(4, MOTOR_GEARSET_6, false); + pros::Motor motor_mr(4, MOTOR_GEARSET_6, false); + pros::Motor motor_br(4, MOTOR_GEARSET_6, false); + + pros::Motor_Group left_drive({ motor_fl, motor_ml, motor_bl }); + pros::Motor_Group right_drive({ motor_fr, motor_mr, motor_br }); + + // Chassis - okapi::Motor motor_fl(1, false, AbstractMotor::gearset::blue, AbstractMotor::encoderUnits::degrees); - okapi::Motor motor_ml(2, false, AbstractMotor::gearset::blue, AbstractMotor::encoderUnits::degrees); - okapi::Motor motor_bl(3, false, AbstractMotor::gearset::blue, AbstractMotor::encoderUnits::degrees); - okapi::Motor motor_fr(4, true, AbstractMotor::gearset::blue, AbstractMotor::encoderUnits::degrees); - okapi::Motor motor_mr(5, true, AbstractMotor::gearset::blue, AbstractMotor::encoderUnits::degrees); - okapi::Motor motor_br(6, true, AbstractMotor::gearset::blue, AbstractMotor::encoderUnits::degrees); - - std::shared_ptr left_drive(new MotorGroup({motor_fl, motor_ml, motor_bl})); - std::shared_ptr right_drive(new MotorGroup({motor_fr, motor_mr, motor_br})); - - std::shared_ptr chassis = - ChassisControllerBuilder() - .withMotors(left_drive, right_drive) - .withDimensions({AbstractMotor::gearset::blue, 1.5}, {{3.25_in, 28_cm}, 300 * 1.5}) - .withGains( - {0.45, 0, 5}, - {11, 0, 20}, - {0.001, 0, 0.0001} - ) - .build(); // Electronics / Pneumatics / Sensors