mirror of
https://github.com/BroncBotz3481/YAGSL
synced 2026-06-19 06:21:40 +00:00
Updated to 2024.4.6.3
This commit is contained in:
@@ -404,6 +404,39 @@ public class SparkFlexSwerve extends SwerveMotor
|
||||
setReference(setpoint, feedforward);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the voltage output of the motor controller.
|
||||
*
|
||||
* @return Voltage output.
|
||||
*/
|
||||
@Override
|
||||
public double getVoltage()
|
||||
{
|
||||
return motor.getAppliedOutput() * motor.getBusVoltage();
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the voltage of the motor.
|
||||
*
|
||||
* @param voltage Voltage to set.
|
||||
*/
|
||||
@Override
|
||||
public void setVoltage(double voltage)
|
||||
{
|
||||
motor.setVoltage(voltage);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the applied dutycycle output.
|
||||
*
|
||||
* @return Applied dutycycle output to the motor.
|
||||
*/
|
||||
@Override
|
||||
public double getAppliedOutput()
|
||||
{
|
||||
return motor.getAppliedOutput();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the velocity of the integrated encoder.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user