[wpilib] Pregenerate PWM motor controllers (#6742)

Co-authored-by: Gold856 <117957790+Gold856@users.noreply.github.com>
This commit is contained in:
PJ Reiniger
2024-06-18 10:43:08 -04:00
committed by GitHub
parent 66c0abb732
commit b6bd798f9e
49 changed files with 790 additions and 271 deletions

View File

@@ -1,41 +0,0 @@
// 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.
#pragma once
#include "frc/motorcontrol/PWMMotorController.h"
namespace frc {
/**
* Digilent DMC 60 Motor %Controller.
*
* 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"
*/
class DMC60 : public PWMMotorController {
public:
/**
* 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
*/
explicit DMC60(int channel);
DMC60(DMC60&&) = default;
DMC60& operator=(DMC60&&) = default;
};
} // namespace frc

View File

@@ -1,41 +0,0 @@
// 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.
#pragma once
#include "frc/motorcontrol/PWMMotorController.h"
namespace frc {
/**
* Luminary Micro / Vex Robotics Jaguar Motor %Controller with PWM control.
*
* Note that the Jaguar 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 Jaguar User Manual available from
* Vex.
*
* \li 2.310ms = full "forward"
* \li 1.550ms = the "high end" of the deadband range
* \li 1.507ms = center of the deadband range (off)
* \li 1.454ms = the "low end" of the deadband range
* \li 0.697ms = full "reverse"
*/
class Jaguar : public PWMMotorController {
public:
/**
* Constructor for a Jaguar connected via PWM.
*
* @param channel The PWM channel that the Jaguar is attached to. 0-9 are
* on-board, 10-19 are on the MXP port
*/
explicit Jaguar(int channel);
Jaguar(Jaguar&&) = default;
Jaguar& operator=(Jaguar&&) = default;
};
} // namespace frc

View File

@@ -1,41 +0,0 @@
// 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.
#pragma once
#include "frc/motorcontrol/PWMMotorController.h"
namespace frc {
/**
* REV Robotics SPARK Flex Motor %Controller.
*
* Note that the SPARK Flex 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 SPARK Flex User
* Manual available from REV Robotics.
*
* \li 2.003ms = full "forward"
* \li 1.550ms = the "high end" of the deadband range
* \li 1.500ms = center of the deadband range (off)
* \li 1.460ms = the "low end" of the deadband range
* \li 0.999ms = full "reverse"
*/
class PWMSparkFlex : public PWMMotorController {
public:
/**
* Constructor for a SPARK Flex.
*
* @param channel The PWM channel that the SPARK Flex is attached to. 0-9 are
* on-board, 10-19 are on the MXP port
*/
explicit PWMSparkFlex(int channel);
PWMSparkFlex(PWMSparkFlex&&) = default;
PWMSparkFlex& operator=(PWMSparkFlex&&) = default;
};
} // namespace frc

View File

@@ -1,41 +0,0 @@
// 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.
#pragma once
#include "frc/motorcontrol/PWMMotorController.h"
namespace frc {
/**
* REV Robotics SPARK MAX Motor %Controller.
*
* Note that the SPARK MAX 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 SPARK MAX User
* Manual available from REV Robotics.
*
* \li 2.003ms = full "forward"
* \li 1.550ms = the "high end" of the deadband range
* \li 1.500ms = center of the deadband range (off)
* \li 1.460ms = the "low end" of the deadband range
* \li 0.999ms = full "reverse"
*/
class PWMSparkMax : public PWMMotorController {
public:
/**
* Constructor for a SPARK MAX.
*
* @param channel The PWM channel that the SPARK MAX is attached to. 0-9 are
* on-board, 10-19 are on the MXP port
*/
explicit PWMSparkMax(int channel);
PWMSparkMax(PWMSparkMax&&) = default;
PWMSparkMax& operator=(PWMSparkMax&&) = default;
};
} // namespace frc

View File

@@ -1,42 +0,0 @@
// 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.
#pragma once
#include "frc/motorcontrol/PWMMotorController.h"
namespace frc {
/**
* Cross the Road Electronics (CTRE) %Talon FX Motor %Controller with PWM
* control.
*
* Note that the %Talon FX 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 %Talon FX User
* Manual available from Cross The Road Electronics.
*
* \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"
*/
class PWMTalonFX : public PWMMotorController {
public:
/**
* Construct a %Talon FX connected via PWM.
*
* @param channel The PWM channel that the %Talon FX is attached to. 0-9 are
* on-board, 10-19 are on the MXP port
*/
explicit PWMTalonFX(int channel);
PWMTalonFX(PWMTalonFX&&) = default;
PWMTalonFX& operator=(PWMTalonFX&&) = default;
};
} // namespace frc

View File

@@ -1,42 +0,0 @@
// 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.
#pragma once
#include "frc/motorcontrol/PWMMotorController.h"
namespace frc {
/**
* Cross the Road Electronics (CTRE) %Talon SRX Motor %Controller with PWM
* control.
*
* Note that the %Talon SRX 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 %Talon SRX User
* Manual available from Cross The Road Electronics.
*
* \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"
*/
class PWMTalonSRX : public PWMMotorController {
public:
/**
* Construct a %Talon SRX connected via PWM.
*
* @param channel The PWM channel that the %Talon SRX is attached to. 0-9 are
* on-board, 10-19 are on the MXP port
*/
explicit PWMTalonSRX(int channel);
PWMTalonSRX(PWMTalonSRX&&) = default;
PWMTalonSRX& operator=(PWMTalonSRX&&) = default;
};
} // namespace frc

View File

@@ -1,40 +0,0 @@
// 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.
#pragma once
#include "frc/motorcontrol/PWMMotorController.h"
namespace frc {
/**
* Playing with Fusion Venom Smart Motor with PWM control.
*
* Note that the Venom 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.
*
* \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"
*/
class PWMVenom : public PWMMotorController {
public:
/**
* Construct a Venom connected via PWM.
*
* @param channel The PWM channel that the Venom is attached to. 0-9 are
* on-board, 10-19 are on the MXP port
*/
explicit PWMVenom(int channel);
PWMVenom(PWMVenom&&) = default;
PWMVenom& operator=(PWMVenom&&) = default;
};
} // namespace frc

View File

@@ -1,42 +0,0 @@
// 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.
#pragma once
#include "frc/motorcontrol/PWMMotorController.h"
namespace frc {
/**
* Cross the Road Electronics (CTRE) %Victor SPX Motor %Controller with PWM
* control.
*
* Note that the %Victor SPX 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 %Victor SPX User
* Manual available from Cross The Road Electronics.
*
* \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"
*/
class PWMVictorSPX : public PWMMotorController {
public:
/**
* Construct a %Victor SPX connected via PWM.
*
* @param channel The PWM channel that the %Victor SPX is attached to. 0-9
* are on-board, 10-19 are on the MXP port
*/
explicit PWMVictorSPX(int channel);
PWMVictorSPX(PWMVictorSPX&&) = default;
PWMVictorSPX& operator=(PWMVictorSPX&&) = default;
};
} // namespace frc

View File

@@ -1,41 +0,0 @@
// 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.
#pragma once
#include "frc/motorcontrol/PWMMotorController.h"
namespace frc {
/**
* Mindsensors SD540 Motor %Controller.
*
* Note that the SD540 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 SD540 User Manual available
* from Mindsensors.
*
* \li 2.05ms = full "forward"
* \li 1.55ms = the "high end" of the deadband range
* \li 1.50ms = center of the deadband range (off)
* \li 1.44ms = the "low end" of the deadband range
* \li 0.94ms = full "reverse"
*/
class SD540 : public PWMMotorController {
public:
/**
* Constructor for a SD540.
*
* @param channel The PWM channel that the SD540 is attached to. 0-9 are
* on-board, 10-19 are on the MXP port
*/
explicit SD540(int channel);
SD540(SD540&&) = default;
SD540& operator=(SD540&&) = default;
};
} // namespace frc

View File

@@ -1,41 +0,0 @@
// 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.
#pragma once
#include "frc/motorcontrol/PWMMotorController.h"
namespace frc {
/**
* REV Robotics SPARK Motor %Controller.
*
* Note that the SPARK 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 SPARK User Manual available
* from REV Robotics.
*
* \li 2.003ms = full "forward"
* \li 1.550ms = the "high end" of the deadband range
* \li 1.500ms = center of the deadband range (off)
* \li 1.460ms = the "low end" of the deadband range
* \li 0.999ms = full "reverse"
*/
class Spark : public PWMMotorController {
public:
/**
* Constructor for a SPARK.
*
* @param channel The PWM channel that the SPARK is attached to. 0-9 are
* on-board, 10-19 are on the MXP port
*/
explicit Spark(int channel);
Spark(Spark&&) = default;
Spark& operator=(Spark&&) = default;
};
} // namespace frc

View File

@@ -1,41 +0,0 @@
// 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.
#pragma once
#include "frc/motorcontrol/PWMMotorController.h"
namespace frc {
/**
* Cross the Road Electronics (CTRE) %Talon and %Talon SR Motor %Controller.
*
* Note that the %Talon 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 %Talon User Manual available
* from CTRE.
*
* \li 2.037ms = full "forward"
* \li 1.539ms = the "high end" of the deadband range
* \li 1.513ms = center of the deadband range (off)
* \li 1.487ms = the "low end" of the deadband range
* \li 0.989ms = full "reverse"
*/
class Talon : public PWMMotorController {
public:
/**
* Constructor for a %Talon (original or %Talon SR).
*
* @param channel The PWM channel number that the %Talon is attached to. 0-9
* are on-board, 10-19 are on the MXP port
*/
explicit Talon(int channel);
Talon(Talon&&) = default;
Talon& operator=(Talon&&) = default;
};
} // namespace frc

View File

@@ -1,45 +0,0 @@
// 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.
#pragma once
#include "frc/motorcontrol/PWMMotorController.h"
namespace frc {
/**
* Vex Robotics %Victor 888 Motor %Controller.
*
* The Vex Robotics %Victor 884 Motor %Controller can also be used with this
* class but may need to be calibrated per the Victor 884 user manual.
*
* Note that the %Victor uses the following bounds for PWM values. These
* values were determined empirically and optimized for the %Victor 888. These
* values should work reasonably well for %Victor 884 controllers as well 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 %Victor 884 User
* Manual available from Vex.
*
* \li 2.027ms = full "forward"
* \li 1.525ms = the "high end" of the deadband range
* \li 1.507ms = center of the deadband range (off)
* \li 1.490ms = the "low end" of the deadband range
* \li 1.026ms = full "reverse"
*/
class Victor : public PWMMotorController {
public:
/**
* Constructor for a %Victor.
*
* @param channel The PWM channel number that the %Victor is attached to. 0-9
* are on-board, 10-19 are on the MXP port
*/
explicit Victor(int channel);
Victor(Victor&&) = default;
Victor& operator=(Victor&&) = default;
};
} // namespace frc

View File

@@ -1,41 +0,0 @@
// 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.
#pragma once
#include "frc/motorcontrol/PWMMotorController.h"
namespace frc {
/**
* Vex Robotics %Victor SP Motor %Controller.
*
* Note that the %Victor SP 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 %Victor SP User
* Manual available from Vex.
*
* \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"
*/
class VictorSP : public PWMMotorController {
public:
/**
* Constructor for a %Victor SP.
*
* @param channel The PWM channel that the Victor SP is attached to. 0-9 are
* on-board, 10-19 are on the MXP port
*/
explicit VictorSP(int channel);
VictorSP(VictorSP&&) = default;
VictorSP& operator=(VictorSP&&) = default;
};
} // namespace frc