WPILibC++ 2027.0.0-alpha-2
Loading...
Searching...
No Matches
ServoSim.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#include <units/length.h>
9
10#include "frc/Servo.h"
11
12namespace frc {
13
14class Servo;
15
16namespace sim {
17class ServoSim {
18 public:
19 explicit ServoSim(const Servo& servo);
20
21 explicit ServoSim(int channel);
22
23 double GetPosition() const;
24
25 double GetAngle() const;
26
27 private:
28 hal::SimDouble m_simPosition;
29};
30} // namespace sim
31} // namespace frc
Standard hobby style servo.
Definition Servo.h:24
Definition ServoSim.h:17
double GetAngle() const
ServoSim(const Servo &servo)
ServoSim(int channel)
double GetPosition() const
C++ wrapper around a HAL simulator double value handle.
Definition SimDevice.h:536
Definition SystemServer.h:9