diff --git a/hal/src/main/native/include/HAL/UsageReporting.h b/hal/src/main/native/include/HAL/UsageReporting.h index a840fd482b..4618bb4610 100644 --- a/hal/src/main/native/include/HAL/UsageReporting.h +++ b/hal/src/main/native/include/HAL/UsageReporting.h @@ -71,7 +71,7 @@ namespace nUsageReporting kResourceType_SRF08, kResourceType_AnalogOutput, kResourceType_VictorSP, // 50 - kResourceType_TalonSRX, + kResourceType_PWMTalonSRX, kResourceType_CANTalonSRX, kResourceType_ADXL362, kResourceType_ADXRS450, diff --git a/wpilibc/src/main/native/cpp/TalonSRX.cpp b/wpilibc/src/main/native/cpp/PWMTalonSRX.cpp similarity index 74% rename from wpilibc/src/main/native/cpp/TalonSRX.cpp rename to wpilibc/src/main/native/cpp/PWMTalonSRX.cpp index 0e1b19a5d0..6422492423 100644 --- a/wpilibc/src/main/native/cpp/TalonSRX.cpp +++ b/wpilibc/src/main/native/cpp/PWMTalonSRX.cpp @@ -5,7 +5,7 @@ /* the project. */ /*----------------------------------------------------------------------------*/ -#include "TalonSRX.h" +#include "PWMTalonSRX.h" #include @@ -14,13 +14,13 @@ using namespace frc; /** - * Construct a TalonSRX connected via PWM. + * Construct a PWMTalonSRX connected via PWM. * - * @param channel The PWM channel that the TalonSRX is attached to. 0-9 are + * @param channel The PWM channel that the PWMTalonSRX is attached to. 0-9 are * on-board, 10-19 are on the MXP port */ -TalonSRX::TalonSRX(int channel) : PWMSpeedController(channel) { - /* Note that the TalonSRX uses the following bounds for PWM values. These +PWMTalonSRX::PWMTalonSRX(int channel) : PWMSpeedController(channel) { + /* Note that the PWMTalonSRX 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 @@ -37,6 +37,6 @@ TalonSRX::TalonSRX(int channel) : PWMSpeedController(channel) { SetSpeed(0.0); SetZeroLatch(); - HAL_Report(HALUsageReporting::kResourceType_TalonSRX, GetChannel()); - LiveWindow::GetInstance()->AddActuator("TalonSRX", GetChannel(), this); + HAL_Report(HALUsageReporting::kResourceType_PWMTalonSRX, GetChannel()); + LiveWindow::GetInstance()->AddActuator("PWMTalonSRX", GetChannel(), this); } diff --git a/wpilibc/src/main/native/include/TalonSRX.h b/wpilibc/src/main/native/include/PWMTalonSRX.h similarity index 84% rename from wpilibc/src/main/native/include/TalonSRX.h rename to wpilibc/src/main/native/include/PWMTalonSRX.h index a6431aa74d..fb30079712 100644 --- a/wpilibc/src/main/native/include/TalonSRX.h +++ b/wpilibc/src/main/native/include/PWMTalonSRX.h @@ -14,10 +14,10 @@ namespace frc { /** * Cross the Road Electronics (CTRE) Talon SRX Speed Controller with PWM control */ -class TalonSRX : public PWMSpeedController { +class PWMTalonSRX : public PWMSpeedController { public: - explicit TalonSRX(int channel); - virtual ~TalonSRX() = default; + explicit PWMTalonSRX(int channel); + virtual ~PWMTalonSRX() = default; }; } // namespace frc diff --git a/wpilibc/src/main/native/include/WPILib.h b/wpilibc/src/main/native/include/WPILib.h index ac2000fa89..b4b988d2aa 100644 --- a/wpilibc/src/main/native/include/WPILib.h +++ b/wpilibc/src/main/native/include/WPILib.h @@ -61,6 +61,7 @@ #include "PIDSource.h" #include "PWM.h" #include "PWMSpeedController.h" +#include "PWMTalonSRX.h" #include "PowerDistributionPanel.h" #include "Preferences.h" #include "Relay.h" @@ -78,7 +79,6 @@ #include "Spark.h" #include "SpeedController.h" #include "Talon.h" -#include "TalonSRX.h" #include "Threads.h" #include "TimedRobot.h" #include "Timer.h" diff --git a/wpilibj/src/main/java/edu/wpi/first/wpilibj/TalonSRX.java b/wpilibj/src/main/java/edu/wpi/first/wpilibj/PWMTalonSRX.java similarity index 75% rename from wpilibj/src/main/java/edu/wpi/first/wpilibj/TalonSRX.java rename to wpilibj/src/main/java/edu/wpi/first/wpilibj/PWMTalonSRX.java index 8b758a9a3f..4e8239701c 100644 --- a/wpilibj/src/main/java/edu/wpi/first/wpilibj/TalonSRX.java +++ b/wpilibj/src/main/java/edu/wpi/first/wpilibj/PWMTalonSRX.java @@ -14,12 +14,12 @@ import edu.wpi.first.wpilibj.livewindow.LiveWindow; /** * Cross the Road Electronics (CTRE) Talon SRX Speed Controller with PWM control. */ -public class TalonSRX extends PWMSpeedController { +public class PWMTalonSRX extends PWMSpeedController { /** - * Constructor for a TalonSRX connected via PWM. + * Constructor for a PWMTalonSRX connected via PWM. * - *

