mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-29 02:21:44 +00:00
The HAL will only contain the output period and the raw microseconds. Higher level things such as SimDevice can handle everything else.
32 lines
586 B
C++
32 lines
586 B
C++
// Copyright (c) FIRST and other WPILib contributors.
|
|
// Open Source Software; you can modify and/or share it under the terms of
|
|
// the WPILib BSD license file in the root directory of this project.
|
|
|
|
#pragma once
|
|
|
|
#include <hal/SimDevice.h>
|
|
#include <units/length.h>
|
|
|
|
#include "frc/Servo.h"
|
|
|
|
namespace frc {
|
|
|
|
class Servo;
|
|
|
|
namespace sim {
|
|
class ServoSim {
|
|
public:
|
|
explicit ServoSim(const Servo& servo);
|
|
|
|
explicit ServoSim(int channel);
|
|
|
|
double GetPosition() const;
|
|
|
|
double GetAngle() const;
|
|
|
|
private:
|
|
hal::SimDouble m_simPosition;
|
|
};
|
|
} // namespace sim
|
|
} // namespace frc
|