Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Indexer two pistons #12

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/main/java/org/usfirst/frc4904/robot/RobotMap.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
import edu.wpi.first.wpilibj2.command.Subsystem;
import org.usfirst.frc4904.standard.custom.controllers.CustomJoystick;
import org.usfirst.frc4904.standard.custom.controllers.CustomXbox;
import org.usfirst.frc4904.standard.custom.PCMPort;
import edu.wpi.first.wpilibj.PneumaticsModuleType;
import org.usfirst.frc4904.standard.subsystems.SolenoidSubsystem.SolenoidState;
import org.usfirst.frc4904.standard.subsystems.SolenoidSubsystem;

public class RobotMap {
public static class Port {
Expand All @@ -21,6 +25,8 @@ public static class CAN {
}

public static class Pneumatics {
public static final PCMPort INDEXER_SOLENOID1 = new PCMPort(-1, PneumaticsModuleType.CTREPCM, -1, -1); //TODO: set port for indexer solenoid
public static final PCMPort INDEXER_SOLENOID2 = new PCMPort(-1, PneumaticsModuleType.CTREPCM, -1, -1); //TODO: set port for indexer solenoid
}

public static class Digital {
Expand Down Expand Up @@ -51,6 +57,7 @@ public static class Turn {
}

public static class Component {
public static SolenoidSubsystem indexerSolenoids;
}

public static class Input {
Expand All @@ -69,6 +76,7 @@ public static class Operator {
public RobotMap() {
HumanInput.Driver.xbox = new CustomXbox(Port.HumanInput.xboxController);
HumanInput.Operator.joystick = new CustomJoystick(Port.HumanInput.joystick);
Component.indexerSolenoids = new SolenoidSubsystem("Indexer Solenoid", false, SolenoidState.RETRACT, Port.Pneumatics.INDEXER_SOLENOID1.buildDoubleSolenoid(), Port.Pneumatics.INDEXER_SOLENOID2.buildDoubleSolenoid());

}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package org.usfirst.frc4904.robot.commands.indexer;

import org.usfirst.frc4904.robot.RobotMap;
import org.usfirst.frc4904.standard.commands.solenoid.SolenoidExtend;

/**
* Extends the drawbridge which has the intake mechanism attached to it.
*/
public class ExtendIndexer extends SolenoidExtend {
public ExtendIndexer() {
super("extendIndexer", RobotMap.Component.indexerSolenoids);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@

package org.usfirst.frc4904.robot.commands.indexer;

import org.usfirst.frc4904.robot.RobotMap;
import org.usfirst.frc4904.standard.commands.solenoid.SolenoidRetract;

/**
* Retracts the drawbridge which has the intake mechanism attached to it.
*/
public class RetractIndexer extends SolenoidRetract {
public RetractIndexer() {
super("retractIndexer", RobotMap.Component.indexerSolenoids);
}
}