Skip to content

Commit

Permalink
add conversion factors to Neo so we don't have to call Neo.getEncoder…
Browse files Browse the repository at this point in the history
…().set___ConversionFactor
  • Loading branch information
GalexY727 committed Jan 22, 2024
1 parent ffd0a07 commit 1a29078
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/main/java/frc/robot/util/Neo.java
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,15 @@ public void setPID(double P, double I, double D, double minOutput, double maxOut

pidController.setOutputRange(minOutput, maxOutput, slotID);
}

public void setPositionConversionFactor(double factor) {
encoder.setPositionConversionFactor(factor);
}

public void setVelocityConversionFactor(double factor) {
encoder.setVelocityConversionFactor(factor);
}

/**
* Gets the proportional gain constant for PIDFF controller.
* @return The proportional gain constant for PIDFF controller.
Expand Down

0 comments on commit 1a29078

Please sign in to comment.