We are trying to read a sensor that is in a different subsystem and we are having problems, basically, we need the intake to stop once the feeder sensor detects a ball && the intake sensor detects a ball.
Should we have a global variable that is updated when there is a ball in the feeder so we don’t need to require the same subsystem in the parallel command twice? We also found this, but we are not sure what we should do:
Additionally, requirements are enforced within all three types of parallel groups - a parallel group may not contain multiple commands that require the same subsystem.
You can reference a subsystem in a command without requiring it. Just don’t require it in the command that doesn’t physically move that mechanism (although nothing is preventing you from doing that either).
It’s hard to know exactly what you’re trying to do here without knowing what you’re robot design is, but it sounds to me like you want to intake a ball with a command, advance that ball to a location in the robot that the sensor will detect, and then intake a second ball, to a location that a different sensor will detect.
Those are roughly sequential steps as I’m understanding you, so you may relieve yourself of the headache with WaitUntil.