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 /** Accelerometer range. */ 015 enum Range { 016 /** 2 Gs max. */ 017 k2G, 018 /** 4 Gs max. */ 019 k4G, 020 /** 8 Gs max. */ 021 k8G, 022 /** 16 Gs max. */ 023 k16G 024 } 025 026 /** 027 * Common interface for setting the measuring range of an accelerometer. 028 * 029 * @param range The maximum acceleration, positive or negative, that the accelerometer will 030 * measure. Not all accelerometers support all ranges. 031 */ 032 void setRange(Range range); 033 034 /** 035 * Common interface for getting the x-axis acceleration. 036 * 037 * @return The acceleration along the x-axis in g-forces 038 */ 039 double getX(); 040 041 /** 042 * Common interface for getting the y-axis acceleration. 043 * 044 * @return The acceleration along the y-axis in g-forces 045 */ 046 double getY(); 047 048 /** 049 * Common interface for getting the z axis acceleration. 050 * 051 * @return The acceleration along the z axis in g-forces 052 */ 053 double getZ(); 054}