Note that the TalonSRX uses the following bounds for PWM values. These values should work + *

Note that the PWMTalonSRX 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 TalonSRX User Manual @@ -30,10 +30,10 @@ public class TalonSRX extends PWMSpeedController { * of the deadband range (off) - 1.48ms = the "low end" of the deadband range - .997ms = full * "reverse" * - * @param channel The PWM channel that the TalonSRX is attached to. 0-9 are on-board, 10-19 are + * @param channel The PWM channel that the PWMTalonSRX is attached to. 0-9 are on-board, 10-19 are * on the MXP port */ - public TalonSRX(final int channel) { + public PWMTalonSRX(final int channel) { super(channel); setBounds(2.004, 1.52, 1.50, 1.48, .997); @@ -41,7 +41,7 @@ public class TalonSRX extends PWMSpeedController { setSpeed(0.0); setZeroLatch(); - LiveWindow.addActuator("TalonSRX", getChannel(), this); - HAL.report(tResourceType.kResourceType_TalonSRX, getChannel()); + LiveWindow.addActuator("PWMTalonSRX", getChannel(), this); + HAL.report(tResourceType.kResourceType_PWMTalonSRX, getChannel()); } } diff --git a/wpilibj/src/main/java/edu/wpi/first/wpilibj/hal/FRCNetComm.java b/wpilibj/src/main/java/edu/wpi/first/wpilibj/hal/FRCNetComm.java index 68c1f5fc62..226d21e11b 100644 --- a/wpilibj/src/main/java/edu/wpi/first/wpilibj/hal/FRCNetComm.java +++ b/wpilibj/src/main/java/edu/wpi/first/wpilibj/hal/FRCNetComm.java @@ -96,13 +96,17 @@ public class FRCNetComm extends JNIWrapper { int kResourceType_SRF08 = 48; int kResourceType_AnalogOutput = 49; int kResourceType_VictorSP = 50; - int kResourceType_TalonSRX = 51; + int kResourceType_PWMTalonSRX = 51; int kResourceType_CANTalonSRX = 52; int kResourceType_ADXL362 = 53; int kResourceType_ADXRS450 = 54; int kResourceType_RevSPARK = 55; int kResourceType_MindsensorsSD540 = 56; int kResourceType_DigitalFilter = 57; + int kResourceType_ADIS16448 = 58; + int kResourceType_PDP = 59; + int kResourceType_PCM = 60; + int kResourceType_PigeonIMU = 61; } /**