Class PhoenixOdometryThread.SyncData

java.lang.Object
com.marslib.swerve.PhoenixOdometryThread.SyncData
Enclosing class:
PhoenixOdometryThread

public static class PhoenixOdometryThread.SyncData extends Object
Container for a batch of synchronized odometry samples from a single module.

Arrays are pre-allocated at fixed capacity (PhoenixOdometryThread.MAX_SAMPLES). Use validCount to determine how many entries are populated. Do not read beyond validCount - 1.

  • Field Details

    • drivePositions

      public final double[] drivePositions
      Accumulated drive encoder positions (motor rotations) since the last drain.
    • turnPositions

      public final double[] turnPositions
      Accumulated turn encoder positions (motor rotations) since the last drain.
    • timestamps

      public final double[] timestamps
      FPGA timestamps corresponding to each position sample.
    • validCount

      public int validCount
      Number of valid samples in this batch. Only indices [0, validCount) are valid.
  • Constructor Details

    • SyncData

      public SyncData()