2022 Hyperion Rewrite
0.1.0
Java rewrite of the Titanium Titans (FRC Team #4467)'s 2022 robot, Hyperion
|
Public Member Functions | |
TalonEnhanced (IMotorControllerEnhanced talon) | |
TalonEnhanced | autoRetry (ConfigCall talonConfigCall) |
TalonEnhanced | set (ControlMode controlMode, double demand0) |
TalonEnhanced | set (ControlMode controlMode, double demand0, DemandType demandType, double demand1) |
TalonEnhanced | neutralOutput () |
TalonEnhanced | setNeutralMode (NeutralMode neutralMode) |
TalonEnhanced | setSensorPhase (boolean PhaseSensor) |
TalonEnhanced | setInverted (boolean invert) |
TalonEnhanced | setInverted (InvertType invertType) |
boolean | getInverted () |
TalonEnhanced | configOpenloopRamp (double secondsFromNeutralToFull) |
TalonEnhanced | configClosedloopRamp (double secondsFromNeutralToFull) |
TalonEnhanced | configPeakOutputForward (double percentOut) |
TalonEnhanced | configPeakOutputReverse (double percentOut) |
TalonEnhanced | configNominalOutputForward (double percentOut) |
TalonEnhanced | configNominalOutputReverse (double percentOut) |
TalonEnhanced | configNeutralDeadband (double percentDeadband) |
TalonEnhanced | configVoltageCompSaturation (double voltage) |
TalonEnhanced | configVoltageMeasurementFilter (int filterWindowSamples) |
TalonEnhanced | enableVoltageCompensation (boolean enable) |
double | getBusVoltage () |
double | getMotorOutputPercent () |
double | getMotorOutputVoltage () |
double | getTemperature () |
TalonEnhanced | configSelectedFeedbackSensor (RemoteFeedbackDevice feedbackDevice, int pidIdx) |
TalonEnhanced | configSelectedFeedbackCoefficient (double coefficient, int pidIdx) |
TalonEnhanced | configRemoteFeedbackFilter (int deviceID, RemoteSensorSource remoteSensorSource, int remoteOrdinal) |
TalonEnhanced | configRemoteFeedbackFilter (CANCoder canCoderRef, int remoteOrdinal) |
TalonEnhanced | configRemoteFeedbackFilter (BaseTalon talonRef, int remoteOrdinal) |
TalonEnhanced | configSensorTerm (SensorTerm sensorTerm, FeedbackDevice feedbackDevice) |
double | getSelectedSensorPosition (int pidIdx) |
double | getSelectedSensorVelocity (int pidIdx) |
TalonEnhanced | setSelectedSensorPosition (double sensorPos, int pidIdx) |
TalonEnhanced | setControlFramePeriod (ControlFrame frame, int periodMs) |
TalonEnhanced | setStatusFramePeriod (StatusFrame frame, int periodMs) |
int | getStatusFramePeriod (StatusFrame frame) |
TalonEnhanced | configForwardLimitSwitchSource (RemoteLimitSwitchSource type, LimitSwitchNormal normalOpenOrClose, int deviceID) |
TalonEnhanced | configReverseLimitSwitchSource (RemoteLimitSwitchSource type, LimitSwitchNormal normalOpenOrClose, int deviceID) |
TalonEnhanced | overrideLimitSwitchesEnable (boolean enable) |
TalonEnhanced | configForwardSoftLimitThreshold (double forwardSensorLimit) |
TalonEnhanced | configReverseSoftLimitThreshold (double reverseSensorLimit) |
TalonEnhanced | configForwardSoftLimitEnable (boolean enable) |
TalonEnhanced | configReverseSoftLimitEnable (boolean enable) |
TalonEnhanced | overrideSoftLimitsEnable (boolean enable) |
TalonEnhanced | config_kP (int slotIdx, double value) |
TalonEnhanced | config_kI (int slotIdx, double value) |
TalonEnhanced | config_kD (int slotIdx, double value) |
TalonEnhanced | config_kF (int slotIdx, double value) |
TalonEnhanced | config_IntegralZone (int slotIdx, double izone) |
TalonEnhanced | configAllowableClosedloopError (int slotIdx, double allowableCloseLoopError) |
TalonEnhanced | configMaxIntegralAccumulator (int slotIdx, double maxIaccum) |
TalonEnhanced | configClosedLoopPeakOutput (int slotIdx, double percentOut) |
TalonEnhanced | configClosedLoopPeriod (int slotIdx, int loopTimeMs) |
TalonEnhanced | configAuxPIDPolarity (boolean invert) |
TalonEnhanced | setIntegralAccumulator (double iaccum, int pidIdx) |
double | getClosedLoopError (int pidIdx) |
double | getIntegralAccumulator (int pidIdx) |
double | getErrorDerivative (int pidIdx) |
TalonEnhanced | selectProfileSlot (int slotIdx, int pidIdx) |
double | getClosedLoopTarget (int pidIdx) |
double | getActiveTrajectoryPosition () |
double | getActiveTrajectoryVelocity () |
TalonEnhanced | configMotionCruiseVelocity (double cruiseVelocity) |
TalonEnhanced | configMotionAcceleration (double accel) |
TalonEnhanced | configMotionSCurveStrength (int curveStrength) |
TalonEnhanced | configMotionProfileTrajectoryPeriod (int baseTrajDurationMs) |
TalonEnhanced | clearMotionProfileTrajectories () |
int | getMotionProfileTopLevelBufferCount () |
TalonEnhanced | pushMotionProfileTrajectory (TrajectoryPoint trajPt) |
boolean | isMotionProfileTopLevelBufferFull () |
TalonEnhanced | processMotionProfileBuffer () |
TalonEnhanced | getMotionProfileStatus (MotionProfileStatus statusToFill) |
TalonEnhanced | clearMotionProfileHasUnderrun () |
TalonEnhanced | changeMotionControlFramePeriod (int periodMs) |
ErrorCode | getLastError () |
TalonEnhanced | getFaults (Faults toFill) |
TalonEnhanced | getStickyFaults (StickyFaults toFill) |
TalonEnhanced | clearStickyFaults () |
int | getFirmwareVersion () |
boolean | hasResetOccurred () |
TalonEnhanced | configSetCustomParam (int newValue, int paramIndex) |
int | configGetCustomParam (int paramIndex) |
TalonEnhanced | configSetParameter (ParamEnum param, double value, int subValue, int ordinal) |
TalonEnhanced | configSetParameter (int param, double value, int subValue, int ordinal) |
double | configGetParameter (ParamEnum paramEnum, int ordinal) |
double | configGetParameter (int paramEnum, int ordinal) |
int | getBaseID () |
int | getDeviceID () |
ControlMode | getControlMode () |
TalonEnhanced | follow (IMotorController masterToFollow) |
TalonEnhanced | follow (TalonEnhanced masterToFollow) |
TalonEnhanced | configSelectedFeedbackSensor (FeedbackDevice feedbackDevice, int pidIdx) |
TalonEnhanced | configSupplyCurrentLimit (SupplyCurrentLimitConfiguration currLimitCfg) |
TalonEnhanced | setStatusFramePeriod (StatusFrameEnhanced frame, int periodMs) |
int | getStatusFramePeriod (StatusFrameEnhanced frame) |
TalonEnhanced | setFeedbackIntervals (int intervalMs) |
TalonEnhanced | setControlIntervals (int intervalMs) |
TalonEnhanced | setAllStatusIntervals (int intervalMs) |
TalonEnhanced | defaultFrameIntervals () |
double | getOutputCurrent () |
TalonEnhanced | configVelocityMeasurementPeriod (SensorVelocityMeasPeriod period) |
TalonEnhanced | configVelocityMeasurementWindow (int windowSize) |
TalonEnhanced | configForwardLimitSwitchSource (LimitSwitchSource type, LimitSwitchNormal normalOpenOrClose) |
TalonEnhanced | configReverseLimitSwitchSource (LimitSwitchSource type, LimitSwitchNormal normalOpenOrClose) |
This is my second attempt to create a wrapper class for CTRE motor controllers and add error checking, "lazy" setters (that only run when a value changes), and some other convenience methods.
At the moment, it's not technically a drop-in replacement for TalonFX or TalonSRX (some of those class's methods that aren't in IMotorControllerEnhanced are missing), but it's pretty close.
TalonEnhanced org.titaniumtitans.lib.drivers.TalonEnhanced.set | ( | ControlMode | controlMode, |
double | demand0 | ||
) |
Same idea as 254's "LazyTalonFX" class. The IMotorControllerEnhanced's set method is only called when demand0 is changed.
TalonEnhanced org.titaniumtitans.lib.drivers.TalonEnhanced.set | ( | ControlMode | controlMode, |
double | demand0, | ||
DemandType | demandType, | ||
double | demand1 | ||
) |
Same idea as 254's "LazyTalonFX" class. The IMotorControllerEnhanced's set method is only called when demand0 is changed.