WPILibC++ 2025.0.0-alpha-1-9-ga2beb75
ADXL362Sim.h
Go to the documentation of this file.
1// Copyright (c) FIRST and other WPILib contributors.
2// Open Source Software; you can modify and/or share it under the terms of
3// the WPILib BSD license file in the root directory of this project.
4
5#pragma once
6
7#include <hal/SimDevice.h>
8
9namespace frc {
10
11class ADXL362;
12
13namespace sim {
14
15/**
16 * Class to control a simulated ADXL362.
17 */
19 public:
20 /**
21 * Constructs from a ADXL362 object.
22 *
23 * @param accel ADXL362 accel to simulate
24 */
25 explicit ADXL362Sim(const ADXL362& accel);
26
27 /**
28 * Sets the X acceleration.
29 *
30 * @param accel The X acceleration.
31 */
32 void SetX(double accel);
33
34 /**
35 * Sets the Y acceleration.
36 *
37 * @param accel The Y acceleration.
38 */
39 void SetY(double accel);
40
41 /**
42 * Sets the Z acceleration.
43 *
44 * @param accel The Z acceleration.
45 */
46 void SetZ(double accel);
47
48 private:
49 hal::SimDouble m_simX;
50 hal::SimDouble m_simY;
51 hal::SimDouble m_simZ;
52};
53
54} // namespace sim
55} // namespace frc
ADXL362 SPI Accelerometer.
Definition: ADXL362.h:20
Class to control a simulated ADXL362.
Definition: ADXL362Sim.h:18
ADXL362Sim(const ADXL362 &accel)
Constructs from a ADXL362 object.
void SetZ(double accel)
Sets the Z acceleration.
void SetX(double accel)
Sets the X acceleration.
void SetY(double accel)
Sets the Y acceleration.
C++ wrapper around a HAL simulator double value handle.
Definition: SimDevice.h:536
Definition: AprilTagDetector_cv.h:11