Files
allwpilib/wpilibc/src/test/native/include/motorcontrol/MockMotorController.hpp

25 lines
630 B
C++
Raw Normal View History

// 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.
2017-10-16 22:54:36 -04:00
#pragma once
2025-11-07 19:56:21 -05:00
#include "wpi/hardware/motor/MotorController.hpp"
2017-10-16 22:54:36 -04:00
2025-11-07 20:00:05 -05:00
namespace wpi {
2017-10-16 22:54:36 -04:00
class MockMotorController : public MotorController {
2017-10-16 22:54:36 -04:00
public:
void SetThrottle(double throttle) override;
double GetThrottle() const override;
2017-10-16 22:54:36 -04:00
void SetInverted(bool isInverted) override;
bool GetInverted() const override;
void Disable() override;
private:
double m_throttle = 0.0;
2017-10-16 22:54:36 -04:00
bool m_isInverted = false;
};
2025-11-07 20:00:05 -05:00
} // namespace wpi