Added a way to control the arm, lift, and wrist mechanisms.

Made the arm check the height of the lift and move to a different state based on the height of the lift
and made the wrist move a specific amount only when the arm passes a threshold.
Added new functions that allow me to quickly change the controller and buttons being used to control
different mechanisms.
Added a new function specificly for autonomouse which allows me to select the desired positon of every
mechanism.
Changed the name of almost every function and enumeration to better match the rest of the program.
This commit is contained in:
Carter committed 2026-09-05 19:01:14 -04:00
1 parent 0e8b70cf39
commit 6d79b61626
6 files changed
+457 -37

No files matched your search

+15 -7
View File
@@ -25,18 +25,14 @@ ez::Drive chassis(
// ez::tracking_wheel vert_tracker(9, 2.75, 4.0); // This tracking wheel is parallel to the drive wheels
// Arm constructor
ArmMech armSetup(
{0, 300},
2);
ArmMech armSetup();
// Lift constructor
LiftMech liftSetup(
{0, 100, 200},
{0, 100, 200, 300},
3);
4);
// Wrist constructor
WristMech wristSetup(
@@ -57,7 +53,12 @@ void initialize() {
pros::delay(500); // Stop the user from doing anything while legacy ports configure
armObj.set_state_values({1, 2}, {1, 2}, {1, 2}, {1, 2});
armRotation.reset_position();
liftRotation.reset_position();
wristRotation.reset_position();
pros::Task liftControlTasck([&]{
while (true) {
armObj.arm_control();
@@ -286,6 +287,13 @@ void opcontrol() {
pistonControl.control_piston(Pistons::claw_piston, ControlPeriod::driver,
Controller::slave, Buttons::arrow_buttons);
armObj.arm_driver_control(Controller::master, Buttons::left_shoulder_buttons);
liftObj.lift_driver_control(Controller::master, Buttons::right_shoulder_buttons);
armObj.arm_driver_control(Controller::slave, Buttons::left_shoulder_buttons);
liftObj.lift_driver_control(Controller::slave, Buttons::right_shoulder_buttons);
wristObj.wrist_driver_control(Controller::slave, Buttons::arrow_buttons);
wristObj.rotate_wrist(90);
// chassis.opcontrol_tank(); // Tank control
chassis.opcontrol_arcade_standard(ez::SPLIT); // Standard split arcade
// chassis.opcontrol_arcade_standard(ez::SINGLE); // Standard single arcade