mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-21 01:01:43 +00:00
Add SpeedControllerGroup (#362)
This commit is contained in:
committed by
Peter Johnson
parent
24752a9751
commit
877a9eae1f
@@ -0,0 +1,30 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* 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
|
||||
Reference in New Issue
Block a user