frc1418 / 2020-offseason

Experimental code for the 2021 season
MIT License
0 stars 4 forks source link

Simplify structure of ControlPanel/ColorSensor classes #30

Open AndrewLester opened 3 years ago

AndrewLester commented 3 years ago

My suggestion is to move the logic inside the ControlPanelColorSensor class to the ControlPanelSubsystem class. Then, move the ControlPanelColor enum into the ControlPanelSubsystem class too, or put it in its own file.

We'll wait on #25 for this

ArchdukeTim commented 3 years ago

I wouldn't move the color sensor stuff into the subsystem class. It's still it's own entity. What I think will make it easier is to move the logic for determining the turnToColor into the subsystem. After all, what color you turn to is based on how the mechanism interacts with the physical game piece. I played around with it this afternoon because I saw how complex the interactions between the subsystem, sensor, and commands are.