Merge pull request #9 from FairportRobotics/Intake

Intake Change
This commit is contained in:
TheRealGreydon 2026-03-07 15:03:41 -05:00 committed by GitHub
commit ae38e1e5c9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 52 additions and 54 deletions

View File

@ -66,9 +66,8 @@ public final class Constants {
} }
public static class IntakeConstants { public static class IntakeConstants {
public static final int EXTEND_CHANNEL = 0; public static final int DEPLOY_MOTOR_ID = 0;
public static final int RETRACT_CHANNEL = 1; public static final int INTAKE_MOTOR_ID = 1;
public static final int INTAKE_MOTOR_ID = 2;
} }
public static class ShooterConstants { public static class ShooterConstants {

View File

@ -7,40 +7,43 @@ package frc.robot.subsystems;
import org.fairportrobotics.frc.posty.TestableSubsystem; import org.fairportrobotics.frc.posty.TestableSubsystem;
import org.fairportrobotics.frc.posty.test.PostTest; import org.fairportrobotics.frc.posty.test.PostTest;
import com.ctre.phoenix.motorcontrol.can.TalonSRX;
import com.ctre.phoenix.motorcontrol.can.WPI_TalonSRX;
import com.ctre.phoenix6.hardware.TalonFX; import com.ctre.phoenix6.hardware.TalonFX;
import frc.robot.Constants; import frc.robot.Constants;
import static org.fairportrobotics.frc.posty.assertions.Assertions.*; import static org.fairportrobotics.frc.posty.assertions.Assertions.*;
import edu.wpi.first.hal.FRCNetComm.tInstances;
import edu.wpi.first.wpilibj.DigitalOutput; import edu.wpi.first.wpilibj.DigitalOutput;
import edu.wpi.first.wpilibj2.command.Command; import edu.wpi.first.wpilibj2.command.Command;
public class IntakeSubsystem extends TestableSubsystem { public class IntakeSubsystem extends TestableSubsystem {
/** Creates a new ExampleSubsystem. */ /** Creates a new ExampleSubsystem. */
private TalonFX intakeMotor;
private WPI_TalonSRX deployMotor;
public IntakeSubsystem() public IntakeSubsystem()
{ {
extendRelay = new DigitalOutput(Constants.IntakeConstants.EXTEND_CHANNEL);
retractRelay = new DigitalOutput(Constants.IntakeConstants.RETRACT_CHANNEL);
intakeMotor = new TalonFX(Constants.IntakeConstants.INTAKE_MOTOR_ID); intakeMotor = new TalonFX(Constants.IntakeConstants.INTAKE_MOTOR_ID);
retractRelay.set(false); deployMotor = new WPI_TalonSRX(Constants.IntakeConstants.DEPLOY_MOTOR_ID);
extendRelay.set(false);
} }
public void neutral() public void neutral()
{ {
retractRelay.set(false); deployMotor.set(0);
extendRelay.set(false);
} }
public void extend() public void extend()
{ {
retractRelay.set(false); deployMotor.set(1);
extendRelay.set(true);
} }
public void retract() public void retract()
{ {
extendRelay.set(false); deployMotor.set(-1);
retractRelay.set(true);
} }
public void setSpeed(double speed) public void setSpeed(double speed)
@ -48,10 +51,6 @@ public class IntakeSubsystem extends TestableSubsystem {
intakeMotor.set(speed); intakeMotor.set(speed);
} }
private DigitalOutput extendRelay;
private DigitalOutput retractRelay;
private TalonFX intakeMotor;
/** /**
* Example command factory method. * Example command factory method.
* *

View File

@ -1,7 +1,7 @@
{ {
"fileName": "AdvantageKit.json", "fileName": "AdvantageKit.json",
"name": "AdvantageKit", "name": "AdvantageKit",
"version": "26.0.0", "version": "26.0.1",
"uuid": "d820cc26-74e3-11ec-90d6-0242ac120003", "uuid": "d820cc26-74e3-11ec-90d6-0242ac120003",
"frcYear": "2026", "frcYear": "2026",
"mavenUrls": [ "mavenUrls": [
@ -12,14 +12,14 @@
{ {
"groupId": "org.littletonrobotics.akit", "groupId": "org.littletonrobotics.akit",
"artifactId": "akit-java", "artifactId": "akit-java",
"version": "26.0.0" "version": "26.0.1"
} }
], ],
"jniDependencies": [ "jniDependencies": [
{ {
"groupId": "org.littletonrobotics.akit", "groupId": "org.littletonrobotics.akit",
"artifactId": "akit-wpilibio", "artifactId": "akit-wpilibio",
"version": "26.0.0", "version": "26.0.1",
"skipInvalidPlatforms": false, "skipInvalidPlatforms": false,
"isJar": false, "isJar": false,
"validPlatforms": [ "validPlatforms": [

View File

@ -1,7 +1,7 @@
{ {
"fileName": "ChoreoLib2026.json", "fileName": "ChoreoLib2026.json",
"name": "ChoreoLib", "name": "ChoreoLib",
"version": "2026.0.0", "version": "2026.0.2",
"uuid": "b5e23f0a-dac9-4ad2-8dd6-02767c520aca", "uuid": "b5e23f0a-dac9-4ad2-8dd6-02767c520aca",
"frcYear": "2026", "frcYear": "2026",
"mavenUrls": [ "mavenUrls": [
@ -13,7 +13,7 @@
{ {
"groupId": "choreo", "groupId": "choreo",
"artifactId": "ChoreoLib-java", "artifactId": "ChoreoLib-java",
"version": "2026.0.0" "version": "2026.0.2"
}, },
{ {
"groupId": "com.google.code.gson", "groupId": "com.google.code.gson",
@ -26,7 +26,7 @@
{ {
"groupId": "choreo", "groupId": "choreo",
"artifactId": "ChoreoLib-cpp", "artifactId": "ChoreoLib-cpp",
"version": "2026.0.0", "version": "2026.0.2",
"libName": "ChoreoLib", "libName": "ChoreoLib",
"headerClassifier": "headers", "headerClassifier": "headers",
"sharedLibrary": false, "sharedLibrary": false,

View File

@ -1,7 +1,7 @@
{ {
"fileName": "Phoenix6-26.1.0.json", "fileName": "Phoenix6-26.1.1.json",
"name": "CTRE-Phoenix (v6)", "name": "CTRE-Phoenix (v6)",
"version": "26.1.0", "version": "26.1.1",
"frcYear": "2026", "frcYear": "2026",
"uuid": "e995de00-2c64-4df5-8831-c1441420ff19", "uuid": "e995de00-2c64-4df5-8831-c1441420ff19",
"mavenUrls": [ "mavenUrls": [
@ -19,14 +19,14 @@
{ {
"groupId": "com.ctre.phoenix6", "groupId": "com.ctre.phoenix6",
"artifactId": "wpiapi-java", "artifactId": "wpiapi-java",
"version": "26.1.0" "version": "26.1.1"
} }
], ],
"jniDependencies": [ "jniDependencies": [
{ {
"groupId": "com.ctre.phoenix6", "groupId": "com.ctre.phoenix6",
"artifactId": "api-cpp", "artifactId": "api-cpp",
"version": "26.1.0", "version": "26.1.1",
"isJar": false, "isJar": false,
"skipInvalidPlatforms": true, "skipInvalidPlatforms": true,
"validPlatforms": [ "validPlatforms": [
@ -40,7 +40,7 @@
{ {
"groupId": "com.ctre.phoenix6", "groupId": "com.ctre.phoenix6",
"artifactId": "tools", "artifactId": "tools",
"version": "26.1.0", "version": "26.1.1",
"isJar": false, "isJar": false,
"skipInvalidPlatforms": true, "skipInvalidPlatforms": true,
"validPlatforms": [ "validPlatforms": [
@ -54,7 +54,7 @@
{ {
"groupId": "com.ctre.phoenix6.sim", "groupId": "com.ctre.phoenix6.sim",
"artifactId": "api-cpp-sim", "artifactId": "api-cpp-sim",
"version": "26.1.0", "version": "26.1.1",
"isJar": false, "isJar": false,
"skipInvalidPlatforms": true, "skipInvalidPlatforms": true,
"validPlatforms": [ "validPlatforms": [
@ -68,7 +68,7 @@
{ {
"groupId": "com.ctre.phoenix6.sim", "groupId": "com.ctre.phoenix6.sim",
"artifactId": "tools-sim", "artifactId": "tools-sim",
"version": "26.1.0", "version": "26.1.1",
"isJar": false, "isJar": false,
"skipInvalidPlatforms": true, "skipInvalidPlatforms": true,
"validPlatforms": [ "validPlatforms": [
@ -82,7 +82,7 @@
{ {
"groupId": "com.ctre.phoenix6.sim", "groupId": "com.ctre.phoenix6.sim",
"artifactId": "simTalonSRX", "artifactId": "simTalonSRX",
"version": "26.1.0", "version": "26.1.1",
"isJar": false, "isJar": false,
"skipInvalidPlatforms": true, "skipInvalidPlatforms": true,
"validPlatforms": [ "validPlatforms": [
@ -96,7 +96,7 @@
{ {
"groupId": "com.ctre.phoenix6.sim", "groupId": "com.ctre.phoenix6.sim",
"artifactId": "simVictorSPX", "artifactId": "simVictorSPX",
"version": "26.1.0", "version": "26.1.1",
"isJar": false, "isJar": false,
"skipInvalidPlatforms": true, "skipInvalidPlatforms": true,
"validPlatforms": [ "validPlatforms": [
@ -110,7 +110,7 @@
{ {
"groupId": "com.ctre.phoenix6.sim", "groupId": "com.ctre.phoenix6.sim",
"artifactId": "simPigeonIMU", "artifactId": "simPigeonIMU",
"version": "26.1.0", "version": "26.1.1",
"isJar": false, "isJar": false,
"skipInvalidPlatforms": true, "skipInvalidPlatforms": true,
"validPlatforms": [ "validPlatforms": [
@ -124,7 +124,7 @@
{ {
"groupId": "com.ctre.phoenix6.sim", "groupId": "com.ctre.phoenix6.sim",
"artifactId": "simProTalonFX", "artifactId": "simProTalonFX",
"version": "26.1.0", "version": "26.1.1",
"isJar": false, "isJar": false,
"skipInvalidPlatforms": true, "skipInvalidPlatforms": true,
"validPlatforms": [ "validPlatforms": [
@ -138,7 +138,7 @@
{ {
"groupId": "com.ctre.phoenix6.sim", "groupId": "com.ctre.phoenix6.sim",
"artifactId": "simProTalonFXS", "artifactId": "simProTalonFXS",
"version": "26.1.0", "version": "26.1.1",
"isJar": false, "isJar": false,
"skipInvalidPlatforms": true, "skipInvalidPlatforms": true,
"validPlatforms": [ "validPlatforms": [
@ -152,7 +152,7 @@
{ {
"groupId": "com.ctre.phoenix6.sim", "groupId": "com.ctre.phoenix6.sim",
"artifactId": "simProCANcoder", "artifactId": "simProCANcoder",
"version": "26.1.0", "version": "26.1.1",
"isJar": false, "isJar": false,
"skipInvalidPlatforms": true, "skipInvalidPlatforms": true,
"validPlatforms": [ "validPlatforms": [
@ -166,7 +166,7 @@
{ {
"groupId": "com.ctre.phoenix6.sim", "groupId": "com.ctre.phoenix6.sim",
"artifactId": "simProPigeon2", "artifactId": "simProPigeon2",
"version": "26.1.0", "version": "26.1.1",
"isJar": false, "isJar": false,
"skipInvalidPlatforms": true, "skipInvalidPlatforms": true,
"validPlatforms": [ "validPlatforms": [
@ -180,7 +180,7 @@
{ {
"groupId": "com.ctre.phoenix6.sim", "groupId": "com.ctre.phoenix6.sim",
"artifactId": "simProCANrange", "artifactId": "simProCANrange",
"version": "26.1.0", "version": "26.1.1",
"isJar": false, "isJar": false,
"skipInvalidPlatforms": true, "skipInvalidPlatforms": true,
"validPlatforms": [ "validPlatforms": [
@ -194,7 +194,7 @@
{ {
"groupId": "com.ctre.phoenix6.sim", "groupId": "com.ctre.phoenix6.sim",
"artifactId": "simProCANdi", "artifactId": "simProCANdi",
"version": "26.1.0", "version": "26.1.1",
"isJar": false, "isJar": false,
"skipInvalidPlatforms": true, "skipInvalidPlatforms": true,
"validPlatforms": [ "validPlatforms": [
@ -208,7 +208,7 @@
{ {
"groupId": "com.ctre.phoenix6.sim", "groupId": "com.ctre.phoenix6.sim",
"artifactId": "simProCANdle", "artifactId": "simProCANdle",
"version": "26.1.0", "version": "26.1.1",
"isJar": false, "isJar": false,
"skipInvalidPlatforms": true, "skipInvalidPlatforms": true,
"validPlatforms": [ "validPlatforms": [
@ -224,7 +224,7 @@
{ {
"groupId": "com.ctre.phoenix6", "groupId": "com.ctre.phoenix6",
"artifactId": "wpiapi-cpp", "artifactId": "wpiapi-cpp",
"version": "26.1.0", "version": "26.1.1",
"libName": "CTRE_Phoenix6_WPI", "libName": "CTRE_Phoenix6_WPI",
"headerClassifier": "headers", "headerClassifier": "headers",
"sharedLibrary": true, "sharedLibrary": true,
@ -240,7 +240,7 @@
{ {
"groupId": "com.ctre.phoenix6", "groupId": "com.ctre.phoenix6",
"artifactId": "tools", "artifactId": "tools",
"version": "26.1.0", "version": "26.1.1",
"libName": "CTRE_PhoenixTools", "libName": "CTRE_PhoenixTools",
"headerClassifier": "headers", "headerClassifier": "headers",
"sharedLibrary": true, "sharedLibrary": true,
@ -256,7 +256,7 @@
{ {
"groupId": "com.ctre.phoenix6.sim", "groupId": "com.ctre.phoenix6.sim",
"artifactId": "wpiapi-cpp-sim", "artifactId": "wpiapi-cpp-sim",
"version": "26.1.0", "version": "26.1.1",
"libName": "CTRE_Phoenix6_WPISim", "libName": "CTRE_Phoenix6_WPISim",
"headerClassifier": "headers", "headerClassifier": "headers",
"sharedLibrary": true, "sharedLibrary": true,
@ -272,7 +272,7 @@
{ {
"groupId": "com.ctre.phoenix6.sim", "groupId": "com.ctre.phoenix6.sim",
"artifactId": "tools-sim", "artifactId": "tools-sim",
"version": "26.1.0", "version": "26.1.1",
"libName": "CTRE_PhoenixTools_Sim", "libName": "CTRE_PhoenixTools_Sim",
"headerClassifier": "headers", "headerClassifier": "headers",
"sharedLibrary": true, "sharedLibrary": true,
@ -288,7 +288,7 @@
{ {
"groupId": "com.ctre.phoenix6.sim", "groupId": "com.ctre.phoenix6.sim",
"artifactId": "simTalonSRX", "artifactId": "simTalonSRX",
"version": "26.1.0", "version": "26.1.1",
"libName": "CTRE_SimTalonSRX", "libName": "CTRE_SimTalonSRX",
"headerClassifier": "headers", "headerClassifier": "headers",
"sharedLibrary": true, "sharedLibrary": true,
@ -304,7 +304,7 @@
{ {
"groupId": "com.ctre.phoenix6.sim", "groupId": "com.ctre.phoenix6.sim",
"artifactId": "simVictorSPX", "artifactId": "simVictorSPX",
"version": "26.1.0", "version": "26.1.1",
"libName": "CTRE_SimVictorSPX", "libName": "CTRE_SimVictorSPX",
"headerClassifier": "headers", "headerClassifier": "headers",
"sharedLibrary": true, "sharedLibrary": true,
@ -320,7 +320,7 @@
{ {
"groupId": "com.ctre.phoenix6.sim", "groupId": "com.ctre.phoenix6.sim",
"artifactId": "simPigeonIMU", "artifactId": "simPigeonIMU",
"version": "26.1.0", "version": "26.1.1",
"libName": "CTRE_SimPigeonIMU", "libName": "CTRE_SimPigeonIMU",
"headerClassifier": "headers", "headerClassifier": "headers",
"sharedLibrary": true, "sharedLibrary": true,
@ -336,7 +336,7 @@
{ {
"groupId": "com.ctre.phoenix6.sim", "groupId": "com.ctre.phoenix6.sim",
"artifactId": "simProTalonFX", "artifactId": "simProTalonFX",
"version": "26.1.0", "version": "26.1.1",
"libName": "CTRE_SimProTalonFX", "libName": "CTRE_SimProTalonFX",
"headerClassifier": "headers", "headerClassifier": "headers",
"sharedLibrary": true, "sharedLibrary": true,
@ -352,7 +352,7 @@
{ {
"groupId": "com.ctre.phoenix6.sim", "groupId": "com.ctre.phoenix6.sim",
"artifactId": "simProTalonFXS", "artifactId": "simProTalonFXS",
"version": "26.1.0", "version": "26.1.1",
"libName": "CTRE_SimProTalonFXS", "libName": "CTRE_SimProTalonFXS",
"headerClassifier": "headers", "headerClassifier": "headers",
"sharedLibrary": true, "sharedLibrary": true,
@ -368,7 +368,7 @@
{ {
"groupId": "com.ctre.phoenix6.sim", "groupId": "com.ctre.phoenix6.sim",
"artifactId": "simProCANcoder", "artifactId": "simProCANcoder",
"version": "26.1.0", "version": "26.1.1",
"libName": "CTRE_SimProCANcoder", "libName": "CTRE_SimProCANcoder",
"headerClassifier": "headers", "headerClassifier": "headers",
"sharedLibrary": true, "sharedLibrary": true,
@ -384,7 +384,7 @@
{ {
"groupId": "com.ctre.phoenix6.sim", "groupId": "com.ctre.phoenix6.sim",
"artifactId": "simProPigeon2", "artifactId": "simProPigeon2",
"version": "26.1.0", "version": "26.1.1",
"libName": "CTRE_SimProPigeon2", "libName": "CTRE_SimProPigeon2",
"headerClassifier": "headers", "headerClassifier": "headers",
"sharedLibrary": true, "sharedLibrary": true,
@ -400,7 +400,7 @@
{ {
"groupId": "com.ctre.phoenix6.sim", "groupId": "com.ctre.phoenix6.sim",
"artifactId": "simProCANrange", "artifactId": "simProCANrange",
"version": "26.1.0", "version": "26.1.1",
"libName": "CTRE_SimProCANrange", "libName": "CTRE_SimProCANrange",
"headerClassifier": "headers", "headerClassifier": "headers",
"sharedLibrary": true, "sharedLibrary": true,
@ -416,7 +416,7 @@
{ {
"groupId": "com.ctre.phoenix6.sim", "groupId": "com.ctre.phoenix6.sim",
"artifactId": "simProCANdi", "artifactId": "simProCANdi",
"version": "26.1.0", "version": "26.1.1",
"libName": "CTRE_SimProCANdi", "libName": "CTRE_SimProCANdi",
"headerClassifier": "headers", "headerClassifier": "headers",
"sharedLibrary": true, "sharedLibrary": true,
@ -432,7 +432,7 @@
{ {
"groupId": "com.ctre.phoenix6.sim", "groupId": "com.ctre.phoenix6.sim",
"artifactId": "simProCANdle", "artifactId": "simProCANdle",
"version": "26.1.0", "version": "26.1.1",
"libName": "CTRE_SimProCANdle", "libName": "CTRE_SimProCANdle",
"headerClassifier": "headers", "headerClassifier": "headers",
"sharedLibrary": true, "sharedLibrary": true,