Skip to content

Comments

Amp trap goto action#73

Open
themehdev wants to merge 8 commits intomainfrom
AmpTrapGotoAction
Open

Amp trap goto action#73
themehdev wants to merge 8 commits intomainfrom
AmpTrapGotoAction

Conversation

@themehdev
Copy link
Contributor

No description provided.

// If arm target isn't in no-go-zone
// and the arm target and arm actual aren't on opposite sides
// then they can be run in paralell
if(((armTarget < armNoGoZoneLower || armTarget > armNoGoZoneUpper) && (!(armTarget > armNoGoZoneUpper && subsystem.getArm().getPosition() < armNoGoZoneLower) || !(armTarget < armNoGoZoneLower && subsystem.getArm().getPosition() > armNoGoZoneUpper)))){
Copy link
Contributor

Choose a reason for hiding this comment

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

The armTarget cannot be in the no go zone, so the first part of this conditional will always be true and can be removed.
Also, I believe the conditions (ignoring the first part) is ...

if !crossesMaxToMin || !crossesMinToMax which is probably not what you want.
given the actions, you probably want this to be && because you want to go directly to the targets if you are not crossing.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Why not? if the elevator target is always above the threshold when we move the arm to the no-go-zone, we can have the arm be wherever we want.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That was to the first q, the second q, you are right.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants