Skip to content

Commit

Permalink
Removed the broken REV Sensor
Browse files Browse the repository at this point in the history
  • Loading branch information
2491NoMythic authored and rflood07 committed Jan 25, 2024
1 parent f2c1d6a commit 8c7d310
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 68 deletions.
2 changes: 0 additions & 2 deletions src/main/java/frc/robot/settings/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
import com.ctre.phoenix6.signals.InvertedValue;
import com.ctre.phoenix6.signals.NeutralModeValue;
import com.pathplanner.lib.path.PathConstraints;
import com.revrobotics.Rev2mDistanceSensor.Port;

import edu.wpi.first.math.MathUtil;
import edu.wpi.first.math.geometry.Pose2d;
Expand Down Expand Up @@ -312,7 +311,6 @@ public static final class IndexerConstants{
public static final int HOLDER_1_MOTOR = 2491;
public static final int HOLDER_2_MOTOR = 2491;
public static final double INDEXER_SPEED = 0.75;
public static final Port DIST_SENSOR_PORT = Port.kOnboard;
}
public static final class IntakeConstants{
public static final int INTAKE_1_MOTOR = 2491;
Expand Down
11 changes: 1 addition & 10 deletions src/main/java/frc/robot/subsystems/IndexerSubsystem.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import com.revrobotics.CANSparkMax;
import com.revrobotics.RelativeEncoder;
import com.revrobotics.Rev2mDistanceSensor;
import com.revrobotics.SparkPIDController;
import com.revrobotics.SparkRelativeEncoder;
import com.revrobotics.CANSparkBase.ControlType;
Expand All @@ -11,14 +10,12 @@
import edu.wpi.first.wpilibj2.command.SubsystemBase;
import frc.robot.settings.Constants;
import frc.robot.settings.Constants.IndexerConstants;
import com.revrobotics.Rev2mDistanceSensor.*;

public class IndexerSubsystem extends SubsystemBase{
CANSparkMax holder1;
CANSparkMax holder2;
CANSparkMax feeder1;
CANSparkMax feeder2;
Rev2mDistanceSensor distanceSensor; //sensor Sensorthingy;
boolean isHolding;
public IndexerSubsystem(){
CANSparkMax holder1 = new CANSparkMax(IndexerConstants.HOLDER_1_MOTOR, MotorType.kBrushless);
Expand All @@ -35,16 +32,10 @@ public IndexerSubsystem(){
holder2.setIdleMode(IdleMode.kBrake);
feeder1.setIdleMode(IdleMode.kBrake);
feeder2.setIdleMode(IdleMode.kBrake);

distanceSensor = new Rev2mDistanceSensor(
Constants.IndexerConstants.DIST_SENSOR_PORT,
Unit.kInches,
RangeProfile.kHighAccuracy);
distanceSensor.setAutomaticMode(true);
}

public double getInchesFromSensor() {
return distanceSensor.getRange();
return 0;
}
public void feederFeed(double generalSpeed){
feeder1.set(generalSpeed);
Expand Down
56 changes: 0 additions & 56 deletions vendordeps/REV2mDistanceSensor.json

This file was deleted.

0 comments on commit 8c7d310

Please sign in to comment.