2020-12-26 14:12:05 -08:00
|
|
|
// 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"
|
2025-11-07 19:57:55 -05:00
|
|
|
#include "wpi/util/deprecated.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
|
|
|
|
2024-01-01 13:37:51 -08:00
|
|
|
WPI_IGNORE_DEPRECATED
|
|
|
|
|
|
2021-04-17 11:27:16 -07:00
|
|
|
class MockMotorController : public MotorController {
|
2017-10-16 22:54:36 -04:00
|
|
|
public:
|
2026-03-06 14:19:15 -08:00
|
|
|
void SetDutyCycle(double dutyCycle) override;
|
|
|
|
|
double GetDutyCycle() const override;
|
2017-10-16 22:54:36 -04:00
|
|
|
void SetInverted(bool isInverted) override;
|
|
|
|
|
bool GetInverted() const override;
|
|
|
|
|
void Disable() override;
|
|
|
|
|
|
|
|
|
|
private:
|
2026-03-06 14:19:15 -08:00
|
|
|
double m_dutyCycle = 0.0;
|
2017-10-16 22:54:36 -04:00
|
|
|
bool m_isInverted = false;
|
|
|
|
|
};
|
|
|
|
|
|
2024-01-01 13:37:51 -08:00
|
|
|
WPI_UNIGNORE_DEPRECATED
|
|
|
|
|
|
2025-11-07 20:00:05 -05:00
|
|
|
} // namespace wpi
|