Class ModuleJson

java.lang.Object
swervelib.parser.json.ModuleJson

public class ModuleJson extends Object
SwerveModule JSON parsed class. Used to access the JSON data.
  • Field Details

    • drive

      public DeviceJson drive
      Drive motor device configuration.
    • angle

      public DeviceJson angle
      Angle motor device configuration.
    • gearing

      public GearingJson gearing
      Conversion Factors composition. Auto-calculates the conversion factors.
    • absoluteEncoder

      public DeviceJson absoluteEncoder
      Absolute encoder device configuration.
    • inverted

      public BoolMotorJson inverted
      Defines which motors are inverted.
    • absoluteEncoderOffset

      public double absoluteEncoderOffset
      Absolute encoder offset from 0 in degrees.
    • absoluteEncoderInverted

      public boolean absoluteEncoderInverted
      Absolute encoder inversion state.
    • absoluteEncoderGearRatio

      public double absoluteEncoderGearRatio
      Reduction ratio for the absolute encoder to the motor. X where "X:1"
    • location

      public LocationJson location
      The location of the swerve module from the center of the robot in inches.
  • Constructor Details

    • ModuleJson

      public ModuleJson()