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
12
namespace
frc
{
13
14
class
Servo;
15
16
namespace
sim {
17
class
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
Servo.h
SimDevice.h
frc::Servo
Standard hobby style servo.
Definition
Servo.h:24
frc::sim::ServoSim
Definition
ServoSim.h:17
frc::sim::ServoSim::GetAngle
double GetAngle() const
frc::sim::ServoSim::ServoSim
ServoSim(const Servo &servo)
frc::sim::ServoSim::ServoSim
ServoSim(int channel)
frc::sim::ServoSim::GetPosition
double GetPosition() const
hal::SimDouble
C++ wrapper around a HAL simulator double value handle.
Definition
SimDevice.h:536
length.h
frc
Definition
SystemServer.h:9
frc
simulation
ServoSim.h
Generated on Wed Jul 23 2025 00:48:18 for WPILibC++ by
1.12.0