setting up the starter files
This commit is contained in:
1 parent
2c7628bb9f
commit
6be8dd7070
4 files changed
+31
-24
No files matched your search
+18
-13
@@ -12,8 +12,8 @@ ez::Drive chassis(
|
||||
{11, 15, 16, 17}, // Right Chassis Ports (negative port will reverse it!)
|
||||
|
||||
21, // IMU Port
|
||||
4.125, // Wheel Diameter (Remember, 4" wheels without screw holes are actually 4.125!)
|
||||
420.0); // Wheel RPM = cartridge * (motor gear / wheel gear)
|
||||
3.25, // Wheel Diameter (Remember, 4" wheels without screw holes are actually 4.125!)
|
||||
360.0); // Wheel RPM = cartridge * (motor gear / wheel gear)
|
||||
|
||||
// Uncomment the trackers you're using here!
|
||||
// - `8` and `9` are smart ports (making these negative will reverse the sensor)
|
||||
@@ -30,8 +30,8 @@ ez::Drive chassis(
|
||||
* to keep execution time for this mode under a few seconds.
|
||||
*/
|
||||
void initialize() {
|
||||
// Print our branding over your terminal :D
|
||||
ez::ez_template_print();
|
||||
// Prints your logo in the terminal
|
||||
ez::logo_print();
|
||||
|
||||
pros::delay(500); // Stop the user from doing anything while legacy ports configure
|
||||
|
||||
@@ -58,7 +58,10 @@ void initialize() {
|
||||
|
||||
// Autonomous Selector using LLEMU
|
||||
ez::as::auton_selector.autons_add({
|
||||
{"Drive\n\nDrive forward and come back", drive_example},
|
||||
//Custom autonomouse routes go here.
|
||||
|
||||
|
||||
/*{"Drive\n\nDrive forward and come back", drive_example},
|
||||
{"Turn\n\nTurn 3 times.", turn_example},
|
||||
{"Drive and Turn\n\nDrive forward, turn, come back", drive_and_turn},
|
||||
{"Drive and Turn\n\nSlow down during drive", wait_until_change_speed},
|
||||
@@ -71,7 +74,7 @@ void initialize() {
|
||||
{"Pure Pursuit Wait Until\n\nGo to (24, 24) but start running an intake once the robot passes (12, 24)", odom_pure_pursuit_wait_until_example},
|
||||
{"Boomerang\n\nGo to (0, 24, 45) then come back to (0, 0, 0)", odom_boomerang_example},
|
||||
{"Boomerang Pure Pursuit\n\nGo to (0, 24, 45) on the way to (24, 24) then come back to (0, 0, 0)", odom_boomerang_injected_pure_pursuit_example},
|
||||
{"Measure Offsets\n\nThis will turn the robot a bunch of times and calculate your offsets for your tracking wheels.", measure_offsets},
|
||||
{"Measure Offsets\n\nThis will turn the robot a bunch of times and calculate your offsets for your tracking wheels.", measure_offsets},*/
|
||||
});
|
||||
|
||||
// Initialize chassis and auton selector
|
||||
@@ -169,10 +172,10 @@ void ez_screen_task() {
|
||||
1); // Don't override the top Page line
|
||||
|
||||
// Display all trackers that are being used
|
||||
screen_print_tracker(chassis.odom_tracker_left, "l", 4);
|
||||
screen_print_tracker(chassis.odom_tracker_right, "r", 5);
|
||||
screen_print_tracker(chassis.odom_tracker_back, "b", 6);
|
||||
screen_print_tracker(chassis.odom_tracker_front, "f", 7);
|
||||
screen_print_tracker(chassis.odom_tracker_left, "L", 4);
|
||||
screen_print_tracker(chassis.odom_tracker_right, "R", 5);
|
||||
screen_print_tracker(chassis.odom_tracker_back, "B", 6);
|
||||
screen_print_tracker(chassis.odom_tracker_front, "F", 7);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -241,14 +244,16 @@ void ez_template_extras() {
|
||||
*/
|
||||
void opcontrol() {
|
||||
// This is preference to what you like to drive on
|
||||
chassis.drive_brake_set(MOTOR_BRAKE_COAST);
|
||||
chassis.drive_brake_set(MOTOR_BRAKE_HOLD);
|
||||
|
||||
while (true) {
|
||||
// Gives you some extras to make EZ-Template ezier
|
||||
ez_template_extras();
|
||||
|
||||
chassis.opcontrol_tank(); // Tank control
|
||||
// chassis.opcontrol_arcade_standard(ez::SPLIT); // Standard split arcade
|
||||
// Place to call custom functions for driver control
|
||||
|
||||
// chassis.opcontrol_tank(); // Tank control
|
||||
chassis.opcontrol_arcade_standard(ez::SPLIT); // Standard split arcade
|
||||
// chassis.opcontrol_arcade_standard(ez::SINGLE); // Standard single arcade
|
||||
// chassis.opcontrol_arcade_flipped(ez::SPLIT); // Flipped split arcade
|
||||
// chassis.opcontrol_arcade_flipped(ez::SINGLE); // Flipped single arcade
|
||||
|
||||
Reference in new issue
Block a user