Quote:
Originally Posted by notmattlythgoe
I guess my question is, why not design the systems the solenoids use as a subsystem? We had subsystems this year that were just a single solenoid (trigger, shooter elevation, hopper, and pickup arm). We like to separate the solenoids into subsystems because we feel that it makes the project easier to read and practices good OOD technique by locking those devices into a subsystem that only a command requiring that subsystem is allowed access to control.
|
By doing it the way you describe, 4 lines of code turn into a subsystem with two additional functions and two commands. Each of those objects add to compile time, which turned into well over a minute with all of our commands in 2013. We'll just have to disagree which option is easier to read. The risk of other code writing to the solenoids, while possible, is not worth the complexity created by using commands.