Skip to content

Commit 6fb80be

Browse files
committed
Merge branch 'master' of https://github.com/FRC1519/2020-Robot
2 parents 7265fa4 + d9d0273 commit 6fb80be

File tree

7 files changed

+86
-8
lines changed

7 files changed

+86
-8
lines changed

src/main/java/org/mayheminc/robot2020/RobotContainer.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public class RobotContainer {
3737
public static final Intake intake = new Intake();
3838
public static final Autonomous autonomous = new Autonomous();
3939
public static final Targeting targeting = new Targeting();
40-
// public static final Compressor compressor = new Compressor();
40+
public static final AirCompressor compressor = new AirCompressor();
4141
public static PidTuner pidtuner;
4242
public static final Chimney chimney = new Chimney();
4343

@@ -153,7 +153,7 @@ private void configureOperatorPadButtons() {
153153
// new ShooterAdjustWheel(+100));
154154
OPERATOR_PAD.OPERATOR_PAD_BUTTON_FOUR.whenPressed(new IntakeSetPosition(RobotContainer.intake.PIVOT_UP));
155155
// 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));
157157
OPERATOR_PAD.OPERATOR_PAD_BUTTON_SIX.whileHeld(new IntakeSetRollers(-1.0));
158158

159159
OPERATOR_PAD.OPERATOR_PAD_BUTTON_EIGHT.whileHeld(new IntakeSetRollers(1.0));
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
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+
}

src/main/java/org/mayheminc/robot2020/commands/MagazineSetChimney.java renamed to src/main/java/org/mayheminc/robot2020/commands/ChimneySetChimney.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@
1111

1212
import edu.wpi.first.wpilibj2.command.CommandBase;
1313

14-
public class MagazineSetChimney extends CommandBase {
14+
public class ChimneySetChimney extends CommandBase {
1515
double m_speed;
1616

1717
/**
1818
* Creates a new MagazineSetChimney.
1919
*/
20-
public MagazineSetChimney(double d) {
20+
public ChimneySetChimney(double d) {
2121
// Use addRequirements() here to declare subsystem dependencies.
2222
addRequirements(RobotContainer.chimney);
2323
m_speed = d;
@@ -40,4 +40,4 @@ public void end(boolean interrupted) {
4040
public boolean isFinished() {
4141
return false;
4242
}
43-
}
43+
}

src/main/java/org/mayheminc/robot2020/commands/MagazineSetTurntable.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
import org.mayheminc.robot2020.RobotContainer;
1111

12+
import edu.wpi.first.wpilibj.Talon;
1213
import edu.wpi.first.wpilibj2.command.CommandBase;
1314

1415
public class MagazineSetTurntable extends CommandBase {

src/main/java/org/mayheminc/robot2020/commands/ShooterReadyAimFire.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ public ShooterReadyAimFire() {
2424
super();
2525
addCommands(new TargetingIsOnTarget());
2626
addCommands(new MagazineSetTurntable(0.3));
27-
addCommands(new MagazineSetChimney(0.3));
27+
addCommands(new ChimneySetChimney(0.3));
2828
addCommands(new ParallelRaceGroup(new ShooterFireWhenReady(), new Wait(5.0)));
2929
addCommands(new MagazineSetTurntable(0.0));
30-
addCommands(new MagazineSetChimney(0.0));
30+
addCommands(new ChimneySetChimney(0.0));
3131
}
3232
}
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
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+
}

src/main/java/org/mayheminc/robot2020/subsystems/Chimney.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ void updateSmartDashboard() {
4242
}
4343

4444
void monitorTurntableMovement() {
45-
4645
}
4746

4847
public void setChimneySpeed(double speed) {

0 commit comments

Comments
 (0)