Open aoberai opened 4 years ago
I believe that the Limelight class should remain and act similarly to how we have motors in util/control. The limelight class would only be created once in HardwareAdapter and it would be written/read in the other Hardware classes.
That makes sense. I agree
Refactor / rease with new codebase changes & test if still works
Currently, the Limelight class is how the robot accesses sensor values from the hardware Limelight and set outputs. That doesn't follow our architecture though as technically the Limelight camera should be put inside HardwareAdapter.VisionHardware and should be read within HardwareReader and written to in HardwareWriter.
Vision in many rights acts as a separate subsystem of the robot. Here's how the new vision architecture should work:
The network table from which the limelight sensor values can be accessed should be put inside HardwareAdapter.VisionHardware. There should be robot state vision variables for each of the values needed from the limelight which would be written to inside of HardwareReader. The Vision subsystem should calculate the outputs for the Limelight based on the visionWantedStates in Commands and the robot state. Finally, HardwareWriter should apply those outputs to the actual Limelight.