File tree Expand file tree Collapse file tree 7 files changed +86
-8
lines changed
src/main/java/org/mayheminc/robot2020 Expand file tree Collapse file tree 7 files changed +86
-8
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
@@ -153,7 +153,7 @@ private void configureOperatorPadButtons() {
153
153
// new ShooterAdjustWheel(+100));
154
154
OPERATOR_PAD .OPERATOR_PAD_BUTTON_FOUR .whenPressed (new IntakeSetPosition (RobotContainer .intake .PIVOT_UP ));
155
155
// new ShooterSetWheel(1000));
156
- OPERATOR_PAD .OPERATOR_PAD_BUTTON_FIVE .whileHeld (new MagazineSetChimney (1.0 ));
156
+ OPERATOR_PAD .OPERATOR_PAD_BUTTON_FIVE .whileHeld (new ChimneySetChimney (1.0 ));
157
157
OPERATOR_PAD .OPERATOR_PAD_BUTTON_SIX .whileHeld (new IntakeSetRollers (-1.0 ));
158
158
159
159
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 11
11
12
12
import edu .wpi .first .wpilibj2 .command .CommandBase ;
13
13
14
- public class MagazineSetChimney extends CommandBase {
14
+ public class ChimneySetChimney extends CommandBase {
15
15
double m_speed ;
16
16
17
17
/**
18
18
* Creates a new MagazineSetChimney.
19
19
*/
20
- public MagazineSetChimney (double d ) {
20
+ public ChimneySetChimney (double d ) {
21
21
// Use addRequirements() here to declare subsystem dependencies.
22
22
addRequirements (RobotContainer .chimney );
23
23
m_speed = d ;
@@ -40,4 +40,4 @@ public void end(boolean interrupted) {
40
40
public boolean isFinished () {
41
41
return false ;
42
42
}
43
- }
43
+ }
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 @@ -24,9 +24,9 @@ public ShooterReadyAimFire() {
24
24
super ();
25
25
addCommands (new TargetingIsOnTarget ());
26
26
addCommands (new MagazineSetTurntable (0.3 ));
27
- addCommands (new MagazineSetChimney (0.3 ));
27
+ addCommands (new ChimneySetChimney (0.3 ));
28
28
addCommands (new ParallelRaceGroup (new ShooterFireWhenReady (), new Wait (5.0 )));
29
29
addCommands (new MagazineSetTurntable (0.0 ));
30
- addCommands (new MagazineSetChimney (0.0 ));
30
+ addCommands (new ChimneySetChimney (0.0 ));
31
31
}
32
32
}
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 .subsystems ;
9
+
10
+ import edu .wpi .first .wpilibj .Compressor ;
11
+ import edu .wpi .first .wpilibj2 .command .SubsystemBase ;
12
+
13
+ public class AirCompressor extends SubsystemBase {
14
+ Compressor compressor = new Compressor ();
15
+
16
+ /**
17
+ * Creates a new compressor.
18
+ */
19
+ public AirCompressor () {
20
+ }
21
+
22
+ public void setCompresor (boolean b ) {
23
+ if (b ) {
24
+ compressor .start ();
25
+ } else {
26
+ compressor .stop ();
27
+ }
28
+ }
29
+
30
+ @ Override
31
+ public void periodic () {
32
+ // This method will be called once per scheduler run
33
+ }
34
+ }
Original file line number Diff line number Diff line change @@ -42,7 +42,6 @@ void updateSmartDashboard() {
42
42
}
43
43
44
44
void monitorTurntableMovement () {
45
-
46
45
}
47
46
48
47
public void setChimneySpeed (double speed ) {
You can’t perform that action at this time.
0 commit comments