First I changed the names for the mechanisms to match the current robot setup. I then made a new header file for the mechansims and a new cpp file for the mechanisms. The mechanisms now work the same way a piston works by allowing you to call the functions and input all the different variables inline. I also had to comment out all the old rotation code because of the changed names and not actually useing them, for now i'm just going to keep all the code where it is so I can look back on it for the future.

This commit is contained in:
Carter committed 2026-11-04 16:59:34 -05:00
1 parent 24ee947fd5
commit 94f88d09d6
11 files changed
+370 -84

No files matched your search

+11 -11
View File
@@ -16,20 +16,20 @@ inline pros::Controller slave(pros::E_CONTROLLER_PARTNER);
/**
* Declares mechinism motors and motor groups.
*/
inline pros::MotorGroup lift({15, -19});
inline pros::MotorGroup wrist({1, 9});
inline pros::Motor arm({6});
inline pros::MotorGroup lift({-1, 2});
inline pros::Motor claw({9});
inline pros::Motor roller({5});
/**
* Declares piston mechanisms.
*/
inline ez::Piston claw({'G',true});
inline ez::Piston PlaceHolder({'G',true});
/**
* Declare limit switches and other ADI sensors
*/
inline pros::ADIButton liftReset({'A'});
inline pros::ADIButton armReset({'B'});
//inline pros::ADIDigitalIn liftReset ('A');
//inline pros::ADIDigitalIn armReset('B');
/**
* Declares all sensors.
@@ -38,11 +38,11 @@ inline pros::ADIButton armReset({'B'});
*
* [2] - Color sensors
*/
inline pros::Rotation liftRotation({17});
inline pros::Rotation armRotation({8});
inline pros::Rotation wristRotation({21});
inline pros::Rotation liftRotation({0});
inline pros::Rotation armRotation({0});
inline pros::Rotation wristRotation({0});
inline pros::Optical colorSensorOne({18});
inline pros::Optical colorSensorTwo({19});
inline pros::Optical colorSensorOne({0});
inline pros::Optical colorSensorTwo({0});
#endif