mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-01 02:41:48 +00:00
[wpilib] Pregenerate PWM motor controllers (#6742)
Co-authored-by: Gold856 <117957790+Gold856@users.noreply.github.com>
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
// 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.
|
||||
|
||||
// THIS FILE WAS AUTO-GENERATED BY ./wpilibc/generate_pwm_motor_controllers.py. DO NOT MODIFY
|
||||
|
||||
#include "frc/motorcontrol/{{ name }}.h"
|
||||
|
||||
#include <hal/FRCUsageReporting.h>
|
||||
|
||||
using namespace frc;
|
||||
|
||||
{{ name }}::{{ name }}(int channel) : PWMMotorController("{{ name }}", channel) {
|
||||
m_pwm.SetBounds({{ pulse_width_ms.max }}_ms, {{ pulse_width_ms.deadbandMax }}_ms, {{ pulse_width_ms.center }}_ms, {{ pulse_width_ms.deadbandMin }}_ms, {{ pulse_width_ms.min }}_ms);
|
||||
m_pwm.SetPeriodMultiplier(PWM::kPeriodMultiplier_{{ PeriodMultiplier | default("1", true)}}X);
|
||||
m_pwm.SetSpeed(0.0);
|
||||
m_pwm.SetZeroLatch();
|
||||
|
||||
HAL_Report(HALUsageReporting::kResourceType_{{ ResourceName }}, GetChannel() + 1);
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
// 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.
|
||||
|
||||
// THIS FILE WAS AUTO-GENERATED BY ./wpilibc/generate_pwm_motor_controllers.py. DO NOT MODIFY
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "frc/motorcontrol/PWMMotorController.h"
|
||||
|
||||
namespace frc {
|
||||
|
||||
/**
|
||||
* {{ Manufacturer }} {{ DisplayName }} Motor Controller with PWM control.
|
||||
*
|
||||
* Note that the {{ DisplayName }} 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 {{ DisplayName }} User
|
||||
* Manual available from {{ Manufacturer }}.
|
||||
*
|
||||
* \li {{ "{:.3f}".format(pulse_width_ms.max) }}ms = full "forward"
|
||||
* \li {{ "{:.3f}".format(pulse_width_ms.deadbandMax) }}ms = the "high end" of the deadband range
|
||||
* \li {{ "{:.3f}".format(pulse_width_ms.center) }}ms = center of the deadband range (off)
|
||||
* \li {{ "{:.3f}".format(pulse_width_ms.deadbandMin) }}ms = the "low end" of the deadband range
|
||||
* \li {{ "{:.3f}".format(pulse_width_ms.min) }}ms = full "reverse"
|
||||
*/
|
||||
class {{ name }} : public PWMMotorController {
|
||||
public:
|
||||
/**
|
||||
* Constructor for a {{ DisplayName }} connected via PWM.
|
||||
*
|
||||
* @param channel The PWM channel that the {{ DisplayName }} is attached to. 0-9 are
|
||||
* on-board, 10-19 are on the MXP port
|
||||
*/
|
||||
explicit {{ name }}(int channel);
|
||||
|
||||
{{ name }}({{ name }}&&) = default;
|
||||
{{ name }}& operator=({{ name }}&&) = default;
|
||||
};
|
||||
|
||||
} // namespace frc
|
||||
@@ -2,6 +2,8 @@
|
||||
// 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.
|
||||
|
||||
// THIS FILE WAS AUTO-GENERATED BY ./wpilibc/generate_pwm_motor_controllers.py. DO NOT MODIFY
|
||||
|
||||
#include "frc/motorcontrol/DMC60.h"
|
||||
|
||||
#include <hal/FRCUsageReporting.h>
|
||||
@@ -9,7 +11,7 @@
|
||||
using namespace frc;
|
||||
|
||||
DMC60::DMC60(int channel) : PWMMotorController("DMC60", channel) {
|
||||
m_pwm.SetBounds(2.004_ms, 1.52_ms, 1.50_ms, 1.48_ms, 0.997_ms);
|
||||
m_pwm.SetBounds(2.004_ms, 1.52_ms, 1.5_ms, 1.48_ms, 0.997_ms);
|
||||
m_pwm.SetPeriodMultiplier(PWM::kPeriodMultiplier_1X);
|
||||
m_pwm.SetSpeed(0.0);
|
||||
m_pwm.SetZeroLatch();
|
||||
@@ -2,6 +2,8 @@
|
||||
// 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.
|
||||
|
||||
// THIS FILE WAS AUTO-GENERATED BY ./wpilibc/generate_pwm_motor_controllers.py. DO NOT MODIFY
|
||||
|
||||
#include "frc/motorcontrol/Jaguar.h"
|
||||
|
||||
#include <hal/FRCUsageReporting.h>
|
||||
@@ -2,19 +2,19 @@
|
||||
// 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.
|
||||
|
||||
// THIS FILE WAS AUTO-GENERATED BY ./wpilibc/generate_pwm_motor_controllers.py. DO NOT MODIFY
|
||||
|
||||
#include "frc/motorcontrol/PWMSparkFlex.h"
|
||||
|
||||
#include <hal/FRCUsageReporting.h>
|
||||
|
||||
using namespace frc;
|
||||
|
||||
PWMSparkFlex::PWMSparkFlex(int channel)
|
||||
: PWMMotorController("PWMSparkFlex", channel) {
|
||||
m_pwm.SetBounds(2.003_ms, 1.55_ms, 1.50_ms, 1.46_ms, 0.999_ms);
|
||||
PWMSparkFlex::PWMSparkFlex(int channel) : PWMMotorController("PWMSparkFlex", channel) {
|
||||
m_pwm.SetBounds(2.003_ms, 1.55_ms, 1.5_ms, 1.46_ms, 0.999_ms);
|
||||
m_pwm.SetPeriodMultiplier(PWM::kPeriodMultiplier_1X);
|
||||
m_pwm.SetSpeed(0.0);
|
||||
m_pwm.SetZeroLatch();
|
||||
|
||||
HAL_Report(HALUsageReporting::kResourceType_RevSparkFlexPWM,
|
||||
GetChannel() + 1);
|
||||
HAL_Report(HALUsageReporting::kResourceType_RevSparkFlexPWM, GetChannel() + 1);
|
||||
}
|
||||
@@ -2,15 +2,16 @@
|
||||
// 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.
|
||||
|
||||
// THIS FILE WAS AUTO-GENERATED BY ./wpilibc/generate_pwm_motor_controllers.py. DO NOT MODIFY
|
||||
|
||||
#include "frc/motorcontrol/PWMSparkMax.h"
|
||||
|
||||
#include <hal/FRCUsageReporting.h>
|
||||
|
||||
using namespace frc;
|
||||
|
||||
PWMSparkMax::PWMSparkMax(int channel)
|
||||
: PWMMotorController("PWMSparkMax", channel) {
|
||||
m_pwm.SetBounds(2.003_ms, 1.55_ms, 1.50_ms, 1.46_ms, 0.999_ms);
|
||||
PWMSparkMax::PWMSparkMax(int channel) : PWMMotorController("PWMSparkMax", channel) {
|
||||
m_pwm.SetBounds(2.003_ms, 1.55_ms, 1.5_ms, 1.46_ms, 0.999_ms);
|
||||
m_pwm.SetPeriodMultiplier(PWM::kPeriodMultiplier_1X);
|
||||
m_pwm.SetSpeed(0.0);
|
||||
m_pwm.SetZeroLatch();
|
||||
@@ -2,15 +2,16 @@
|
||||
// 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.
|
||||
|
||||
// THIS FILE WAS AUTO-GENERATED BY ./wpilibc/generate_pwm_motor_controllers.py. DO NOT MODIFY
|
||||
|
||||
#include "frc/motorcontrol/PWMTalonFX.h"
|
||||
|
||||
#include <hal/FRCUsageReporting.h>
|
||||
|
||||
using namespace frc;
|
||||
|
||||
PWMTalonFX::PWMTalonFX(int channel)
|
||||
: PWMMotorController("PWMTalonFX", channel) {
|
||||
m_pwm.SetBounds(2.004_ms, 1.52_ms, 1.50_ms, 1.48_ms, 0.997_ms);
|
||||
PWMTalonFX::PWMTalonFX(int channel) : PWMMotorController("PWMTalonFX", channel) {
|
||||
m_pwm.SetBounds(2.004_ms, 1.52_ms, 1.5_ms, 1.48_ms, 0.997_ms);
|
||||
m_pwm.SetPeriodMultiplier(PWM::kPeriodMultiplier_1X);
|
||||
m_pwm.SetSpeed(0.0);
|
||||
m_pwm.SetZeroLatch();
|
||||
@@ -2,15 +2,16 @@
|
||||
// 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.
|
||||
|
||||
// THIS FILE WAS AUTO-GENERATED BY ./wpilibc/generate_pwm_motor_controllers.py. DO NOT MODIFY
|
||||
|
||||
#include "frc/motorcontrol/PWMTalonSRX.h"
|
||||
|
||||
#include <hal/FRCUsageReporting.h>
|
||||
|
||||
using namespace frc;
|
||||
|
||||
PWMTalonSRX::PWMTalonSRX(int channel)
|
||||
: PWMMotorController("PWMTalonSRX", channel) {
|
||||
m_pwm.SetBounds(2.004_ms, 1.52_ms, 1.50_ms, 1.48_ms, 0.997_ms);
|
||||
PWMTalonSRX::PWMTalonSRX(int channel) : PWMMotorController("PWMTalonSRX", channel) {
|
||||
m_pwm.SetBounds(2.004_ms, 1.52_ms, 1.5_ms, 1.48_ms, 0.997_ms);
|
||||
m_pwm.SetPeriodMultiplier(PWM::kPeriodMultiplier_1X);
|
||||
m_pwm.SetSpeed(0.0);
|
||||
m_pwm.SetZeroLatch();
|
||||
@@ -2,6 +2,8 @@
|
||||
// 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.
|
||||
|
||||
// THIS FILE WAS AUTO-GENERATED BY ./wpilibc/generate_pwm_motor_controllers.py. DO NOT MODIFY
|
||||
|
||||
#include "frc/motorcontrol/PWMVenom.h"
|
||||
|
||||
#include <hal/FRCUsageReporting.h>
|
||||
@@ -9,7 +11,7 @@
|
||||
using namespace frc;
|
||||
|
||||
PWMVenom::PWMVenom(int channel) : PWMMotorController("PWMVenom", channel) {
|
||||
m_pwm.SetBounds(2.004_ms, 1.52_ms, 1.50_ms, 1.48_ms, 0.997_ms);
|
||||
m_pwm.SetBounds(2.004_ms, 1.52_ms, 1.5_ms, 1.48_ms, 0.997_ms);
|
||||
m_pwm.SetPeriodMultiplier(PWM::kPeriodMultiplier_1X);
|
||||
m_pwm.SetSpeed(0.0);
|
||||
m_pwm.SetZeroLatch();
|
||||
@@ -2,15 +2,16 @@
|
||||
// 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.
|
||||
|
||||
// THIS FILE WAS AUTO-GENERATED BY ./wpilibc/generate_pwm_motor_controllers.py. DO NOT MODIFY
|
||||
|
||||
#include "frc/motorcontrol/PWMVictorSPX.h"
|
||||
|
||||
#include <hal/FRCUsageReporting.h>
|
||||
|
||||
using namespace frc;
|
||||
|
||||
PWMVictorSPX::PWMVictorSPX(int channel)
|
||||
: PWMMotorController("PWMVictorSPX", channel) {
|
||||
m_pwm.SetBounds(2.004_ms, 1.52_ms, 1.50_ms, 1.48_ms, 0.997_ms);
|
||||
PWMVictorSPX::PWMVictorSPX(int channel) : PWMMotorController("PWMVictorSPX", channel) {
|
||||
m_pwm.SetBounds(2.004_ms, 1.52_ms, 1.5_ms, 1.48_ms, 0.997_ms);
|
||||
m_pwm.SetPeriodMultiplier(PWM::kPeriodMultiplier_1X);
|
||||
m_pwm.SetSpeed(0.0);
|
||||
m_pwm.SetZeroLatch();
|
||||
@@ -2,6 +2,8 @@
|
||||
// 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.
|
||||
|
||||
// THIS FILE WAS AUTO-GENERATED BY ./wpilibc/generate_pwm_motor_controllers.py. DO NOT MODIFY
|
||||
|
||||
#include "frc/motorcontrol/SD540.h"
|
||||
|
||||
#include <hal/FRCUsageReporting.h>
|
||||
@@ -9,11 +11,10 @@
|
||||
using namespace frc;
|
||||
|
||||
SD540::SD540(int channel) : PWMMotorController("SD540", channel) {
|
||||
m_pwm.SetBounds(2.05_ms, 1.55_ms, 1.50_ms, 1.44_ms, 0.94_ms);
|
||||
m_pwm.SetBounds(2.05_ms, 1.55_ms, 1.5_ms, 1.44_ms, 0.94_ms);
|
||||
m_pwm.SetPeriodMultiplier(PWM::kPeriodMultiplier_1X);
|
||||
m_pwm.SetSpeed(0.0);
|
||||
m_pwm.SetZeroLatch();
|
||||
|
||||
HAL_Report(HALUsageReporting::kResourceType_MindsensorsSD540,
|
||||
GetChannel() + 1);
|
||||
HAL_Report(HALUsageReporting::kResourceType_MindsensorsSD540, GetChannel() + 1);
|
||||
}
|
||||
@@ -2,6 +2,8 @@
|
||||
// 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.
|
||||
|
||||
// THIS FILE WAS AUTO-GENERATED BY ./wpilibc/generate_pwm_motor_controllers.py. DO NOT MODIFY
|
||||
|
||||
#include "frc/motorcontrol/Spark.h"
|
||||
|
||||
#include <hal/FRCUsageReporting.h>
|
||||
@@ -9,7 +11,7 @@
|
||||
using namespace frc;
|
||||
|
||||
Spark::Spark(int channel) : PWMMotorController("Spark", channel) {
|
||||
m_pwm.SetBounds(2.003_ms, 1.55_ms, 1.50_ms, 1.46_ms, 0.999_ms);
|
||||
m_pwm.SetBounds(2.003_ms, 1.55_ms, 1.5_ms, 1.46_ms, 0.999_ms);
|
||||
m_pwm.SetPeriodMultiplier(PWM::kPeriodMultiplier_1X);
|
||||
m_pwm.SetSpeed(0.0);
|
||||
m_pwm.SetZeroLatch();
|
||||
@@ -2,6 +2,8 @@
|
||||
// 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.
|
||||
|
||||
// THIS FILE WAS AUTO-GENERATED BY ./wpilibc/generate_pwm_motor_controllers.py. DO NOT MODIFY
|
||||
|
||||
#include "frc/motorcontrol/Talon.h"
|
||||
|
||||
#include <hal/FRCUsageReporting.h>
|
||||
@@ -2,6 +2,8 @@
|
||||
// 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.
|
||||
|
||||
// THIS FILE WAS AUTO-GENERATED BY ./wpilibc/generate_pwm_motor_controllers.py. DO NOT MODIFY
|
||||
|
||||
#include "frc/motorcontrol/Victor.h"
|
||||
|
||||
#include <hal/FRCUsageReporting.h>
|
||||
@@ -2,6 +2,8 @@
|
||||
// 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.
|
||||
|
||||
// THIS FILE WAS AUTO-GENERATED BY ./wpilibc/generate_pwm_motor_controllers.py. DO NOT MODIFY
|
||||
|
||||
#include "frc/motorcontrol/VictorSP.h"
|
||||
|
||||
#include <hal/FRCUsageReporting.h>
|
||||
@@ -9,7 +11,7 @@
|
||||
using namespace frc;
|
||||
|
||||
VictorSP::VictorSP(int channel) : PWMMotorController("VictorSP", channel) {
|
||||
m_pwm.SetBounds(2.004_ms, 1.52_ms, 1.50_ms, 1.48_ms, 0.997_ms);
|
||||
m_pwm.SetBounds(2.004_ms, 1.52_ms, 1.5_ms, 1.48_ms, 0.997_ms);
|
||||
m_pwm.SetPeriodMultiplier(PWM::kPeriodMultiplier_1X);
|
||||
m_pwm.SetSpeed(0.0);
|
||||
m_pwm.SetZeroLatch();
|
||||
@@ -2,6 +2,8 @@
|
||||
// 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.
|
||||
|
||||
// THIS FILE WAS AUTO-GENERATED BY ./wpilibc/generate_pwm_motor_controllers.py. DO NOT MODIFY
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "frc/motorcontrol/PWMMotorController.h"
|
||||
@@ -9,7 +11,7 @@
|
||||
namespace frc {
|
||||
|
||||
/**
|
||||
* Digilent DMC 60 Motor %Controller.
|
||||
* Digilent DMC 60 Motor Controller with PWM control.
|
||||
*
|
||||
* Note that the DMC 60 uses the following bounds for PWM values. These
|
||||
* values should work reasonably well for most controllers, but if users
|
||||
@@ -27,7 +29,7 @@ namespace frc {
|
||||
class DMC60 : public PWMMotorController {
|
||||
public:
|
||||
/**
|
||||
* Constructor for a Digilent DMC 60.
|
||||
* Constructor for a DMC 60 connected via PWM.
|
||||
*
|
||||
* @param channel The PWM channel that the DMC 60 is attached to. 0-9 are
|
||||
* on-board, 10-19 are on the MXP port
|
||||
@@ -2,6 +2,8 @@
|
||||
// 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.
|
||||
|
||||
// THIS FILE WAS AUTO-GENERATED BY ./wpilibc/generate_pwm_motor_controllers.py. DO NOT MODIFY
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "frc/motorcontrol/PWMMotorController.h"
|
||||
@@ -9,14 +11,14 @@
|
||||
namespace frc {
|
||||
|
||||
/**
|
||||
* Luminary Micro / Vex Robotics Jaguar Motor %Controller with PWM control.
|
||||
* 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.
|
||||
* 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 Luminary Micro / Vex Robotics.
|
||||
*
|
||||
* \li 2.310ms = full "forward"
|
||||
* \li 1.550ms = the "high end" of the deadband range
|
||||
@@ -2,6 +2,8 @@
|
||||
// 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.
|
||||
|
||||
// THIS FILE WAS AUTO-GENERATED BY ./wpilibc/generate_pwm_motor_controllers.py. DO NOT MODIFY
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "frc/motorcontrol/PWMMotorController.h"
|
||||
@@ -9,7 +11,7 @@
|
||||
namespace frc {
|
||||
|
||||
/**
|
||||
* REV Robotics SPARK Flex Motor %Controller.
|
||||
* REV Robotics SPARK Flex Motor Controller with PWM control.
|
||||
*
|
||||
* Note that the SPARK Flex uses the following bounds for PWM values. These
|
||||
* values should work reasonably well for most controllers, but if users
|
||||
@@ -27,7 +29,7 @@ namespace frc {
|
||||
class PWMSparkFlex : public PWMMotorController {
|
||||
public:
|
||||
/**
|
||||
* Constructor for a SPARK Flex.
|
||||
* Constructor for a SPARK Flex connected via PWM.
|
||||
*
|
||||
* @param channel The PWM channel that the SPARK Flex is attached to. 0-9 are
|
||||
* on-board, 10-19 are on the MXP port
|
||||
@@ -2,6 +2,8 @@
|
||||
// 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.
|
||||
|
||||
// THIS FILE WAS AUTO-GENERATED BY ./wpilibc/generate_pwm_motor_controllers.py. DO NOT MODIFY
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "frc/motorcontrol/PWMMotorController.h"
|
||||
@@ -9,7 +11,7 @@
|
||||
namespace frc {
|
||||
|
||||
/**
|
||||
* REV Robotics SPARK MAX Motor %Controller.
|
||||
* REV Robotics SPARK MAX Motor Controller with PWM control.
|
||||
*
|
||||
* Note that the SPARK MAX uses the following bounds for PWM values. These
|
||||
* values should work reasonably well for most controllers, but if users
|
||||
@@ -27,7 +29,7 @@ namespace frc {
|
||||
class PWMSparkMax : public PWMMotorController {
|
||||
public:
|
||||
/**
|
||||
* Constructor for a SPARK MAX.
|
||||
* Constructor for a SPARK MAX connected via PWM.
|
||||
*
|
||||
* @param channel The PWM channel that the SPARK MAX is attached to. 0-9 are
|
||||
* on-board, 10-19 are on the MXP port
|
||||
@@ -2,6 +2,8 @@
|
||||
// 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.
|
||||
|
||||
// THIS FILE WAS AUTO-GENERATED BY ./wpilibc/generate_pwm_motor_controllers.py. DO NOT MODIFY
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "frc/motorcontrol/PWMMotorController.h"
|
||||
@@ -9,15 +11,14 @@
|
||||
namespace frc {
|
||||
|
||||
/**
|
||||
* Cross the Road Electronics (CTRE) %Talon FX Motor %Controller with PWM
|
||||
* control.
|
||||
* 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
|
||||
* 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.
|
||||
* recommended. The calibration procedure can be found in the Talon FX User
|
||||
* Manual available from Cross the Road Electronics (CTRE).
|
||||
*
|
||||
* \li 2.004ms = full "forward"
|
||||
* \li 1.520ms = the "high end" of the deadband range
|
||||
@@ -28,9 +29,9 @@ namespace frc {
|
||||
class PWMTalonFX : public PWMMotorController {
|
||||
public:
|
||||
/**
|
||||
* Construct a %Talon FX connected via PWM.
|
||||
* Constructor for a Talon FX connected via PWM.
|
||||
*
|
||||
* @param channel The PWM channel that the %Talon FX is attached to. 0-9 are
|
||||
* @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);
|
||||
@@ -2,6 +2,8 @@
|
||||
// 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.
|
||||
|
||||
// THIS FILE WAS AUTO-GENERATED BY ./wpilibc/generate_pwm_motor_controllers.py. DO NOT MODIFY
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "frc/motorcontrol/PWMMotorController.h"
|
||||
@@ -9,15 +11,14 @@
|
||||
namespace frc {
|
||||
|
||||
/**
|
||||
* Cross the Road Electronics (CTRE) %Talon SRX Motor %Controller with PWM
|
||||
* control.
|
||||
* 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
|
||||
* 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.
|
||||
* recommended. The calibration procedure can be found in the Talon SRX User
|
||||
* Manual available from Cross the Road Electronics (CTRE).
|
||||
*
|
||||
* \li 2.004ms = full "forward"
|
||||
* \li 1.520ms = the "high end" of the deadband range
|
||||
@@ -28,9 +29,9 @@ namespace frc {
|
||||
class PWMTalonSRX : public PWMMotorController {
|
||||
public:
|
||||
/**
|
||||
* Construct a %Talon SRX connected via PWM.
|
||||
* Constructor for a Talon SRX connected via PWM.
|
||||
*
|
||||
* @param channel The PWM channel that the %Talon SRX is attached to. 0-9 are
|
||||
* @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);
|
||||
@@ -2,6 +2,8 @@
|
||||
// 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.
|
||||
|
||||
// THIS FILE WAS AUTO-GENERATED BY ./wpilibc/generate_pwm_motor_controllers.py. DO NOT MODIFY
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "frc/motorcontrol/PWMMotorController.h"
|
||||
@@ -9,13 +11,14 @@
|
||||
namespace frc {
|
||||
|
||||
/**
|
||||
* Playing with Fusion Venom Smart Motor with PWM control.
|
||||
* Playing with Fusion Venom Motor Controller 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.
|
||||
* recommended. The calibration procedure can be found in the Venom User
|
||||
* Manual available from Playing with Fusion.
|
||||
*
|
||||
* \li 2.004ms = full "forward"
|
||||
* \li 1.520ms = the "high end" of the deadband range
|
||||
@@ -26,7 +29,7 @@ namespace frc {
|
||||
class PWMVenom : public PWMMotorController {
|
||||
public:
|
||||
/**
|
||||
* Construct a Venom connected via PWM.
|
||||
* Constructor for 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
|
||||
@@ -2,6 +2,8 @@
|
||||
// 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.
|
||||
|
||||
// THIS FILE WAS AUTO-GENERATED BY ./wpilibc/generate_pwm_motor_controllers.py. DO NOT MODIFY
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "frc/motorcontrol/PWMMotorController.h"
|
||||
@@ -9,15 +11,14 @@
|
||||
namespace frc {
|
||||
|
||||
/**
|
||||
* Cross the Road Electronics (CTRE) %Victor SPX Motor %Controller with PWM
|
||||
* control.
|
||||
* 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
|
||||
* 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.
|
||||
* recommended. The calibration procedure can be found in the Victor SPX User
|
||||
* Manual available from Cross the Road Electronics (CTRE).
|
||||
*
|
||||
* \li 2.004ms = full "forward"
|
||||
* \li 1.520ms = the "high end" of the deadband range
|
||||
@@ -28,10 +29,10 @@ namespace frc {
|
||||
class PWMVictorSPX : public PWMMotorController {
|
||||
public:
|
||||
/**
|
||||
* Construct a %Victor SPX connected via PWM.
|
||||
* Constructor for 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
|
||||
* @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);
|
||||
|
||||
43
wpilibc/src/generated/main/native/include/frc/motorcontrol/SD540.h
generated
Normal file
43
wpilibc/src/generated/main/native/include/frc/motorcontrol/SD540.h
generated
Normal file
@@ -0,0 +1,43 @@
|
||||
// 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.
|
||||
|
||||
// THIS FILE WAS AUTO-GENERATED BY ./wpilibc/generate_pwm_motor_controllers.py. DO NOT MODIFY
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "frc/motorcontrol/PWMMotorController.h"
|
||||
|
||||
namespace frc {
|
||||
|
||||
/**
|
||||
* Mindsensors SD540 Motor Controller with PWM control.
|
||||
*
|
||||
* 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.050ms = full "forward"
|
||||
* \li 1.550ms = the "high end" of the deadband range
|
||||
* \li 1.500ms = center of the deadband range (off)
|
||||
* \li 1.440ms = the "low end" of the deadband range
|
||||
* \li 0.940ms = full "reverse"
|
||||
*/
|
||||
class SD540 : public PWMMotorController {
|
||||
public:
|
||||
/**
|
||||
* Constructor for a SD540 connected via PWM.
|
||||
*
|
||||
* @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
|
||||
@@ -2,6 +2,8 @@
|
||||
// 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.
|
||||
|
||||
// THIS FILE WAS AUTO-GENERATED BY ./wpilibc/generate_pwm_motor_controllers.py. DO NOT MODIFY
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "frc/motorcontrol/PWMMotorController.h"
|
||||
@@ -9,14 +11,14 @@
|
||||
namespace frc {
|
||||
|
||||
/**
|
||||
* REV Robotics SPARK Motor %Controller.
|
||||
* REV Robotics SPARK Motor Controller with PWM control.
|
||||
*
|
||||
* 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.
|
||||
* 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
|
||||
@@ -27,7 +29,7 @@ namespace frc {
|
||||
class Spark : public PWMMotorController {
|
||||
public:
|
||||
/**
|
||||
* Constructor for a SPARK.
|
||||
* Constructor for a SPARK connected via PWM.
|
||||
*
|
||||
* @param channel The PWM channel that the SPARK is attached to. 0-9 are
|
||||
* on-board, 10-19 are on the MXP port
|
||||
43
wpilibc/src/generated/main/native/include/frc/motorcontrol/Talon.h
generated
Normal file
43
wpilibc/src/generated/main/native/include/frc/motorcontrol/Talon.h
generated
Normal file
@@ -0,0 +1,43 @@
|
||||
// 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.
|
||||
|
||||
// THIS FILE WAS AUTO-GENERATED BY ./wpilibc/generate_pwm_motor_controllers.py. DO NOT MODIFY
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "frc/motorcontrol/PWMMotorController.h"
|
||||
|
||||
namespace frc {
|
||||
|
||||
/**
|
||||
* Cross the Road Electronics (CTRE) Talon Motor Controller with PWM control.
|
||||
*
|
||||
* 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 Cross the Road Electronics (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 connected via PWM.
|
||||
*
|
||||
* @param channel The PWM channel 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
|
||||
43
wpilibc/src/generated/main/native/include/frc/motorcontrol/Victor.h
generated
Normal file
43
wpilibc/src/generated/main/native/include/frc/motorcontrol/Victor.h
generated
Normal file
@@ -0,0 +1,43 @@
|
||||
// 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.
|
||||
|
||||
// THIS FILE WAS AUTO-GENERATED BY ./wpilibc/generate_pwm_motor_controllers.py. DO NOT MODIFY
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "frc/motorcontrol/PWMMotorController.h"
|
||||
|
||||
namespace frc {
|
||||
|
||||
/**
|
||||
* Vex Robotics Victor 888 Motor Controller with PWM control.
|
||||
*
|
||||
* Note that the Victor 888 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 888 User
|
||||
* Manual available from Vex Robotics.
|
||||
*
|
||||
* \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 888 connected via PWM.
|
||||
*
|
||||
* @param channel The PWM channel that the Victor 888 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
|
||||
@@ -2,6 +2,8 @@
|
||||
// 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.
|
||||
|
||||
// THIS FILE WAS AUTO-GENERATED BY ./wpilibc/generate_pwm_motor_controllers.py. DO NOT MODIFY
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "frc/motorcontrol/PWMMotorController.h"
|
||||
@@ -9,14 +11,14 @@
|
||||
namespace frc {
|
||||
|
||||
/**
|
||||
* Vex Robotics %Victor SP Motor %Controller.
|
||||
* Vex Robotics Victor SP Motor Controller with PWM control.
|
||||
*
|
||||
* Note that the %Victor SP uses the following bounds for PWM values. These
|
||||
* 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.
|
||||
* recommended. The calibration procedure can be found in the Victor SP User
|
||||
* Manual available from Vex Robotics.
|
||||
*
|
||||
* \li 2.004ms = full "forward"
|
||||
* \li 1.520ms = the "high end" of the deadband range
|
||||
@@ -27,7 +29,7 @@ namespace frc {
|
||||
class VictorSP : public PWMMotorController {
|
||||
public:
|
||||
/**
|
||||
* Constructor for a %Victor SP.
|
||||
* Constructor for a Victor SP connected via PWM.
|
||||
*
|
||||
* @param channel The PWM channel that the Victor SP is attached to. 0-9 are
|
||||
* on-board, 10-19 are on the MXP port
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user