Commiter : Gayting
- Press A to change solenoid to forward
- Press B to change solenoid to reverse
Commiter : Moyu
-
Change Command snd Subsystem name to
PenumaticsSubsystemandPenumaticsCommand -
Remove Constants Input 1.
java public void forward(){ DoublePCM1.set(DoubleSolenoid.Value.kForward); DoublePCM2.set(DoubleSolenoid.Value.kForward); }-
public void reverse(){ DoublePCM1.set(DoubleSolenoid.Value.kReverse); DoublePCM2.set(DoubleSolenoid.Value.kReverse); }
-
public void stop(){ DoublePCM1.set(DoubleSolenoid.Value.kOff); DoublePCM2.set(DoubleSolenoid.Value.kOff); }
-
-
Improve Design Pattern
-
Improve Button Design
new JoystickButton(js1, OIConstants.Btn_A) .onTrue(new SolenoidCommand(m_penumaticsSub, "Forward")); new JoystickButton(js1, OIConstants.Btn_B) .onTrue(new SolenoidCommand(m_penumaticsSub, "Reverse"));
-
Combine Two Commands Into One Integrated everything related to pneumatics into one Command, which can help simplify unnecessary programs.
-