コード例 #1
0
 public void setIndexWheels(double target) {
   System.out.println("index target is " + target);
   indexTarget = target;
   error = indexTarget - indexPosition.get();
   if (error > 0.04) {
     openIndexWheels.set(Relay.Value.kForward);
   } else if (error < -0.04) {
     openIndexWheels.set(Relay.Value.kReverse);
   } else {
     openIndexWheels.set(Relay.Value.kOff);
   }
 }
コード例 #2
0
 public void stopOpenMotor() {
   openIndexWheels.set(Relay.Value.kOff);
 }