Class TrapezoidalControllerConfiguration
- java.lang.Object
-
- frc.team88.swerve.configuration.subconfig.TrapezoidalControllerConfiguration
-
- All Implemented Interfaces:
NetworkTablePopulator
public class TrapezoidalControllerConfiguration extends java.lang.Object implements NetworkTablePopulator
Captures all of the configuration information about a SwerveModule's azimuth controller.
-
-
Constructor Summary
Constructors Constructor Description TrapezoidalControllerConfiguration(com.electronwill.nightconfig.core.Config config)
Constructs from a raw configuration.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
getMaxAcceleration()
Gets the max acceleration.double
getMaxSpeed()
Gets the max speed.PIDConfiguration
getPIDConfig()
Gets the PID configuration.void
populateNetworkTable(edu.wpi.first.networktables.NetworkTable table)
Populates the given network table with data from this class.
-
-
-
Constructor Detail
-
TrapezoidalControllerConfiguration
public TrapezoidalControllerConfiguration(com.electronwill.nightconfig.core.Config config)
Constructs from a raw configuration.- Parameters:
config
- The raw configuration.- Throws:
SwerveConfigException
- If the user provided config is incorrect.
-
-
Method Detail
-
getPIDConfig
public PIDConfiguration getPIDConfig()
Gets the PID configuration.- Returns:
- The PID configuration for the azimuth controller.
-
getMaxSpeed
public double getMaxSpeed()
Gets the max speed.- Returns:
- The max speed for the trapezoidal controller.
-
getMaxAcceleration
public double getMaxAcceleration()
Gets the max acceleration.- Returns:
- The max acceleration for the trapezoidal controller.
-
populateNetworkTable
public void populateNetworkTable(edu.wpi.first.networktables.NetworkTable table)
Description copied from interface:NetworkTablePopulator
Populates the given network table with data from this class. May also read in values.- Specified by:
populateNetworkTable
in interfaceNetworkTablePopulator
- Parameters:
table
- The table to populate, and possibly read from.
-
-