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

Convert Arm class to interface #3

Merged
merged 2 commits into from
Feb 27, 2024
Merged

Convert Arm class to interface #3

merged 2 commits into from
Feb 27, 2024

Conversation

AceiusRedshift
Copy link
Member

Michael recently began to encounter errors on the test bot relating to the arm, since it does not have one. In order to resolve this issue, I have devised the following fix:

  1. Create an interface around the Arm class (ArmInterface)
  2. Rename the Arm class to RealArm and make it extend from the interface
  3. Create a dummy subsystem DummyArm that implements the interface but does not actually execute any code
  4. When setting the value of RobotContainer.arm, use a ternary operator to detect if the robot has an arm (using the bot-dependant constant ArmConstants.HAS_ARM) and decide what class to instantiate.

@AceiusRedshift AceiusRedshift self-assigned this Feb 27, 2024
@MeowAzalea
Copy link
Contributor

LGTM 👍 thumbs up! Lets get that bread team! YIPPEE. 8032 REDSHIFT #1 YEAAHHH!!!!!!!

@MeowAzalea MeowAzalea merged commit a4d5f81 into main Feb 27, 2024
1 check passed
@AceiusRedshift AceiusRedshift deleted the arm-interface branch February 29, 2024 17:19
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