We’ve replaced the IterativeRobot code for our 2018 'bot and built a new command-based version of the code for our (quickly-approaching!) off-season competition and we’ve come a long way but have one tough glitch…
We have a subsystem that needs constant attention and updating. We have commands to control and move it, but when those commands end, the updating stops. In case that’s not clear… in autonomous, we issue an “adjust subsystem” command and then to a sequential “drive this distance” command, but when the “adjust subsystem” command ends, so does active control of that subsystem.
This subsystem needs to be actively controlled 100% of the time. In Auto and Teleop, we will be adjusting its position.
Where and how would this “background” updating need to happen? Do we need to move the babysitting outside of the command structure to the underlying TimedRobot framework? We’re programming in C++ in case someone wants to give a specific example.
Thanks in advance!