Class Falcon500Configuration
- java.lang.Object
-
- frc.team88.swerve.configuration.subconfig.Falcon500Configuration
-
- All Implemented Interfaces:
NetworkTablePopulator
public class Falcon500Configuration extends java.lang.Object implements NetworkTablePopulator
Captures all of the configuration information about a Falcon 500.
-
-
Constructor Summary
Constructors Constructor Description Falcon500Configuration(com.electronwill.nightconfig.core.Config config)
Constructs this configuration from a falcon 500 config.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
getInverted()
Gets if the motor is inverted.double
getMaxSpeed()
Gets the max speed of the motor.boolean
isInverted()
Gets if the motor is inverted.void
populateNetworkTable(edu.wpi.first.networktables.NetworkTable table)
Populates the given network table with data from this class.
-
-
-
Constructor Detail
-
Falcon500Configuration
public Falcon500Configuration(com.electronwill.nightconfig.core.Config config)
Constructs this configuration from a falcon 500 config.- Parameters:
config
- The instantiated falcon 500 template.- Throws:
SwerveConfigException
- If the user provided config is incorrect.
-
-
Method Detail
-
isInverted
public boolean isInverted()
Gets if the motor is inverted.- Returns:
- If the motor is inverted.
-
getInverted
public boolean getInverted()
Gets if the motor is inverted.- Returns:
- If the motor is inverted.
-
getMaxSpeed
public double getMaxSpeed()
Gets the max speed of the motor.- Returns:
- The measured max speed of the motor, including inefficiencies.
-
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.
-
-