import com.ctre.phoenix6.controls.Follower;
import com.ctre.phoenix6.controls.MotionMagicVoltage;
import com.ctre.phoenix6.hardware.TalonFX;
+import com.ctre.phoenix6.signals.MotorAlignmentValue;
import com.ctre.phoenix6.signals.MotorArrangementValue;
import com.ctre.phoenix6.signals.NeutralModeValue;
import com.revrobotics.spark.config.SparkMaxConfig;
final int rightID = 1;
final int leftID = 2;
final int rollerID = 3;
- final String canBus = "CANivoreSub";
private TalonFX rollerMotor;
private TalonFX rightMotor; //leader
public Intake() {
// set actual IDs
- rightMotor = new TalonFX(rightID, canBus);
- leftMotor = new TalonFX(leftID, canBus);
- rollerMotor = new TalonFX(rollerID, canBus);
- TalonFXConfiguration config = new TalonFXConfiguration();
- var slot0Configs = config.Slot0;
+ rightMotor = new TalonFX(rightID);
+ leftMotor = new TalonFX(leftID);
+ rollerMotor = new TalonFX(rollerID);
+
+ // right motor configs
+ TalonFXConfiguration rightConfig = new TalonFXConfiguration();
+ var slot0RightConfigs = rightConfig.Slot0;
//find values later
//friction, maybe?
- slot0Configs.kP = 0;
- slot0Configs.kI = 0;
- slot0Configs.kD = 0;
- slot0Configs.kV = 0;
- slot0Configs.kA = 0;
+ slot0RightConfigs.kP = 0;
+ slot0RightConfigs.kI = 0;
+ slot0RightConfigs.kD = 0;
+ slot0RightConfigs.kV = 0;
+ slot0RightConfigs.kA = 0;
+
+ // left motor configs
+ TalonFXConfiguration leftConfig = new TalonFXConfiguration();
+ var slot0LeftConfigs = leftConfig.Slot0;
+
+ slot0LeftConfigs.kP = 0;
+ slot0LeftConfigs.kI = 0;
+ slot0LeftConfigs.kD = 0;
+ slot0LeftConfigs.kV = 0;
+ slot0LeftConfigs.kA = 0;
+
rightMotor.getConfigurator().apply(new MotorOutputConfigs().withNeutralMode(NeutralModeValue.Brake));
- rightMotor.getConfigurator().apply(config);
+ rightMotor.getConfigurator().apply(rightConfig);
- leftMotor.getConfigurator().apply(config);
leftMotor.getConfigurator().apply(new MotorOutputConfigs().withNeutralMode(NeutralModeValue.Brake));
+ leftMotor.getConfigurator().apply(leftConfig);
+
- Follower follower = new Follower(rightMotor.getDeviceID(), true);
- leftMotor.setControl(new Follower(rightMotor.getDeviceID(), true));
+ //Follower follower = new Follower(rightMotor.getDeviceID(), true);
+ leftMotor.setControl(new Follower(rightMotor.getDeviceID(), MotorAlignmentValue.Opposed));
+
SmartDashboard.putData("Extend Intake", new InstantCommand(() -> extend()));
SmartDashboard.putData("Retract Intake", new InstantCommand(() -> retract()));
{
"fileName": "Phoenix6-frc2026-latest.json",
"name": "CTRE-Phoenix (v6)",
- "version": "26.1.0",
+ "version": "26.1.1",
"frcYear": "2026",
"uuid": "e995de00-2c64-4df5-8831-c1441420ff19",
"mavenUrls": [
{
"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": [
{
"groupId": "com.ctre.phoenix6",
"artifactId": "tools",
- "version": "26.1.0",
+ "version": "26.1.1",
"isJar": false,
"skipInvalidPlatforms": true,
"validPlatforms": [
{
"groupId": "com.ctre.phoenix6.sim",
"artifactId": "api-cpp-sim",
- "version": "26.1.0",
+ "version": "26.1.1",
"isJar": false,
"skipInvalidPlatforms": true,
"validPlatforms": [
{
"groupId": "com.ctre.phoenix6.sim",
"artifactId": "tools-sim",
- "version": "26.1.0",
+ "version": "26.1.1",
"isJar": false,
"skipInvalidPlatforms": true,
"validPlatforms": [
{
"groupId": "com.ctre.phoenix6.sim",
"artifactId": "simTalonSRX",
- "version": "26.1.0",
+ "version": "26.1.1",
"isJar": false,
"skipInvalidPlatforms": true,
"validPlatforms": [
{
"groupId": "com.ctre.phoenix6.sim",
"artifactId": "simVictorSPX",
- "version": "26.1.0",
+ "version": "26.1.1",
"isJar": false,
"skipInvalidPlatforms": true,
"validPlatforms": [
{
"groupId": "com.ctre.phoenix6.sim",
"artifactId": "simPigeonIMU",
- "version": "26.1.0",
+ "version": "26.1.1",
"isJar": false,
"skipInvalidPlatforms": true,
"validPlatforms": [
{
"groupId": "com.ctre.phoenix6.sim",
"artifactId": "simProTalonFX",
- "version": "26.1.0",
+ "version": "26.1.1",
"isJar": false,
"skipInvalidPlatforms": true,
"validPlatforms": [
{
"groupId": "com.ctre.phoenix6.sim",
"artifactId": "simProTalonFXS",
- "version": "26.1.0",
+ "version": "26.1.1",
"isJar": false,
"skipInvalidPlatforms": true,
"validPlatforms": [
{
"groupId": "com.ctre.phoenix6.sim",
"artifactId": "simProCANcoder",
- "version": "26.1.0",
+ "version": "26.1.1",
"isJar": false,
"skipInvalidPlatforms": true,
"validPlatforms": [
{
"groupId": "com.ctre.phoenix6.sim",
"artifactId": "simProPigeon2",
- "version": "26.1.0",
+ "version": "26.1.1",
"isJar": false,
"skipInvalidPlatforms": true,
"validPlatforms": [
{
"groupId": "com.ctre.phoenix6.sim",
"artifactId": "simProCANrange",
- "version": "26.1.0",
+ "version": "26.1.1",
"isJar": false,
"skipInvalidPlatforms": true,
"validPlatforms": [
{
"groupId": "com.ctre.phoenix6.sim",
"artifactId": "simProCANdi",
- "version": "26.1.0",
+ "version": "26.1.1",
"isJar": false,
"skipInvalidPlatforms": true,
"validPlatforms": [
{
"groupId": "com.ctre.phoenix6.sim",
"artifactId": "simProCANdle",
- "version": "26.1.0",
+ "version": "26.1.1",
"isJar": false,
"skipInvalidPlatforms": true,
"validPlatforms": [
{
"groupId": "com.ctre.phoenix6",
"artifactId": "wpiapi-cpp",
- "version": "26.1.0",
+ "version": "26.1.1",
"libName": "CTRE_Phoenix6_WPI",
"headerClassifier": "headers",
"sharedLibrary": true,
{
"groupId": "com.ctre.phoenix6",
"artifactId": "tools",
- "version": "26.1.0",
+ "version": "26.1.1",
"libName": "CTRE_PhoenixTools",
"headerClassifier": "headers",
"sharedLibrary": true,
{
"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,
{
"groupId": "com.ctre.phoenix6.sim",
"artifactId": "tools-sim",
- "version": "26.1.0",
+ "version": "26.1.1",
"libName": "CTRE_PhoenixTools_Sim",
"headerClassifier": "headers",
"sharedLibrary": true,
{
"groupId": "com.ctre.phoenix6.sim",
"artifactId": "simTalonSRX",
- "version": "26.1.0",
+ "version": "26.1.1",
"libName": "CTRE_SimTalonSRX",
"headerClassifier": "headers",
"sharedLibrary": true,
{
"groupId": "com.ctre.phoenix6.sim",
"artifactId": "simVictorSPX",
- "version": "26.1.0",
+ "version": "26.1.1",
"libName": "CTRE_SimVictorSPX",
"headerClassifier": "headers",
"sharedLibrary": true,
{
"groupId": "com.ctre.phoenix6.sim",
"artifactId": "simPigeonIMU",
- "version": "26.1.0",
+ "version": "26.1.1",
"libName": "CTRE_SimPigeonIMU",
"headerClassifier": "headers",
"sharedLibrary": true,
{
"groupId": "com.ctre.phoenix6.sim",
"artifactId": "simProTalonFX",
- "version": "26.1.0",
+ "version": "26.1.1",
"libName": "CTRE_SimProTalonFX",
"headerClassifier": "headers",
"sharedLibrary": true,
{
"groupId": "com.ctre.phoenix6.sim",
"artifactId": "simProTalonFXS",
- "version": "26.1.0",
+ "version": "26.1.1",
"libName": "CTRE_SimProTalonFXS",
"headerClassifier": "headers",
"sharedLibrary": true,
{
"groupId": "com.ctre.phoenix6.sim",
"artifactId": "simProCANcoder",
- "version": "26.1.0",
+ "version": "26.1.1",
"libName": "CTRE_SimProCANcoder",
"headerClassifier": "headers",
"sharedLibrary": true,
{
"groupId": "com.ctre.phoenix6.sim",
"artifactId": "simProPigeon2",
- "version": "26.1.0",
+ "version": "26.1.1",
"libName": "CTRE_SimProPigeon2",
"headerClassifier": "headers",
"sharedLibrary": true,
{
"groupId": "com.ctre.phoenix6.sim",
"artifactId": "simProCANrange",
- "version": "26.1.0",
+ "version": "26.1.1",
"libName": "CTRE_SimProCANrange",
"headerClassifier": "headers",
"sharedLibrary": true,
{
"groupId": "com.ctre.phoenix6.sim",
"artifactId": "simProCANdi",
- "version": "26.1.0",
+ "version": "26.1.1",
"libName": "CTRE_SimProCANdi",
"headerClassifier": "headers",
"sharedLibrary": true,
{
"groupId": "com.ctre.phoenix6.sim",
"artifactId": "simProCANdle",
- "version": "26.1.0",
+ "version": "26.1.1",
"libName": "CTRE_SimProCANdle",
"headerClassifier": "headers",
"sharedLibrary": true,