File tree Expand file tree Collapse file tree 4 files changed +59
-4
lines changed
src/main/java/org/mayheminc/robot2020 Expand file tree Collapse file tree 4 files changed +59
-4
lines changed Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ public class RobotContainer {
37
37
public static final Intake intake = new Intake ();
38
38
public static final Autonomous autonomous = new Autonomous ();
39
39
public static final Targeting targeting = new Targeting ();
40
- // public static final Compressor compressor = new Compressor ();
40
+ public static final AirCompressor compressor = new AirCompressor ();
41
41
public static PidTuner pidtuner ;
42
42
public static final Chimney chimney = new Chimney ();
43
43
@@ -152,7 +152,7 @@ private void configureOperatorPadButtons() {
152
152
// new ShooterAdjustWheel(+100));
153
153
OPERATOR_PAD .OPERATOR_PAD_BUTTON_FOUR .whenPressed (new IntakeSetPosition (RobotContainer .intake .PIVOT_UP ));
154
154
// new ShooterSetWheel(1000));
155
- OPERATOR_PAD .OPERATOR_PAD_BUTTON_FIVE .whileHeld (new MagazineSetChimney (1.0 ));
155
+ OPERATOR_PAD .OPERATOR_PAD_BUTTON_FIVE .whileHeld (new ChimneySetChimney (1.0 ));
156
156
OPERATOR_PAD .OPERATOR_PAD_BUTTON_SIX .whileHeld (new IntakeSetRollers (-1.0 ));
157
157
158
158
OPERATOR_PAD .OPERATOR_PAD_BUTTON_EIGHT .whileHeld (new IntakeSetRollers (1.0 ));
Original file line number Diff line number Diff line change
1
+ /*----------------------------------------------------------------------------*/
2
+ /* Copyright (c) 2019 FIRST. All Rights Reserved. */
3
+ /* Open Source Software - may be modified and shared by FRC teams. The code */
4
+ /* must be accompanied by the FIRST BSD license file in the root directory of */
5
+ /* the project. */
6
+ /*----------------------------------------------------------------------------*/
7
+
8
+ package org .mayheminc .robot2020 .commands ;
9
+
10
+ import org .mayheminc .robot2020 .RobotContainer ;
11
+
12
+ import edu .wpi .first .wpilibj2 .command .CommandBase ;
13
+
14
+ public class AirCompressorDefault extends CommandBase {
15
+ /**
16
+ * Creates a new AirCompressorDefault.
17
+ */
18
+ public AirCompressorDefault () {
19
+ // Use addRequirements() here to declare subsystem dependencies.
20
+ }
21
+
22
+ // Called when the command is initially scheduled.
23
+ @ Override
24
+ public void initialize () {
25
+ // robot.is
26
+ RobotContainer .compressor .setCompresor (true );
27
+ }
28
+
29
+ // Called every time the scheduler runs while the command is scheduled.
30
+ @ Override
31
+ public void execute () {
32
+ }
33
+
34
+ // Called once the command ends or is interrupted.
35
+ @ Override
36
+ public void end (boolean interrupted ) {
37
+ }
38
+
39
+ // Returns true when the command should end.
40
+ @ Override
41
+ public boolean isFinished () {
42
+ return false ;
43
+ }
44
+ }
Original file line number Diff line number Diff line change 9
9
10
10
import org .mayheminc .robot2020 .RobotContainer ;
11
11
12
+ import edu .wpi .first .wpilibj .Talon ;
12
13
import edu .wpi .first .wpilibj2 .command .CommandBase ;
13
14
14
15
public class MagazineSetTurntable extends CommandBase {
Original file line number Diff line number Diff line change 7
7
8
8
package org .mayheminc .robot2020 .subsystems ;
9
9
10
+ import edu .wpi .first .wpilibj .Compressor ;
10
11
import edu .wpi .first .wpilibj2 .command .SubsystemBase ;
11
12
12
- public class compressor extends SubsystemBase {
13
+ public class AirCompressor extends SubsystemBase {
14
+ Compressor compressor = new Compressor ();
15
+
13
16
/**
14
17
* Creates a new compressor.
15
18
*/
16
- public compressor () {
19
+ public AirCompressor () {
20
+ }
17
21
22
+ public void setCompresor (boolean b ) {
23
+ if (b ) {
24
+ compressor .start ();
25
+ } else {
26
+ compressor .stop ();
27
+ }
18
28
}
19
29
20
30
@ Override
You can’t perform that action at this time.
0 commit comments