The Drive constructor is used to build drivetrains with varying levels of tracking and odometry support. Every drive style requires a V5 inertial sensor. To ensure the code compiles, you must follow the provided examples exactly and only fill in the existing fields; do not add or remove parameters from the constructor.
Optical Encoder Wiring Note: For red optical encoders, the top wire is plugged into the port indicated in VexCode, and the bottom wire is plugged into the port immediately below it. For example, port "3" corresponds to triports C (top) and D (bottom); port "5" corresponds to ports E (top) and F (bottom).
Drive::Drive(
enum::drive_setup drive_setup,
motor_group DriveL,
motor_group DriveR,
int gyro_port,
float wheel_diameter,
float wheel_ratio,
float gyro_scale,
int DriveLF_port,
int DriveRF_port,
int DriveLB_port,
int DriveRB_port,
int ForwardTracker_port,
float ForwardTracker_diameter,
float ForwardTracker_center_distance,
int SidewaysTracker_port,
float SidewaysTracker_diameter,
float SidewaysTracker_center_distance
);