Quote:
Originally Posted by DjScribbles
To me, what you've described sounds more like the role of a subsystem than a command; and I feel like that is one of the hangups I've got with the system, I believe the subsystem as a model makes is a more proper place to put business logic (such as a state machine that determines when to activate the roller while lowering the arm), but doing so reduces commands to such a trivial role that they just get in the way.
If you build this functionality into your command, then does that simply leave your subsystem as container classes for actuators and sensors?
|
I've always treated Subsystems as systems that describe the very basic functionality of the robot and the Commands are where the logic goes to control those subsystems. This allows you to have extremely basic commands that you can group together into command groups, or write more complex commands. I think it gives you a little more flexibility this way.
If you'd like I can send you a presentation that our team did for Command Based programming, it's for Java, but a lot of the concepts should be the same. It is very basic though, so most of it is probably going to be at a lower level than you'd like.