[wpilib] Make ADXL345 default I2C address public (#6163)

pybind needs it.
This commit is contained in:
Tyler Veness
2024-01-05 16:59:30 -08:00
committed by GitHub
parent 7c26bc70ab
commit 0a46a3a618
2 changed files with 6 additions and 2 deletions

View File

@@ -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;