mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-22 01:11:42 +00:00
31 lines
945 B
C
31 lines
945 B
C
|
|
/*----------------------------------------------------------------------------*/
|
||
|
|
/* Copyright (c) 2017 FIRST. All Rights Reserved. */
|
||
|
|
/* Open Source Software - may be modified and shared by FRC teams. The code */
|
||
|
|
/* must be accompanied by the FIRST BSD license file in the root directory of */
|
||
|
|
/* the project. */
|
||
|
|
/*----------------------------------------------------------------------------*/
|
||
|
|
|
||
|
|
#pragma once
|
||
|
|
|
||
|
|
#include "SpeedController.h"
|
||
|
|
|
||
|
|
namespace frc {
|
||
|
|
|
||
|
|
class MockSpeedController : public SpeedController {
|
||
|
|
public:
|
||
|
|
void Set(double speed) override;
|
||
|
|
double Get() const override;
|
||
|
|
void SetInverted(bool isInverted) override;
|
||
|
|
bool GetInverted() const override;
|
||
|
|
void Disable() override;
|
||
|
|
void StopMotor() override;
|
||
|
|
|
||
|
|
void PIDWrite(double output) override;
|
||
|
|
|
||
|
|
private:
|
||
|
|
double m_speed = 0.0;
|
||
|
|
bool m_isInverted = false;
|
||
|
|
};
|
||
|
|
|
||
|
|
} // namespace frc
|