This repository has been archived by the owner on May 19, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #14 from Gongoliers/intake_1_25
Intake 1/25
- Loading branch information
Showing
8 changed files
with
104 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,38 @@ | ||
package frc.robot.intake; | ||
|
||
import edu.wpi.first.math.util.Units; | ||
import frc.lib.CAN; | ||
import frc.lib.MotorCurrentLimits; | ||
|
||
/** Constants for the intake subsystem. */ | ||
public class IntakeConstants { | ||
|
||
/** Constants for the intake motor. */ | ||
public static class IntakeMotorConstants { | ||
/** Intake motor's CAN identifier. */ | ||
public static final double INTAKE_ROLLER_RADIUS = 0.5 * Units.inchesToMeters(1.375); | ||
|
||
/** Constants for the roller motor. */ | ||
public static class RollerMotorConstants { | ||
/** Roller motor's CAN identifier. */ | ||
public static final CAN ID = new CAN(62); | ||
|
||
/** If true, invert the intake motor. */ | ||
/** If true, invert the roller motor. */ | ||
public static final boolean IS_INVERTED = false; | ||
|
||
/** Gearing between the roller motor and the rollers. */ | ||
public static final double GEARING = 4.5; | ||
|
||
/** Voltage to apply when intaking in volts. */ | ||
public static final double INTAKE_VOLTAGE = -10; | ||
|
||
/** Current limits for the roller motor. */ | ||
public static final MotorCurrentLimits CURRENT_LIMITS = new MotorCurrentLimits(40); | ||
|
||
/** Size of the current spike when intaking a note in amps. */ | ||
public static final double NOTE_CURRENT = 18.0; // TODO | ||
} | ||
|
||
/** Constants for intake commands. */ | ||
public static class IntakeCommandConstants { | ||
/** Delay between starting intaking and detecting notes in seconds. */ | ||
public static final double NOTE_DETECTION_DELAY = 1.0; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 8 additions & 8 deletions
16
.../java/frc/robot/intake/IntakeMotorIO.java → .../java/frc/robot/intake/RollerMotorIO.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,34 @@ | ||
package frc.robot.intake; | ||
|
||
/** Intake motor hardware interface. */ | ||
public interface IntakeMotorIO { | ||
public interface RollerMotorIO { | ||
|
||
/** Values for the intake motor hardware interface. */ | ||
public static class IntakeMotorIOValues { | ||
/** Values for the roller motor hardware interface. */ | ||
public static class RollerMotorIOValues { | ||
/** Angular velocity of the flywheel in rotations per second. */ | ||
public double angularVelocityRotationsPerSecond = 0.0; | ||
|
||
/** Current drawn by the flywheel motor in amps. */ | ||
public double currentAmps = 0.0; | ||
} | ||
|
||
/** Configures the intake motor. */ | ||
/** Configures the roller motor. */ | ||
public void configure(); | ||
|
||
/** | ||
* Updates the intake motor's values/ | ||
* Updates the roller motor's values. | ||
* | ||
* @param values | ||
*/ | ||
public void update(IntakeMotorIOValues values); | ||
public void update(RollerMotorIOValues values); | ||
|
||
/** | ||
* Run the intake motor with the specified voltage. | ||
* Run the roller motor with the specified voltage. | ||
* | ||
* @param volts the voltage to apply to the voltage motor. | ||
*/ | ||
public void setVoltage(double volts); | ||
|
||
/** Stops the intake motor. */ | ||
/** Stops the roller motor. */ | ||
public void stop(); | ||
} |
6 changes: 3 additions & 3 deletions
6
...va/frc/robot/intake/IntakeMotorIOSim.java → ...va/frc/robot/intake/RollerMotorIOSim.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters