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-12-28 19:42:19 -08:00
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
2021-04-17 11:27:16 -07:00
|
|
|
#include "frc/motorcontrol/PWMMotorController.h"
|
2017-12-28 19:42:19 -08:00
|
|
|
|
|
|
|
|
namespace frc {
|
|
|
|
|
|
|
|
|
|
/**
|
2021-09-12 15:18:45 -07:00
|
|
|
* Digilent DMC 60 Motor %Controller.
|
2019-11-09 09:14:53 -08:00
|
|
|
*
|
|
|
|
|
* Note that the DMC 60 uses the following bounds for PWM values. These
|
|
|
|
|
* values should work reasonably well for most controllers, but if users
|
|
|
|
|
* experience issues such as asymmetric behavior around the deadband or
|
|
|
|
|
* inability to saturate the controller in either direction, calibration is
|
|
|
|
|
* recommended. The calibration procedure can be found in the DMC 60 User
|
|
|
|
|
* Manual available from Digilent.
|
|
|
|
|
*
|
|
|
|
|
* \li 2.004ms = full "forward"
|
|
|
|
|
* \li 1.520ms = the "high end" of the deadband range
|
|
|
|
|
* \li 1.500ms = center of the deadband range (off)
|
|
|
|
|
* \li 1.480ms = the "low end" of the deadband range
|
|
|
|
|
* \li 0.997ms = full "reverse"
|
2017-12-28 19:42:19 -08:00
|
|
|
*/
|
2021-04-17 11:27:16 -07:00
|
|
|
class DMC60 : public PWMMotorController {
|
2017-12-28 19:42:19 -08:00
|
|
|
public:
|
2018-05-31 20:47:15 -07:00
|
|
|
/**
|
|
|
|
|
* Constructor for a Digilent DMC 60.
|
|
|
|
|
*
|
|
|
|
|
* @param channel The PWM channel that the DMC 60 is attached to. 0-9 are
|
|
|
|
|
* on-board, 10-19 are on the MXP port
|
|
|
|
|
*/
|
2017-12-28 19:42:19 -08:00
|
|
|
explicit DMC60(int channel);
|
2018-09-24 00:08:25 -07:00
|
|
|
|
|
|
|
|
DMC60(DMC60&&) = default;
|
|
|
|
|
DMC60& operator=(DMC60&&) = default;
|
2017-12-28 19:42:19 -08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
} // namespace frc
|