Skip to content
This repository has been archived by the owner on Sep 22, 2020. It is now read-only.

Prevent non logical values from entering commands and subsystems #75

Open
pklito opened this issue Jan 27, 2020 · 5 comments
Open

Prevent non logical values from entering commands and subsystems #75

pklito opened this issue Jan 27, 2020 · 5 comments

Comments

@pklito
Copy link
Collaborator

pklito commented Jan 27, 2020

Create borders which limit the values entering a method.
Specifically, we need to limit negative values entering the conveyor when intaking, and positive values when outtaking. If we fail to prevent these cases, we will reach many infinite commands and illogical methods.

One suggestion is to split the setPowers, so that they will always face the position they are intended to turn to.

@katzuv
Copy link
Member

katzuv commented Jan 27, 2020

Use the motor controllers' methods (limit ramp rate, set nominal output to 1, soft limits for the turret, etc.). This should be quite easy.

@pklito
Copy link
Collaborator Author

pklito commented Feb 3, 2020

That isn't what we need. we want the intake motor to spin both ways, but only spin inwards in the intake command, so there should be a check about a negative value there, or force it to be positive

@katzuv
Copy link
Member

katzuv commented Feb 3, 2020

OK, this explanation is more specific…
You could still set temporary nominal output limits, although I don't recommend that.
Anyway, I still recommend using the motor controllers' configs in places they fit, to make sure your subsystems don't break or smoke.

@pklito
Copy link
Collaborator Author

pklito commented Feb 3, 2020

Sure, we could prevent the shooter from turning the other direction

@katzuv
Copy link
Member

katzuv commented Feb 4, 2020

I also recommend adding soft limits for the turret.

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

No branches or pull requests

2 participants