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

    requires(collect);
    this.power = -power;
    this.isShooting = isShooting;
  }
コード例 #3
0
 // Called once after isFinished returns true
 protected void end() {
   if (!isShooting) collect.setPower(0);
 }