Skip to content

Commit

Permalink
added secondary intake motor
Browse files Browse the repository at this point in the history
  • Loading branch information
pluvii committed Feb 3, 2022
1 parent 093cd98 commit c2b48e0
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/main/java/org/usfirst/frc4904/robot/RobotMap.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ public static class HumanInput {

public static class CANMotor {
public static final int AXLE_INTAKE_MOTOR = -1; //TODO: set port for axel intake motor
public static final int SECONDARY_INTAKE_MOTOR = -1; //TODO: set port for axel intake motor

}

public static class PWM {
Expand Down Expand Up @@ -63,6 +65,7 @@ public static class Turn {

public static class Component {
public static Motor intakeAxleMotor;
public static Motor intakeSecondaryMotor;
public static SolenoidSubsystem intakeDrawbridgeSolenoid;
}

Expand All @@ -85,5 +88,7 @@ public RobotMap() {

Component.intakeDrawbridgeSolenoid = new SolenoidSubsystem("Intake Drawbridge Solenoid", false, SolenoidState.RETRACT, Port.Pneumatics.DRAWBRIDGE_INTAKE_SOLENOID.buildDoubleSolenoid());
Component.intakeAxleMotor = new Motor("Intake Motor", false, new CANTalonFX(Port.CANMotor.AXLE_INTAKE_MOTOR)); //TODO: check if CANTalonFX or SRX
Component.intakeSecondaryMotor = new Motor("Intake Secondary Motor", false, new CANTalonFX(Port.CANMotor.SECONDARY_INTAKE_MOTOR)); //TODO: check if CANTalonFX or SRX

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

import org.usfirst.frc4904.robot.RobotMap;
import org.usfirst.frc4904.standard.commands.motor.MotorIdle;

/**
* Stops rotating motor
*/
public class SecondaryIntakeOff extends MotorIdle {
public SecondaryIntakeOff() {
super("secondaryIntakeOff", RobotMap.Component.intakeSecondaryMotor);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package org.usfirst.frc4904.robot.commands.intake;

import org.usfirst.frc4904.robot.RobotMap;
import org.usfirst.frc4904.standard.commands.motor.MotorConstant;

/**
* Rotates the motor to intake the ball
*/
public class SecondaryIntakeOn extends MotorConstant {
public final static double DEFAULT_INTAKE_MOTOR_SPEED = 0.5; //TODO: needs value
public SecondaryIntakeOn() {
super("SecondaryIntakeOn", RobotMap.Component.intakeSecondaryMotor, DEFAULT_INTAKE_MOTOR_SPEED);
}
}

0 comments on commit c2b48e0

Please sign in to comment.