Record Class SwerveParser.SwerveDriveHardware
java.lang.Object
java.lang.Record
swervelib.core.parser.SwerveParser.SwerveDriveHardware
- Record Components:
gyro- Raw gyro device (e.g. aPigeon2instance), ornullif the configured gyro type is"custom"(the caller is expected to supply/own their own gyro in that case).modules- Raw devices for each module, in the same order asSwerveDriveJson.modules.
- Enclosing class:
SwerveParser
protected static record SwerveParser.SwerveDriveHardware(Object gyro, SwerveParser.SwerveModuleDevices[] modules)
extends Record
Raw hardware devices created by
SwerveParser.buildSwerveDrive(SwerveDriveConfig, Supplier).-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedSwerveDriveHardware(Object gyro, SwerveParser.SwerveModuleDevices[] modules) Creates an instance of aSwerveDriveHardwarerecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.gyro()Returns the value of thegyrorecord component.final inthashCode()Returns a hash code value for this object.modules()Returns the value of themodulesrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
gyro
-
modules
-