Skip to content
This repository was archived by the owner on Sep 26, 2023. It is now read-only.

Implement Control Panel subsystem in java #9

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

BrandonWerbel
Copy link
Contributor

No description provided.

@ErikBoesen
Copy link
Member

Make sure to fix your merge conflicts.

Comment on lines +43 to +51
colorNames.add("B");
colorNames.add("G");
colorNames.add("R");
colorNames.add("Y");

colors.add(new Color(0.175, 0.469, 0.356));
colors.add(new Color(0.188, 0.503, 0.310));
colors.add(new Color(0.325, 0.453, 0.221));
colors.add(new Color(0.269, 0.550, 0.181));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use a HashMap for these, don't use two different lists.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ArchdukeTim The first time I was writing this, I looked into HashMaps, but I wasn't able to find an ordered HashMap. If you know a way to do this, please let me know.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LinkedHashMap 😉

Copy link
Contributor Author

@BrandonWerbel BrandonWerbel Nov 10, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I looked at LinkedHashMaps, but I couldn't find a way to get a key/object at a certain index, or find the index of a certain key/object. Any thoughts?

solenoidState = DoubleSolenoid.Value.kReverse;
}

public void getFMSColor(){
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't a good name for this since it doesn't return the FMS color. Maybe calculateTurnToColor would be better

Comment on lines +37 to +38
cpMotor = new VictorSPX(2);
cpSolenoid = new DoubleSolenoid(5, 4);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if the team should get in the habit of having a constants class that holds all the port numbers for the different electronics. It may be useful later on to ensure you don't change something in one class but forget to change it in another (e.g if the physical cables were swapped around)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe open an issue for it? That seems like something to focus a different pull request on.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants