mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-21 01:01:43 +00:00
SCRIPT: wpiformat
This commit is contained in:
committed by
Peter Johnson
parent
ae6bdc9d25
commit
2109161534
@@ -15,9 +15,9 @@ ADXL345_I2C::ADXL345_I2C(I2C::Port port, Range range, int deviceAddress)
|
||||
: m_i2c(port, deviceAddress),
|
||||
m_simDevice("Accel:ADXL345_I2C", port, deviceAddress) {
|
||||
if (m_simDevice) {
|
||||
m_simRange = m_simDevice.CreateEnumDouble("range", wpi::hal::SimDevice::kOutput,
|
||||
{"2G", "4G", "8G", "16G"},
|
||||
{2.0, 4.0, 8.0, 16.0}, 0);
|
||||
m_simRange = m_simDevice.CreateEnumDouble(
|
||||
"range", wpi::hal::SimDevice::kOutput, {"2G", "4G", "8G", "16G"},
|
||||
{2.0, 4.0, 8.0, 16.0}, 0);
|
||||
m_simX = m_simDevice.CreateDouble("x", wpi::hal::SimDevice::kInput, 0.0);
|
||||
m_simY = m_simDevice.CreateDouble("y", wpi::hal::SimDevice::kInput, 0.0);
|
||||
m_simZ = m_simDevice.CreateDouble("z", wpi::hal::SimDevice::kInput, 0.0);
|
||||
|
||||
@@ -55,5 +55,5 @@ void AnalogAccelerometer::InitAccelerometer() {
|
||||
HAL_ReportUsage("IO", m_analogInput->GetChannel(), "Accelerometer");
|
||||
|
||||
wpi::util::SendableRegistry::Add(this, "Accelerometer",
|
||||
m_analogInput->GetChannel());
|
||||
m_analogInput->GetChannel());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user