So this is an interesting one. I moved the conditions part of the IntakeSubsystem into it's own set of classes so that all subsystems can benefit from them without having to re-write that code.
To summarize the new system:
A subsystem creates it's own instance of SubsystemConditionManager
Commands and other subsystems can create conditions for that manager
The conditions are created through SubsystemConditionManager.createCondition and are automatically registered so no extra code is required.
The command or other subsystem can now enable and disable it's condition like normal
For an example of how these work, I've modified the intake subsystem and the operator intake command to use this system.
This is very much a first iteration of the code, it's not perfect but I'd like to put it out there and see what you guys think before I go any further. Aside from the regular code review, I'm also looking for feedback on a couple extra things:
The naming of basically everything. I'm bad at names, won't pretend I'm not. If you have a better name for a variable or class LMK.
The placement of the two files. I put the SubsystemConditionManager and SubsystemCondition classes in the subsystems folder mainly because there wasn't already a better place to put it; but since they're not subsystems themselves I think it would be better to move them somewhere else.
So this is an interesting one. I moved the conditions part of the IntakeSubsystem into it's own set of classes so that all subsystems can benefit from them without having to re-write that code.
To summarize the new system:
SubsystemConditionManager.createCondition
and are automatically registered so no extra code is required.For an example of how these work, I've modified the intake subsystem and the operator intake command to use this system.
This is very much a first iteration of the code, it's not perfect but I'd like to put it out there and see what you guys think before I go any further. Aside from the regular code review, I'm also looking for feedback on a couple extra things: