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

[BUG] Possible deadend in curtinfrc::Elevator::OnStatePeriodic #176

Open
met4000 opened this issue Oct 26, 2019 · 0 comments
Open

[BUG] Possible deadend in curtinfrc::Elevator::OnStatePeriodic #176

met4000 opened this issue Oct 26, 2019 · 0 comments
Assignees
Labels
bug Something isn't working common May be used by both teams enhancement New feature or request

Comments

@met4000
Copy link
Contributor

met4000 commented Oct 26, 2019

// Limiters
if (_config.limitSensorTop != nullptr)
if (voltage > 0)
if (_config.limitSensorTop->Get())
voltage = 0;
if (_config.limitSensorBottom != nullptr)
if (voltage < 0)
if (_config.limitSensorBottom->Get()) {
voltage = 0;
GetConfig().spool.encoder->ZeroEncoder();
}

Potential problem with an elevator in kMoving attempting to reach an encoder value 'above' or 'below' the upper/lower limit switches (respectively), and never reaching the target value. Maybe instead of voltage = 0, SetManual(0) or SetHold() could be used, or some sort of 'out of bounds' error/feedback could be given?

@met4000 met4000 added bug Something isn't working enhancement New feature or request common May be used by both teams labels Oct 26, 2019
@met4000 met4000 self-assigned this Oct 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working common May be used by both teams enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant