|
|
|
![]() |
|
|||||||
|
||||||||
|
|
Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
About button-controlled speed controllers
I am trying to have the shooting wheel spin at full speed when I hit a button. It is controlled via a Jaguar, and in the method, I just use (name).set(1.0);.
When I actually hit the button, though, the wheel just twitches on for a second and then stops before repeating it. On the smart dashboard, the command for the firing subsystem still reads the ShooterOn command. Does anyone know how to fix this? In FiringJag subsystem: Code:
Jaguar firingjag;
public FiringJag(){
firingjag = new Jaguar (3); // It is in PWM port 3
setSafetyEnabled(false);
}
public void initDefaultCommand(){
setDefaultCommand(new ShooterStop());
}
public void StartShooter(){
firingjag.set(1.0);
}
public void StopShooter(){
firingjag.set(0);
}
Code:
execute(){
firingjag.StartShooter();
}
Code:
execute(){
firingjag.StopShooter();
}
Code:
public OI(){
new JoystickButton(stick1, 4).whenPressed(new ShooterOn());
new JoystickButton(stick1, 5).whenPressed(new ShooterOff());
}
Edit: I've also tried the .whileHeld(new ShooterOn()), but the result is still the same; there's only pulsing Last edited by AmLameBro : 20-02-2013 at 07:55. |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|