Files
allwpilib/wpilibc/src/main/native/include/frc/simulation/ServoSim.h
Thad House e2cc9e0059 [hal, wpilib] PWM Rewrite (#7845)
The HAL will only contain the output period and the raw microseconds. Higher level things such as SimDevice can handle everything else.
2025-03-20 19:23:22 -07:00

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