Files
YAGSL/swervelib/parser/json/ControllerPropertiesJson.java

35 lines
1.0 KiB
Java
Raw Normal View History

2023-02-13 17:21:24 -06:00
package swervelib.parser.json;
2023-02-13 14:37:05 -06:00
2023-02-13 17:21:24 -06:00
import swervelib.parser.PIDFConfig;
import swervelib.parser.SwerveControllerConfiguration;
import swervelib.parser.SwerveDriveConfiguration;
2023-02-13 14:37:05 -06:00
/**
2023-02-13 17:21:24 -06:00
* {@link swervelib.SwerveController} parsed class. Used to access the JSON data.
2023-02-13 14:37:05 -06:00
*/
public class ControllerPropertiesJson
{
/**
* The minimum radius of the angle control joystick to allow for heading adjustment of the robot.
*/
public double angleJoystickRadiusDeadband;
/**
* The PID used to control the robot heading.
*/
public PIDFConfig heading;
/**
* Create the {@link SwerveControllerConfiguration} based on parsed and given data.
*
* @param driveConfiguration {@link SwerveDriveConfiguration} parsed configuration.
* @return {@link SwerveControllerConfiguration} object based on parsed data.
*/
public SwerveControllerConfiguration createControllerConfiguration(
SwerveDriveConfiguration driveConfiguration)
2023-02-13 14:37:05 -06:00
{
return new SwerveControllerConfiguration(
driveConfiguration, heading, angleJoystickRadiusDeadband);
2023-02-13 14:37:05 -06:00
}
}