17 int left =
controller.get_analog(pros::E_CONTROLLER_ANALOG_LEFT_Y);
18 int right =
controller.get_analog(pros::E_CONTROLLER_ANALOG_RIGHT_X);
28 int left =
controller.get_analog(pros::E_CONTROLLER_ANALOG_LEFT_Y);
29 int right =
controller.get_analog(pros::E_CONTROLLER_ANALOG_RIGHT_X);
31 chassis.arcade(left, right,
false, 0.6);
38 int left =
controller.get_analog(pros::E_CONTROLLER_ANALOG_LEFT_Y);
39 int right =
controller.get_analog(pros::E_CONTROLLER_ANALOG_RIGHT_Y);
76 std::cout <<
"Curvature Drive" << std::endl;
77 return "Curvature Drive";
80 std::cout <<
"Arcade Drive" << std::endl;
81 return "Arcade Drive";
84 std::cout <<
"Tank Drive" << std::endl;
87 std::cout <<
"Not a valid drivetrain control mode!" << std::endl;
88 return "Not a valid driveMode!";
static std::string toggleDrive()
Cycles through each drivetrain control mode.
void run()
Runs the drivetrain.
static std::string SwitchDrive(int driveMode)
Switches the DriveTrain mode between arcade and tank drive.
DRIVE_MODE
Drive control schemes.
void ArcadeDrive()
Drives the robot using arcade drive.
static DRIVE_MODE driveMode
Active drive control scheme.
Drivetrain()
Initializes the Drivetrain object.
void CurvatureDrive()
Drives the robot using curvature drive.
void TankDrive()
Drives the robot using tank drive.
Contains the declaration of the Drivetrain class.
lemlib::Chassis chassis(drivetrain, lateral_controller, angular_controller, sensors, &throttle_curve, &steer_curve)
pros::Controller controller(pros::E_CONTROLLER_MASTER)