mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-02 02:51:42 +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:
@@ -9,6 +9,8 @@
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include <hal/SimDevice.h>
|
||||
|
||||
#include "frc/GyroBase.h"
|
||||
#include "frc/SPI.h"
|
||||
|
||||
@@ -94,6 +96,10 @@ class ADXRS450_Gyro : public GyroBase {
|
||||
private:
|
||||
SPI m_spi;
|
||||
|
||||
hal::SimDevice m_simDevice;
|
||||
hal::SimDouble m_simAngle;
|
||||
hal::SimDouble m_simRate;
|
||||
|
||||
uint16_t ReadRegister(int reg);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user