mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-01 02:41:48 +00:00
[wpilib] Make ADXL345 default I2C address public (#6163)
pybind needs it.
This commit is contained in:
@@ -64,6 +64,9 @@ class ADXL345_I2C : public nt::NTSendable,
|
||||
double ZAxis = 0.0;
|
||||
};
|
||||
|
||||
/// Default I2C device address.
|
||||
static constexpr int kAddress = 0x1D;
|
||||
|
||||
/**
|
||||
* Constructs the ADXL345 Accelerometer over I2C.
|
||||
*
|
||||
@@ -137,7 +140,6 @@ class ADXL345_I2C : public nt::NTSendable,
|
||||
hal::SimDouble m_simY;
|
||||
hal::SimDouble m_simZ;
|
||||
|
||||
static constexpr int kAddress = 0x1D;
|
||||
static constexpr int kPowerCtlRegister = 0x2D;
|
||||
static constexpr int kDataFormatRegister = 0x31;
|
||||
static constexpr int kDataRegister = 0x32;
|
||||
|
||||
@@ -27,7 +27,9 @@ import java.nio.ByteOrder;
|
||||
*/
|
||||
@SuppressWarnings({"TypeName", "PMD.UnusedPrivateField"})
|
||||
public class ADXL345_I2C implements NTSendable, AutoCloseable {
|
||||
private static final byte kAddress = 0x1D;
|
||||
/** Default I2C device address. */
|
||||
public static final byte kAddress = 0x1D;
|
||||
|
||||
private static final byte kPowerCtlRegister = 0x2D;
|
||||
private static final byte kDataFormatRegister = 0x31;
|
||||
private static final byte kDataRegister = 0x32;
|
||||
|
||||
Reference in New Issue
Block a user