-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add automated tests #35
base: master
Are you sure you want to change the base?
Conversation
|
||
public double getRightCurrent() { | ||
return robot.getPDP().getCurrent(config.rightMotor.getPowerChannel()); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are 2 motors, plugged into 2 PDP channels each. There is a method on SpeedControllerConfig called getTotalCurrent which will get the sum of all of the power channels, which is what we really need
if(lowerLimit) { | ||
setTargetHeight(config.heightBottomLimit); | ||
} else { | ||
setTargetHeight(config.heightTopLimit); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These config values are not the heights of the bottom and top limit sensors. They are the software enforced limits on the range of height. So there needs to be separate values for this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, I don't think this should use setTargetHeight. setTargetHeight moves at nearly the max speed of the lift. Which is wayyyyyyyyyyy faster than you want to run when you are verifying the the lift works.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So we probably need to just run the lift at a constant power until we hit the limit.
|
||
@Override | ||
protected boolean step() { | ||
return (lowerLimit ? isAtBottomLimit() : isAtTopLimit()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test has no failure. There should a timeout, after which the test fails. And if it succeeds, it should output a message
} | ||
|
||
public double getRightCurrent() { | ||
return robot.getPDP().getCurrent(config.rightMotor.getPowerChannel()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These motor controllers are talon srxs. So if you cast the motor controller to WPI_TalonSRX, you can just call getCurrent(). Which will be more accurate than the PDP anyways
2fd13b4
to
eb99072
Compare
ecb3072
to
29d9b2f
Compare
29d9b2f
to
a4f9d69
Compare
a4f9d69
to
16e242e
Compare
16e242e
to
fe25a47
Compare
No description provided.