001// Copyright (c) FIRST and other WPILib contributors.
002// Open Source Software; you can modify and/or share it under the terms of
003// the WPILib BSD license file in the root directory of this project.
004
005package edu.wpi.first.wpilibj.interfaces;
006
007/**
008 * Interface for 3-axis accelerometers.
009 *
010 * @deprecated This interface is being removed with no replacement.
011 */
012@Deprecated(since = "2024", forRemoval = true)
013public interface Accelerometer {
014  enum Range {
015    k2G,
016    k4G,
017    k8G,
018    k16G
019  }
020
021  /**
022   * Common interface for setting the measuring range of an accelerometer.
023   *
024   * @param range The maximum acceleration, positive or negative, that the accelerometer will
025   *     measure. Not all accelerometers support all ranges.
026   */
027  void setRange(Range range);
028
029  /**
030   * Common interface for getting the x-axis acceleration.
031   *
032   * @return The acceleration along the x-axis in g-forces
033   */
034  double getX();
035
036  /**
037   * Common interface for getting the y-axis acceleration.
038   *
039   * @return The acceleration along the y-axis in g-forces
040   */
041  double getY();
042
043  /**
044   * Common interface for getting the z axis acceleration.
045   *
046   * @return The acceleration along the z axis in g-forces
047   */
048  double getZ();
049}