From 4823bb5c5f322ac6cb86cdda7d8aebe81cf8016c Mon Sep 17 00:00:00 2001 From: Carter Date: Mon, 20 Jul 2026 17:09:06 -0400 Subject: [PATCH] Updateing files to match the files from the past --- Over-Ride | 1 + include/initialize/setup.hpp | 10 ++++++++++ include/main.h | 1 + src/main.cpp | 34 ++++++++++++++++++++-------------- 4 files changed, 32 insertions(+), 14 deletions(-) create mode 160000 Over-Ride create mode 100644 include/initialize/setup.hpp diff --git a/Over-Ride b/Over-Ride new file mode 160000 index 0000000..8c2e637 --- /dev/null +++ b/Over-Ride @@ -0,0 +1 @@ +Subproject commit 8c2e63752686258061b0495bb4769c045e139b9a diff --git a/include/initialize/setup.hpp b/include/initialize/setup.hpp new file mode 100644 index 0000000..9a05643 --- /dev/null +++ b/include/initialize/setup.hpp @@ -0,0 +1,10 @@ +#include "main.h" +#include "EZ-Template/api.hpp" +#include "api.h" + +#pragma once + +#ifndef CONFIG_H +#define CONFIG_H + +#endif \ No newline at end of file diff --git a/include/main.h b/include/main.h index 987e2f2..932582d 100644 --- a/include/main.h +++ b/include/main.h @@ -42,6 +42,7 @@ //#include "okapi/api.hpp" //#include "pros/api_legacy.h" #include "EZ-Template/api.hpp" +#include "initialize/setup.hpp" // More includes here... #include "autons.hpp" diff --git a/src/main.cpp b/src/main.cpp index 79d745c..31d38e0 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -12,16 +12,16 @@ ez::Drive chassis( {-4, -5, -6}, // Right Chassis Ports (negative port will reverse it!) 7, // IMU Port - 4.125, // Wheel Diameter (Remember, 4" wheels without screw holes are actually 4.125!) - 343); // Wheel RPM = cartridge * (motor gear / wheel gear) + 3.25, // Wheel Diameter (Remember, 4" wheels without screw holes are actually 4.125!) + 360); // 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) // - you should get positive values on the encoders going FORWARD and RIGHT // - `2.75` is the wheel diameter // - `4.0` is the distance from the center of the wheel to the center of the robot -// ez::tracking_wheel horiz_tracker(8, 2.75, 4.0); // This tracking wheel is perpendicular to the drive wheels -// ez::tracking_wheel vert_tracker(9, 2.75, 4.0); // This tracking wheel is parallel to the drive wheels +// ez::tracking_wheel horiz_tracker(8, 3.25, 4.0); // This tracking wheel is perpendicular to the drive wheels +// ez::tracking_wheel vert_tracker(9, 3.25, 4.0); // This tracking wheel is parallel to the drive wheels /** * Runs initialization code. This occurs as soon as the program is started. @@ -58,7 +58,9 @@ void initialize() { // Autonomous Selector using LLEMU ez::as::auton_selector.autons_add({ - {"Drive\n\nDrive forward and come back", drive_example}, + //personal autons 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 +73,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 +171,12 @@ 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, "LV", 4); + screen_print_tracker(chassis.odom_tracker_right, "RV", 5); + screen_print_tracker(chassis.odom_tracker_back, "BH", 6); + screen_print_tracker(chassis.odom_tracker_front, "FH", 7); + + //More display code goes here } } } @@ -241,14 +245,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(); + //ez_template_extras(); - chassis.opcontrol_tank(); // Tank control - // chassis.opcontrol_arcade_standard(ez::SPLIT); // Standard split arcade + //Put function you need to call in driver control here + + // 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