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:
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);
}
Here’s ShooterStart and ShooterStop commands:
execute(){
firingjag.StartShooter();
}
execute(){
firingjag.StopShooter();
}
And finally, in OI:
public OI(){
new JoystickButton(stick1, 4).whenPressed(new ShooterOn());
new JoystickButton(stick1, 5).whenPressed(new ShooterOff());
}
Thanks in advance to anyone who can tell me what’s wrong.
Edit: I’ve also tried the .whileHeld(new ShooterOn()), but the result is still the same; there’s only pulsing