mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-01 02:41:48 +00:00
Implement sim devices for ADXL345, ADXL362, ADXRS450, Ultrasonic
This makes the halsim_adx_gyro_accelerometer simulation plugin and the accelerometer part of lowfi_simulation obsolete.
This commit is contained in:
@@ -7,6 +7,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <hal/SimDevice.h>
|
||||
|
||||
#include "frc/ErrorBase.h"
|
||||
#include "frc/SPI.h"
|
||||
#include "frc/interfaces/Accelerometer.h"
|
||||
@@ -81,6 +83,11 @@ class ADXL362 : public ErrorBase,
|
||||
|
||||
private:
|
||||
SPI m_spi;
|
||||
hal::SimDevice m_simDevice;
|
||||
hal::SimEnum m_simRange;
|
||||
hal::SimDouble m_simX;
|
||||
hal::SimDouble m_simY;
|
||||
hal::SimDouble m_simZ;
|
||||
double m_gsPerLSB = 0.001;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user