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

SetReferenceAngle #5

Open
mjbergman92 opened this issue Jan 21, 2023 · 0 comments
Open

SetReferenceAngle #5

mjbergman92 opened this issue Jan 21, 2023 · 0 comments

Comments

@mjbergman92
Copy link

mjbergman92 commented Jan 21, 2023

Falcon500SteerControllerFactoryBuilder.java > setReferenceAngle

There is a problem here.... the seeding for the steering Falcon500 has been removed. It is there for the NEO builder, why did it get removed here?Should look something like this:

// YES THE COMMENT IS FOR NEOS. THAT IS HOW SDS HAD IT, NOT MY FAULT. IT APPLIES
// TO FALCONS
// Reset the NEO's encoder periodically when the module is not rotating.
// Sometimes (~5% of the time) when we initialize, the absolute encoder isn't
// fully set up, and we don't
// end up getting a good reading. If we reset periodically this won't matter
// anymore.
if (motor.getSelectedSensorVelocity() * motorEncoderVelocityCoefficient < ENCODER_RESET_MAX_ANGULAR_VELOCITY) {
    if (++resetIteration >= ENCODER_RESET_ITERATIONS) {
        resetIteration = 0;
        double absoluteAngle = absoluteEncoder.getAbsoluteAngle().getRadians();
        motor.setSelectedSensorPosition(absoluteAngle / motorEncoderPositionCoefficient);
        currentAngleRadians = absoluteAngle;
    }
} else {
    resetIteration = 0;
}

Again, I have made my own fork and I hope maybe you could take a look at mine for reference.

I believe there is a way for me to submit a pull request, but i dont know how to only request one particular change, thats my weakness.
The fork is under team 3534 organization, HOC-Team-3534.

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

No branches or pull requests

1 participant