Package org.texastorque.torquelib.legacy
Class TorqueFalcon
java.lang.Object
org.texastorque.torquelib.legacy.base.TorqueMotor
org.texastorque.torquelib.legacy.TorqueFalcon
- All Implemented Interfaces:
TorqueEncoderMotor
,TorquePIDMotor
,TorqueSmartMotor
Deprecated.
NOT SUITABLE FOR 2023
The Texas Torque wrapper for the Falcon (TalonFX) motor controller.
-
Field Summary
Modifier and TypeFieldDescriptionfinal double
Deprecated.Clicks per rotation on the motor encoder.Fields inherited from class org.texastorque.torquelib.legacy.base.TorqueMotor
port
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal void
addFollower
(int port) Deprecated.Add a follower Falcon.final void
addFollower
(int port, boolean invert) Deprecated.Add a follower Falcon and optionally invert.final void
configurePID
(TorquePID pid) Deprecated.Configures the PID controller for the motor.final void
configurePID
(KPID kPID) Deprecated.final double
Deprecated.Get the acceleration of the motor in encoder units per second per second.final double
Deprecated.Get the acceleration of the motor in RPM/s.final double
Deprecated.Get the acceleration of the motor in RPS/s.final double
Deprecated.Gets current used by the Falcon.final double
Deprecated.Get the position of the motor in encoder units.final double
Deprecated.Get the position of the motor in degrees.final double
Deprecated.Get the position of the motor in rotations.final double
Deprecated.Get the velocity of the motor in encoder units per second.final double
Deprecated.Get the velocity of the motor in RPM.final double
Deprecated.Get the velocity of the motor in RPS.final void
invert
(boolean invert) Deprecated.Sets the inversion status of the lead motor.final void
setNeutralMode
(com.ctre.phoenix.motorcontrol.NeutralMode neutralMode) Deprecated.Set neutral mode.final void
setPercent
(double percent) Deprecated.Sets the output of the motor to the given percent.final void
setPosition
(double setpoint) Deprecated.Set the motor's position in encoder units.final void
setPositionDegrees
(double setpoint) Deprecated.Set the motor's position in degrees.final void
setPositionRotations
(double setpoint) Deprecated.Set the motor's position in rotations.final void
setStatorLimit
(com.ctre.phoenix.motorcontrol.StatorCurrentLimitConfiguration limit) Deprecated.Set max amps supply.final void
setSupplyLimit
(com.ctre.phoenix.motorcontrol.SupplyCurrentLimitConfiguration limit) Deprecated.Set max amps supply.final void
setVelocity
(double setpoint) Deprecated.Set the motor's velocity in encoder units per second.final void
setVelocityRPM
(double setpoint) Deprecated.Set the motor's velocity in RPM.final void
setVelocityRPS
(double setpoint) Deprecated.Set the motor's velocity in RPS.final void
setVoltage
(double outputVolts) Deprecated.Set the motor to output a certain voltage setpoint.final void
Deprecated.Zero the encoder.
-
Field Details
-
CLICKS_PER_ROTATION
public final double CLICKS_PER_ROTATIONDeprecated.Clicks per rotation on the motor encoder.- See Also:
-
-
Constructor Details
-
TorqueFalcon
public TorqueFalcon(int port) Deprecated.Construct a new TorqueFalcon motor.- Parameters:
port
- The port (ID) of the motor.
-
-
Method Details
-
addFollower
public final void addFollower(int port) Deprecated.Add a follower Falcon.- Specified by:
addFollower
in classTorqueMotor
- Parameters:
port
- The port (ID) of the follower Falcon.
-
addFollower
public final void addFollower(int port, boolean invert) Deprecated.Add a follower Falcon and optionally invert.- Specified by:
addFollower
in classTorqueMotor
- Parameters:
port
- The port (ID) of the follower Falcon.
-
invert
public final void invert(boolean invert) Deprecated.Sets the inversion status of the lead motor.- Specified by:
invert
in classTorqueMotor
- Parameters:
invert
- To invert or not to invert.
-
configurePID
Deprecated.Configures the PID controller for the motor.- Specified by:
configurePID
in interfaceTorquePIDMotor
- Parameters:
kPID
- The KPID value to configure the motor too.
-
configurePID
Deprecated.Configures the PID controller for the motor.- Specified by:
configurePID
in interfaceTorquePIDMotor
- Parameters:
pid
- The PID to configure the motor with.
-
setPercent
public final void setPercent(double percent) Deprecated.Sets the output of the motor to the given percent.- Specified by:
setPercent
in classTorqueMotor
- Parameters:
percent
- The percent the motor should output at.
-
setVoltage
public final void setVoltage(double outputVolts) Deprecated.Set the motor to output a certain voltage setpoint.- Specified by:
setVoltage
in classTorqueMotor
- Parameters:
outputVolts
- The voltage to output.
-
setPosition
public final void setPosition(double setpoint) Deprecated.Set the motor's position in encoder units.- Specified by:
setPosition
in interfaceTorquePIDMotor
- Parameters:
setpoint
- The encoder units to set the motor to.
-
setPositionDegrees
public final void setPositionDegrees(double setpoint) Deprecated.Set the motor's position in degrees.- Specified by:
setPositionDegrees
in interfaceTorquePIDMotor
- Parameters:
setpoint
- The degrees to set the motor to.
-
setPositionRotations
public final void setPositionRotations(double setpoint) Deprecated.Set the motor's position in rotations.- Specified by:
setPositionRotations
in interfaceTorquePIDMotor
- Parameters:
setpoint
- The rotations to set the motor to.
-
setVelocity
public final void setVelocity(double setpoint) Deprecated.Set the motor's velocity in encoder units per second.- Specified by:
setVelocity
in interfaceTorquePIDMotor
- Parameters:
setpoint
- The encoder units per second to set the motor to.
-
setVelocityRPS
public final void setVelocityRPS(double setpoint) Deprecated.Set the motor's velocity in RPS.- Specified by:
setVelocityRPS
in interfaceTorquePIDMotor
- Parameters:
setpoint
- The RPS to set the motor to.
-
setVelocityRPM
public final void setVelocityRPM(double setpoint) Deprecated.Set the motor's velocity in RPM.- Specified by:
setVelocityRPM
in interfaceTorquePIDMotor
- Parameters:
setpoint
- The RPM to set the motor to.
-
getPosition
public final double getPosition()Deprecated.Get the position of the motor in encoder units.- Specified by:
getPosition
in interfaceTorqueEncoderMotor
- Returns:
- The position of the encoder in encoder units.
-
getPositionDegrees
public final double getPositionDegrees()Deprecated.Get the position of the motor in degrees.- Specified by:
getPositionDegrees
in interfaceTorqueEncoderMotor
- Returns:
- The position of the encoder in degrees.
-
getPositionRotations
public final double getPositionRotations()Deprecated.Get the position of the motor in rotations.- Specified by:
getPositionRotations
in interfaceTorqueEncoderMotor
- Returns:
- The position of the encoder in rotations.
-
getVelocity
public final double getVelocity()Deprecated.Get the velocity of the motor in encoder units per second.- Specified by:
getVelocity
in interfaceTorqueEncoderMotor
- Returns:
- acceleration in encoder units per second.
-
getVelocityRPS
public final double getVelocityRPS()Deprecated.Get the velocity of the motor in RPS.- Specified by:
getVelocityRPS
in interfaceTorqueEncoderMotor
- Returns:
- acceleration in RPS.
-
getVelocityRPM
public final double getVelocityRPM()Deprecated.Get the velocity of the motor in RPM.- Specified by:
getVelocityRPM
in interfaceTorqueEncoderMotor
- Returns:
- acceleration in RPM.
-
getAcceleration
public final double getAcceleration()Deprecated.Get the acceleration of the motor in encoder units per second per second.- Specified by:
getAcceleration
in interfaceTorqueEncoderMotor
- Returns:
- acceleration in encoder units per second per second.
-
getAccelerationRPS
public final double getAccelerationRPS()Deprecated.Get the acceleration of the motor in RPS/s.- Specified by:
getAccelerationRPS
in interfaceTorqueEncoderMotor
- Returns:
- acceleration in RPM/s.
-
getAccelerationRPM
public final double getAccelerationRPM()Deprecated.Get the acceleration of the motor in RPM/s.- Specified by:
getAccelerationRPM
in interfaceTorqueEncoderMotor
- Returns:
- acceleration in RPM/s.
-
setSupplyLimit
public final void setSupplyLimit(com.ctre.phoenix.motorcontrol.SupplyCurrentLimitConfiguration limit) Deprecated.Set max amps supply.- Parameters:
limit
- Supply limit config.
-
setStatorLimit
public final void setStatorLimit(com.ctre.phoenix.motorcontrol.StatorCurrentLimitConfiguration limit) Deprecated.Set max amps supply.- Parameters:
limit
- Stator limit config.
-
getCurrent
public final double getCurrent()Deprecated.Gets current used by the Falcon.- Returns:
- The current used by the Falcon.
-
zeroEncoder
public final void zeroEncoder()Deprecated.Zero the encoder. -
setNeutralMode
public final void setNeutralMode(com.ctre.phoenix.motorcontrol.NeutralMode neutralMode) Deprecated.Set neutral mode.- Parameters:
neutralMode
- Neutral mode.
-