EZ-Robotics / EZ-Template

Simple plug-and-play PROS template that handles drive base functions for VEX robots.
https://ez-robotics.github.io/EZ-Template/
Mozilla Public License 2.0
69 stars 27 forks source link

Bug Repot - complex logic causing slow robots in 2v2 #81

Closed RyanNet11 closed 7 months ago

RyanNet11 commented 8 months ago

Expected Behavior

Normal driving functions overall while in 2v2 match

Actual Behavior

While inside the 2v2 match, plugged into the arena software (any place, weve triend multiple), the movments of the robot is visibly sluggish. The robot moves slowly and super sluggish.

Steps to Reproduce

https://github.com/RyanNet11/-REDACTED-

using this code, the robot is just sliggish. My main thought would be that we have 2 while loops, one being void opcontrol() { // This is preference to what you like to drive on. chassis.set_drive_brake(MOTOR_BRAKE_COAST);

while (true) {

chassis.tank(); // Tank control
// chassis.arcade_standard(ez::SPLIT); // Standard split arcade
// chassis.arcade_standard(ez::SINGLE); // Standard single arcade
// chassis.arcade_flipped(ez::SPLIT); // Flipped split arcade
// chassis.arcade_flipped(ez::SINGLE); // Flipped single arcade

// . . .
// Put more user control code here!
// . . .
diverControl();
pros::delay(ez::util::DELAY_TIME); // This is used for timer calculations!  Keep this ez::util::DELAY_TIME

} } and than we have another one inside the driverControl() while (true){

  chassis.tank();

if(master.get_digital(pros::E_CONTROLLER_DIGITAL_R2)){        //If R2 is being held

Wings.set_value(HIGH);    //Spread the wings

}else if (master.get_digital(pros::E_CONTROLLER_DIGITAL_R1)){ //If R2 is not being held

  Wings.set_value (LOW); //Tuck the wings in 

} My other thought is that maybe we are using too much logic and its slowing down the robot? There should be no reason that a robot is only sluggish inside a 2v2 match. we are fine normally, we can do skills runs perfectly, but 2v2 is always sluggish.

Versions

Run prosv5 conduct info-project to see what versions you're running. PROS Kernel Version: EZ-Template Version:

Additional Information

Failure Logs

Screenshots or snippets of code that are causing issue.

ssejrog commented 7 months ago

Can you download a new version of EZ-Template and setup your drive ports? Don't add anything else to the code. This test will show us if the problems you're having are EZ-Template issues or a problem with some code that was added to the project.