diff --git a/include/EZ-Template/util.hpp b/include/EZ-Template/util.hpp index 94d9d1d..0f8f552 100644 --- a/include/EZ-Template/util.hpp +++ b/include/EZ-Template/util.hpp @@ -26,9 +26,9 @@ extern pros::Controller master; namespace ez { /** - * Prints our branding all over your pros terminal. + * Prints your chooses logo in the terminal */ -void ez_template_print(); +void logo_print(); /** * Prints to the brain screen in one string. diff --git a/src/EZ-Template/util.cpp b/src/EZ-Template/util.cpp index e56fcd1..5158924 100644 --- a/src/EZ-Template/util.cpp +++ b/src/EZ-Template/util.cpp @@ -14,18 +14,15 @@ pros::Controller master(pros::E_CONTROLLER_MASTER); namespace ez { int mode = DISABLE; -void ez_template_print() { +void logo_print() { std::cout << R"( + _________ ________ ____ __ + < < /__ \ / ____/ // /\ \/ / + / // /__/ //___ \/ // /_ \ / + / // // __/____/ /__ __/ / / + /_//_//____/_____/ /_/ /_/ - _____ ______ _____ _ _ - | ___|___ / |_ _| | | | | - | |__ / /_____| | ___ _ __ ___ _ __ | | __ _| |_ ___ - | __| / /______| |/ _ \ '_ ` _ \| '_ \| |/ _` | __/ _ \ - | |___./ /___ | | __/ | | | | | |_) | | (_| | || __/ - \____/\_____/ \_/\___|_| |_| |_| .__/|_|\__,_|\__\___| - | | - |_| )" << '\n'; } std::string get_last_word(std::string text) { diff --git a/src/autons.cpp b/src/autons.cpp index 548c4b8..92056b6 100644 --- a/src/autons.cpp +++ b/src/autons.cpp @@ -48,6 +48,11 @@ void default_constants() { chassis.pid_angle_behavior_set(ez::shortest); // Changes the default behavior for turning, this defaults it to the shortest path there } +/// +// Custom auton routes +// + + /// // Drive Example /// diff --git a/src/main.cpp b/src/main.cpp index 83e72a4..e2f768e 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -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