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 final int EXTEND_CHANNEL = 0;
public static final int RETRACT_CHANNEL = 1;
public static final int INTAKE_MOTOR_ID = 2;
public static final int DEPLOY_MOTOR_ID = 0;
public static final int INTAKE_MOTOR_ID = 1;
}
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.test.PostTest;
import com.ctre.phoenix.motorcontrol.can.TalonSRX;
import com.ctre.phoenix.motorcontrol.can.WPI_TalonSRX;
import com.ctre.phoenix6.hardware.TalonFX;
import frc.robot.Constants;
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.wpilibj2.command.Command;
public class IntakeSubsystem extends TestableSubsystem {
/** Creates a new ExampleSubsystem. */
private TalonFX intakeMotor;
private WPI_TalonSRX deployMotor;
public IntakeSubsystem()
{
extendRelay = new DigitalOutput(Constants.IntakeConstants.EXTEND_CHANNEL);
retractRelay = new DigitalOutput(Constants.IntakeConstants.RETRACT_CHANNEL);
intakeMotor = new TalonFX(Constants.IntakeConstants.INTAKE_MOTOR_ID);
retractRelay.set(false);
extendRelay.set(false);
deployMotor = new WPI_TalonSRX(Constants.IntakeConstants.DEPLOY_MOTOR_ID);
}
public void neutral()
{
retractRelay.set(false);
extendRelay.set(false);
deployMotor.set(0);
}
public void extend()
{
retractRelay.set(false);
extendRelay.set(true);
deployMotor.set(1);
}
public void retract()
{
extendRelay.set(false);
retractRelay.set(true);
deployMotor.set(-1);
}
public void setSpeed(double speed)
@ -48,10 +51,6 @@ public class IntakeSubsystem extends TestableSubsystem {
intakeMotor.set(speed);
}
private DigitalOutput extendRelay;
private DigitalOutput retractRelay;
private TalonFX intakeMotor;
/**
* Example command factory method.
*

View File

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

View File

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

View File

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