mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-24 01:31:46 +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:
@@ -1,35 +0,0 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Copyright (c) 2008-2018 FIRST. All Rights Reserved. */
|
||||
/* Open Source Software - may be modified and shared by FRC teams. The code */
|
||||
/* must be accompanied by the FIRST BSD license file in the root directory of */
|
||||
/* the project. */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "ThreeAxisAccelerometerData.h"
|
||||
#include "lowfisim/SimpleAccelerometerSim.h"
|
||||
|
||||
namespace frc {
|
||||
namespace sim {
|
||||
namespace lowfi {
|
||||
|
||||
class ADXLThreeAxisAccelerometerSim {
|
||||
public:
|
||||
ADXLThreeAxisAccelerometerSim(
|
||||
hal::ThreeAxisAccelerometerData& accelerometerWrapper);
|
||||
|
||||
AccelerometerSim& GetXWrapper();
|
||||
AccelerometerSim& GetYWrapper();
|
||||
AccelerometerSim& GetZWrapper();
|
||||
|
||||
protected:
|
||||
hal::ThreeAxisAccelerometerData& m_accelerometerWrapper;
|
||||
SimpleAccelerometerSim m_xWrapper;
|
||||
SimpleAccelerometerSim m_yWrapper;
|
||||
SimpleAccelerometerSim m_zWrapper;
|
||||
};
|
||||
|
||||
} // namespace lowfi
|
||||
} // namespace sim
|
||||
} // namespace frc
|
||||
@@ -1,32 +0,0 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Copyright (c) 2008-2019 FIRST. All Rights Reserved. */
|
||||
/* Open Source Software - may be modified and shared by FRC teams. The code */
|
||||
/* must be accompanied by the FIRST BSD license file in the root directory of */
|
||||
/* the project. */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "ADXRS450_SpiGyroWrapperData.h"
|
||||
#include "lowfisim/GyroSim.h"
|
||||
|
||||
namespace frc {
|
||||
namespace sim {
|
||||
namespace lowfi {
|
||||
|
||||
class ADXRS450_SpiGyroSim : public GyroSim {
|
||||
public:
|
||||
explicit ADXRS450_SpiGyroSim(int spiPort);
|
||||
|
||||
bool IsWrapperInitialized() const override;
|
||||
|
||||
void SetAngle(double angle) override;
|
||||
double GetAngle() override;
|
||||
|
||||
protected:
|
||||
hal::ADXRS450_SpiGyroWrapper m_gyroWrapper;
|
||||
};
|
||||
|
||||
} // namespace lowfi
|
||||
} // namespace sim
|
||||
} // namespace frc
|
||||
Reference in New Issue
Block a user