Skip to content

Commit

Permalink
Umm AlgaeRollerbar codes constants Done working on IO
Browse files Browse the repository at this point in the history
  • Loading branch information
ozziexyz committed Jan 28, 2025
1 parent 0d41d55 commit 2eeaf52
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
package frc.robot.subsystems.intake;

public class AlgaeRollerbarConstants {
public static final int DEVICEID = 1;
public static final int STALLLIMIT = 1;
}
19 changes: 18 additions & 1 deletion src/main/java/frc/robot/subsystems/intake/AlgaeRollerbarIO.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
package frc.robot.subsystems.intake;

import org.littletonrobotics.junction.AutoLog;

public interface AlgaeRollerbarIO {

@AutoLog
public class PivotIOInputs{
public double position = 0;
public double voltage = 0;
public double velocity = 0;

}
public default void setVoltage() {

}
//you need to make a class inside your interface
//update inputs, and a setvoltage
public default void updateInputs(){


}
}
Original file line number Diff line number Diff line change
@@ -1,19 +1,28 @@
package frc.robot.subsystems.intake;

import com.revrobotics.spark.SparkMax;
import com.revrobotics.spark.SparkBase.PersistMode;
import com.revrobotics.spark.SparkBase.ResetMode;
import com.revrobotics.spark.SparkLowLevel.MotorType;
import com.revrobotics.spark.config.SparkMaxConfig;
import com.revrobotics.spark.config.SparkBaseConfig.IdleMode;
import

public class AlgaeRollerbarIOReal implements AlgaeRollerbarIO{
private final SparkMax intakeMotor = new SparkMax(2,MotorType.kBrushed);//some numbers ig
private final SparkMax intakeMotor = new SparkMax(AlgaeRollerbarConstants.DEVICEID,MotorType.kBrushed);//some numbers ig
private final SparkMaxConfig config = new SparkMaxConfig();

public AlgaeRollerbarIOReal(){
//set the idlemode to coast and then pass in current limit
//set idlemode?
config.IdleMode kCoast;

//make a file called algaerollerbar constants for can id and type shit
//in sparkmax there is method that lets you configure the motor, use that to configure it
//clear stickyfaults on the motor
//
config.idleMode(IdleMode.kCoast);
config.smartCurrentLimit(AlgaeRollerbarConstants.STALLLIMIT);
intakeMotor.configure(config, ResetMode.kNoResetSafeParameters, PersistMode.kPersistParameters);
intakeMotor.clearFaults();

}

Expand Down

0 comments on commit 2eeaf52

Please sign in to comment.