mirror of
https://github.com/BroncBotz3481/YAGSL
synced 2026-06-19 06:21:40 +00:00
Upgrading to 2025.1.0
This commit is contained in:
@@ -1,8 +1,6 @@
|
||||
package swervelib.parser.json.modules;
|
||||
|
||||
import swervelib.math.SwerveMath;
|
||||
import swervelib.telemetry.Alert;
|
||||
import swervelib.telemetry.Alert.AlertType;
|
||||
|
||||
/**
|
||||
* Angle motor conversion factors composite JSON parse class.
|
||||
@@ -13,11 +11,11 @@ public class AngleConversionFactorsJson
|
||||
/**
|
||||
* Gear ratio for the angle/steering/azimuth motor on the Swerve Module. Motor rotations to 1 wheel rotation.
|
||||
*/
|
||||
public double gearRatio = 0;
|
||||
public double gearRatio;
|
||||
/**
|
||||
* Calculated or given conversion factor.
|
||||
*/
|
||||
public double factor = 0;
|
||||
public double factor = 0;
|
||||
|
||||
/**
|
||||
* Calculate the drive conversion factor.
|
||||
@@ -26,12 +24,6 @@ public class AngleConversionFactorsJson
|
||||
*/
|
||||
public double calculate()
|
||||
{
|
||||
if (factor != 0 && gearRatio != 0)
|
||||
{
|
||||
new Alert("Configuration",
|
||||
"The given angle conversion factor takes precedence over the composite conversion factor, please remove 'factor' if you want to use the composite factor instead.",
|
||||
AlertType.WARNING).set(true);
|
||||
}
|
||||
if (factor == 0)
|
||||
{
|
||||
factor = SwerveMath.calculateDegreesPerSteeringRotation(gearRatio);
|
||||
|
||||
Reference in New Issue
Block a user