From f1b1603d6e8aa7d7f5fb7960f3fe97ff340e4d5e Mon Sep 17 00:00:00 2001 From: ary Date: Thu, 14 Dec 2023 18:15:40 -0500 Subject: [PATCH] autons and tuning --- CLOUDS/include/autons.hpp | 2 +- CLOUDS/src/autons.cpp | 12 +++++++----- CLOUDS/src/main.cpp | 5 +++-- CLOUDS/src/superstructure.cpp | 14 +++++++------- 4 files changed, 18 insertions(+), 15 deletions(-) diff --git a/CLOUDS/include/autons.hpp b/CLOUDS/include/autons.hpp index 46dfbcd..14aab12 100644 --- a/CLOUDS/include/autons.hpp +++ b/CLOUDS/include/autons.hpp @@ -4,7 +4,7 @@ void near_side(); void far_side(); -void five_triball(); +void five_triball_remove(); void four_triball_contact(); void testingAsyncRunning(); void skills(); \ No newline at end of file diff --git a/CLOUDS/src/autons.cpp b/CLOUDS/src/autons.cpp index c84b61c..575b9a9 100644 --- a/CLOUDS/src/autons.cpp +++ b/CLOUDS/src/autons.cpp @@ -134,7 +134,7 @@ void five_triball_remove() { turnSync(80); setIntakeSpeed(8000); driveSync(10, true); - driveSync(-20, true); + driveSync(-17.5, true); pros::delay(250); turnSync(-37); setIntakeSpeed(-12000); @@ -150,16 +150,18 @@ void five_triball_remove() { driveSync(53, true); driveSync(-20, true); - turnSync(125); - driveSync(65, true); + turnSync(138); + driveSync(77, true); wings.open(); turnSync(30); driveSync(12, true); - rightSwing(0); + rightSwing(15); wings.close(); - driveSync(35, true); + setIntakeSpeed(12000); + driveSync(32, true); + driveSync(-10, true); togglePto(false); } diff --git a/CLOUDS/src/main.cpp b/CLOUDS/src/main.cpp index 1ab6a66..ffff04e 100644 --- a/CLOUDS/src/main.cpp +++ b/CLOUDS/src/main.cpp @@ -23,7 +23,7 @@ void initialize() { Add autonomous paths to the auto selection */ ary::autonselector::auton_selector.add_autons({ - Auton("Five triballl\n\nThey ain't believe in us.. but GOD DID :speaking_head:", five_triball), + Auton("Five triballl\n\nThey ain't believe in us..", five_triball_remove), Auton("Far side \n\nFar from alliance goal", near_side), Auton("Near side (far from alliance goal) \n\nCLOSE TO ALLIANCE GOAL", far_side), Auton("Four triball contact\n\nfour triballs and then contact elevation", four_triball_contact), @@ -52,6 +52,7 @@ void opcontrol() { while (true) { globals::chassis.tank_control(); - renu_control(); + renu_control(); + pros::delay(ary::util::DELAY_TIME); } } \ No newline at end of file diff --git a/CLOUDS/src/superstructure.cpp b/CLOUDS/src/superstructure.cpp index ac7cff9..26109df 100644 --- a/CLOUDS/src/superstructure.cpp +++ b/CLOUDS/src/superstructure.cpp @@ -50,9 +50,9 @@ namespace superstruct // Adjust exit conditions to allow for quick movements void configureExitConditions() { - chassis.set_exit_condition(chassis.turn_exit, 25, 2, 75, 3, 50, 75); - chassis.set_exit_condition(chassis.swing_exit, 100, 3, 75, 7, 50, 75); - chassis.set_exit_condition(chassis.drive_exit, 15, 85, 75, 150, 50, 75); + chassis.set_exit_condition(chassis.turn_exit, 45, 2, 150, 3, 435, 435); + chassis.set_exit_condition(chassis.swing_exit, 100, 3, 400, 7, 435, 435); + chassis.set_exit_condition(chassis.drive_exit, 35, 80, 200, 150, 435, 435); } // Adjust PID constants for accurate movements @@ -60,10 +60,10 @@ namespace superstruct { chassis.set_slew_min_power(80, 80); chassis.set_slew_distance(7, 7); - chassis.set_pid_constants(&chassis.headingPID, 16, 0, 40, 0); - chassis.set_pid_constants(&chassis.forward_drivePID, 2.5, 0.003, 16.5, 0); - chassis.set_pid_constants(&chassis.backward_drivePID, 2.5, 0.003, 16.5, 0); - chassis.set_pid_constants(&chassis.turnPID, 8.5, 0.002, 75, 15); + chassis.set_pid_constants(&chassis.headingPID, 16, 0, 52, 0); + chassis.set_pid_constants(&chassis.forward_drivePID, 3, 0, 18, 0); + chassis.set_pid_constants(&chassis.backward_drivePID, 3, 0, 18, 0); + chassis.set_pid_constants(&chassis.turnPID, 8, 0.001, 80, 15); chassis.set_pid_constants(&chassis.swingPID, 8.5, 0, 50, 0); }