![]() |
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;Code:
execute(){Code:
execute(){Code:
public OI(){Edit: I've also tried the .whileHeld(new ShooterOn()), but the result is still the same; there's only pulsing |
Re: About button-controlled speed controllers
I'm guessing that the issue is that both your start/stop commands terminate immediately. So, the following sequence occurs:
1. You press the button to start the shooter. 2. The command runs and turns on the shooter and then is finished. 3. The default command associated with your subsystem then runs (the one you defined in initDefaultCommand()). This results in the motor being turned off almost instantaneously. To see the difference, try commenting out your default command: Code:
public void initDefaultCommand(){Hope that helps. |
| All times are GMT -5. The time now is 10:07. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi