Skip to content
This repository was archived by the owner on Jan 13, 2025. It is now read-only.

Conversation

@maxspier
Copy link
Member

@maxspier maxspier commented Apr 1, 2023

So basically this is 1241 am and i am putting this pr out so you guys can take a look especially James because i know that he is usually up late so yeah please take a look and hopefully this code wont kill anything because i actually concentrated while writing this.

@maxspier
Copy link
Member Author

maxspier commented Apr 1, 2023

we prob still need to add the run loop maybe 4 like antigrav or smth idk

@maxspier
Copy link
Member Author

maxspier commented Apr 1, 2023

Also need to transfer new PID values

}

if(value + doubleDeadZone < altEncoder1.getSensorPosition() && value - doubleDeadZone > altEncoder1.getSensorPosition()){
if(value + doubleDeadZone < altEncoder1.getPosition() && value - doubleDeadZone > altEncoder1.getPosition()){
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the deadzone comparison are swapped. should be

value + doubleDeadZone > altEncoder1.getPosition() && value - doubleDeadZone < altEncoder1.getPosition()

so i think the antigrav case is never selected. either remove this or fix it (in which case i think you'll need to fix the value of doubleDeadZone - see my comment above)


if(value + doubleDeadZone < altEncoder2.getSensorPosition() && value - doubleDeadZone > altEncoder2.getSensorPosition()){
if(value + doubleDeadZone < altEncoder2.getPosition() && value - doubleDeadZone > altEncoder2.getPosition()){
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same issue here - the comparisons are swapped


if(value + doubleDeadZone < altEncoder1.getSensorPosition() && value - doubleDeadZone > altEncoder1.getSensorPosition()){
if(value + doubleDeadZone < altEncoder1.getPosition() && value - doubleDeadZone > altEncoder1.getPosition()){
getAntiGravFirstJoint();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should be antiGravFirstJoint(); so that the antigrav is actually applied (getAntiGravFirstJoint() just calculates the amount of power to set, but doesn't actually apply it to the motor controller)

*/

//This is our portion with antigrav
// These next 3 antiGrav aren't used.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix this comment: these are used

if(value + doubleDeadZone < altEncoder2.getSensorPosition() && value - doubleDeadZone > altEncoder2.getSensorPosition()){
if(value + doubleDeadZone < altEncoder2.getPosition() && value - doubleDeadZone > altEncoder2.getPosition()){
getAntiGravSecondJoint();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as above - i think this should be antiGravSecondJoint();


}

// These next 2 antiGravs are used.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix this comment: betterGetAntiGravFirstJoint is not used

//HIGH NODE SCORING
Robot.arms.pidForArmOne(-38.34);
Robot.arms.pidForArmTwo(-90.665);
Robot.arms.checkJointTwo(-90.665);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this call should've been in the pidForArmX

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants