Command Arguments & Command Factory
karagenit opened this issue · comments
Caleb Smith commented
Idea for simpler command structure:
- Command Groups call only the main
CommandFactory
CommandFactory
has static methods such asgetGearOpenCommand()
orgetGearClosedCommand()
CommandFactory
calls subsystem-related command factories, such asGearCommandFactory
- Subsystem factories such as
GearCommandFactory
take arguments such as a boolean for open/closed, build a command via creating a new object and calling the add... methods, and return the created object - More advanced factories for auton routines would exist, such as ones that take a starting point and build the auton routines accordingly
Possibly also an AutonFactory itself which adds multiple auton routines from different starting points: for example, builds a DropOffGearCG from RedOne, then a DumpHopperCG from GearPegOne, then a FeedAndShootCG from Hopper.
Caleb Smith commented
Instead of subsystem-related Factories, should the Commands simply take arguments in their constructors?