4#define DEFAULT_DELAY_LENGTH 15
16 int throttle =
controller.get_analog(pros::E_CONTROLLER_ANALOG_LEFT_Y);
17 int turn =
controller.get_analog(pros::E_CONTROLLER_ANALOG_RIGHT_X);
32 int throttle =
controller.get_analog(pros::E_CONTROLLER_ANALOG_LEFT_Y);
33 int turn =
controller.get_analog(pros::E_CONTROLLER_ANALOG_RIGHT_X);
47 int throttle =
controller.get_analog(pros::E_CONTROLLER_ANALOG_LEFT_Y);
48 int turn =
controller.get_analog(pros::E_CONTROLLER_ANALOG_RIGHT_Y);
90 std::cout <<
"Curvature Drive" << std::endl;
91 return "Curvature Drive";
94 std::cout <<
"Arcade Drive" << std::endl;
95 return "Arcade Drive";
98 std::cout <<
"Tank Drive" << std::endl;
101 std::cout <<
"Not a valid drivetrain control mode!" << std::endl;
102 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.
static int thrustHandler(int thrust)
Toggles the orientation of the drivetrain.
void TankDrive()
Drives the robot using tank drive.
#define DEFAULT_DELAY_LENGTH
Contains the declaration of the Drivetrain class.
lemlib::ExpoDriveCurve arcade_turn_curve(1, 8, 1.016)
lemlib::Chassis chassis(drivetrain, lateral_controller, angular_controller, sensors, &throttle_curve, &steer_curve)
pros::Controller controller(pros::E_CONTROLLER_MASTER)