mirror of
https://github.com/BroncBotz3481/YAGSL
synced 2026-06-21 06:31:40 +00:00
Update to swervelib 2024.5.0.0
This commit is contained in:
37
swervelib/parser/json/modules/ConversionFactorsJson.java
Normal file
37
swervelib/parser/json/modules/ConversionFactorsJson.java
Normal file
@@ -0,0 +1,37 @@
|
||||
package swervelib.parser.json.modules;
|
||||
|
||||
/**
|
||||
* Conversion Factors parsed JSON class
|
||||
*/
|
||||
public class ConversionFactorsJson
|
||||
{
|
||||
|
||||
/**
|
||||
* Drive motor conversion factors composition.
|
||||
*/
|
||||
public DriveConversionFactorsJson drive = new DriveConversionFactorsJson();
|
||||
/**
|
||||
* Angle motor conversion factors composition.
|
||||
*/
|
||||
public AngleConversionFactorsJson angle = new AngleConversionFactorsJson();
|
||||
|
||||
/**
|
||||
* Check if the conversion factors are set for the drive motor.
|
||||
*
|
||||
* @return Empty
|
||||
*/
|
||||
public boolean isDriveEmpty()
|
||||
{
|
||||
return drive.factor == 0 && drive.diameter == 0 && drive.gearRatio == 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the conversion factors are set for the angle motor.
|
||||
*
|
||||
* @return Empty
|
||||
*/
|
||||
public boolean isAngleEmpty()
|
||||
{
|
||||
return angle.factor == 0 && angle.gearRatio == 0;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user