Ejemplo n.º 1
0
 @Override
 protected void execute() {
   if (beam.ballPresent() && power < 0 && !isShooting) {
     collect.setPower(0);
   } else {
     collect.setPower(power);
   }
 }
Ejemplo n.º 2
0
  public SetCollectorPower(double power, boolean isShooting) {
    collect = CollectorSubsystem.getInstance();
    beam = BeamBreakSubsystem.getInstance();

    requires(collect);
    this.power = -power;
    this.isShooting = isShooting;
  }
Ejemplo n.º 3
0
 // Called once after isFinished returns true
 protected void end() {
   if (!isShooting) collect.setPower(0);
 }