Quote:
Originally Posted by WizenedEE
Last year, we wanted to program the robot to set all the solenoids on to power the line tracking sensors. We just looped through each of the ports (it was in labview though).
|
I'm don't really know C++, so I'm not sure if it is accessible, but SolenoidBase has a set which takes a value and mask and writes the whole module at once. For something simple like your use case, I would do something like that (value 0xFF, mask 0xFF).
However, trying to do something like that to for anything less trivial would greatly trade readability and maintainability for compactness, which for FIRST is not something I would try to do.