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

Car wash and control panel motors need to be combined. #32

Open
varun7654 opened this issue Feb 13, 2021 · 0 comments
Open

Car wash and control panel motors need to be combined. #32

varun7654 opened this issue Feb 13, 2021 · 0 comments
Assignees
Labels
2021 robot enhancement New feature or request

Comments

@varun7654
Copy link
Contributor

Both motors will be connected to the same controller and will run at the same time. When the ControlPanel wants to run its code it should disable the Hopper from running the carwash (frontMotor in the code!). It should do this by setting a boolean in Hopper.java. The hopper will then check the boolean every time it attempts to change the state of that motor. The control panel should also set the value back to its original when it is done using the motor.

You might be able to have two separate motor objects that control the same motor. In that case, you can just set the Control panel motor to the same id as the car wash motor. If not you'll need to make a method in the Hopper to return its motor object. I'll do some testing and get back here if you need to do the latter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2021 robot enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants