From fa61bfb069ea50ecac4e83bb71f990ce0384152a Mon Sep 17 00:00:00 2001 From: ary Date: Sat, 16 Sep 2023 21:34:17 -0400 Subject: [PATCH] cata stuff --- RELENTLESS-Lite/include/globals.hpp | 3 +++ RELENTLESS-Lite/src/globals.cpp | 3 +++ RELENTLESS-Lite/src/main.cpp | 11 ++++++++++- 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/RELENTLESS-Lite/include/globals.hpp b/RELENTLESS-Lite/include/globals.hpp index 6253e11..fe10879 100644 --- a/RELENTLESS-Lite/include/globals.hpp +++ b/RELENTLESS-Lite/include/globals.hpp @@ -18,6 +18,9 @@ namespace globals { extern lemlib::Drivetrain_t chassis_odom; extern Drive chassis; + extern pros::Motor cata_left; + extern pros::Motor cata_right; + extern pros::Rotation enc_left; extern pros::Rotation enc_right; extern pros::Rotation enc_theta; diff --git a/RELENTLESS-Lite/src/globals.cpp b/RELENTLESS-Lite/src/globals.cpp index 42adfd6..ced4502 100644 --- a/RELENTLESS-Lite/src/globals.cpp +++ b/RELENTLESS-Lite/src/globals.cpp @@ -35,6 +35,9 @@ namespace globals { 0.6 ); + pros::Motor cata_left(15, MOTOR_GEAR_100, true); + pros::Motor cata_right(13, MOTOR_GEAR_100, false); + // Electronics / Pneumatics / Sensors // pros::Rotation enc_left(); diff --git a/RELENTLESS-Lite/src/main.cpp b/RELENTLESS-Lite/src/main.cpp index ce061f8..d4c2d67 100644 --- a/RELENTLESS-Lite/src/main.cpp +++ b/RELENTLESS-Lite/src/main.cpp @@ -62,7 +62,16 @@ void opcontrol() { while (true) { //chassis.arcade_standard(ary::SdPLIT, ary::DEFAULT); - chassis.arcade_standard(ary::SPLIT, ary::DEFAULT); + //chassis.arcade_standard(ary::SPLIT, ary::DEFAULT); + chassis.tank(); + + if (globals::master.get_digital(DIGITAL_R1)) { + cata_left.move_voltage(12000); + cata_right.move_voltage(-12000); + } else { + cata_left.move_voltage(0); + cata_right.move_voltage(0); + } pros::delay(ary::util::DELAY_TIME); } } \ No newline at end of file