Skip to content
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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

add automated tests #35

wants to merge 3 commits into from

Conversation

abbbbbby
Copy link
Contributor

No description provided.


public double getRightCurrent() {
return robot.getPDP().getCurrent(config.rightMotor.getPowerChannel());
}
Copy link
Contributor

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);
Copy link
Contributor

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

Copy link
Contributor

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.

Copy link
Contributor

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());
Copy link
Contributor

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());
Copy link
Contributor

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

@abbbbbby abbbbbby force-pushed the add-automatedTests branch 2 times, most recently from ecb3072 to 29d9b2f Compare March 4, 2018 21:51
@abbbbbby abbbbbby force-pushed the add-automatedTests branch from a4f9d69 to 16e242e Compare April 13, 2018 03:28
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