001/**
002 * Copyright 2024 The Space Cookies : Girl Scout Troop #62868 and FRC Team #1868
003 * Open Source Software; you may modify and/or share it under the terms of
004 * the 3-Clause BSD License found in the root directory of this project.
005 */
006
007package tagalong.devices;
008
009/**
010 * Generic encoder or encoder like sensors identifier enum
011 */
012public enum Encoders implements CanDeviceInterface {
013  /**
014   * CTRE CANcoder
015   */
016  CANCODER(4096), // 12-bit measurement
017  /**
018   * CTRE PIGEON2 -- Yaw used as encoder value
019   */
020  PIGEON2_YAW(65536), // 16-bit measurement
021  /**
022   * CTRE PIGEON2 -- Pitch used as encoder value
023   */
024  PIGEON2_PITCH(65536), // 16-bit measurement
025  /**
026   * CTRE PIGEON2 -- Roll used as encoder value
027   */
028  PIGEON2_ROLL(65536); // 16-bit measurement
029
030  /**
031   * Sensor value increments (ticks) per a rotation of the sensor
032   */
033  public final int _ticksPerRotation;
034
035  /**
036   *
037   * @param ticksPerRotation Sensor value increments per a rotation of the sensor
038   */
039  Encoders(int ticksPerRotation) {
040    _ticksPerRotation = ticksPerRotation;
041  }
042}