diff --git a/hal/include/HAL/HAL.hpp b/hal/include/HAL/HAL.hpp index 4ea9adc4a9..e76a289f79 100644 --- a/hal/include/HAL/HAL.hpp +++ b/hal/include/HAL/HAL.hpp @@ -98,6 +98,7 @@ namespace HALUsageReporting kResourceType_ADXL362, kResourceType_ADXRS450, kResourceType_RevSPARK, + kResourceType_MindsensorsSD540, kResourceType_DigitalGlitchFilter, }; diff --git a/hal/lib/Athena/FRC_NetworkCommunication/UsageReporting.h b/hal/lib/Athena/FRC_NetworkCommunication/UsageReporting.h index fe5e84bdee..e7cf249699 100644 --- a/hal/lib/Athena/FRC_NetworkCommunication/UsageReporting.h +++ b/hal/lib/Athena/FRC_NetworkCommunication/UsageReporting.h @@ -77,6 +77,7 @@ namespace nUsageReporting kResourceType_ADXRS450, kResourceType_RevSPARK, kResourceType_MindsensorsSD540, + kResourceType_DigitalGlitchFilter, } tResourceType; typedef enum diff --git a/wpilibc/Athena/include/NetworkCommunication/UsageReporting.h b/wpilibc/Athena/include/NetworkCommunication/UsageReporting.h deleted file mode 100644 index 864a589155..0000000000 --- a/wpilibc/Athena/include/NetworkCommunication/UsageReporting.h +++ /dev/null @@ -1,146 +0,0 @@ - -#ifndef __UsageReporting_h__ -#define __UsageReporting_h__ - -#ifdef SIMULATION -#include -#define EXPORT_FUNC __declspec(dllexport) __cdecl -#else -#include -#include -#define EXPORT_FUNC -#endif - -#define kUsageReporting_version 1 - -namespace nUsageReporting { -typedef enum { - kResourceType_Controller, - kResourceType_Module, - kResourceType_Language, - kResourceType_CANPlugin, - kResourceType_Accelerometer, - kResourceType_ADXL345, - kResourceType_AnalogChannel, - kResourceType_AnalogTrigger, - kResourceType_AnalogTriggerOutput, - kResourceType_CANJaguar, - kResourceType_Compressor, - kResourceType_Counter, - kResourceType_Dashboard, - kResourceType_DigitalInput, - kResourceType_DigitalOutput, - kResourceType_DriverStationCIO, - kResourceType_DriverStationEIO, - kResourceType_DriverStationLCD, - kResourceType_Encoder, - kResourceType_GearTooth, - kResourceType_Gyro, - kResourceType_I2C, - kResourceType_Framework, - kResourceType_Jaguar, - kResourceType_Joystick, - kResourceType_Kinect, - kResourceType_KinectStick, - kResourceType_PIDController, - kResourceType_Preferences, - kResourceType_PWM, - kResourceType_Relay, - kResourceType_RobotDrive, - kResourceType_SerialPort, - kResourceType_Servo, - kResourceType_Solenoid, - kResourceType_SPI, - kResourceType_Task, - kResourceType_Ultrasonic, - kResourceType_Victor, - kResourceType_Button, - kResourceType_Command, - kResourceType_AxisCamera, - kResourceType_PCVideoServer, - kResourceType_SmartDashboard, - kResourceType_Talon, - kResourceType_HiTechnicColorSensor, - kResourceType_HiTechnicAccel, - kResourceType_HiTechnicCompass, - kResourceType_SRF08, - kResourceType_AnalogOutput, - kResourceType_VictorSP, - kResourceType_TalonSRX, - kResourceType_CANTalonSRX, - kResourceType_DigitalGlitchFilter, -} tResourceType; - -typedef enum { - kLanguage_LabVIEW = 1, - kLanguage_CPlusPlus = 2, - kLanguage_Java = 3, - kLanguage_Python = 4, - - kCANPlugin_BlackJagBridge = 1, - kCANPlugin_2CAN = 2, - - kFramework_Iterative = 1, - kFramework_Simple = 2, - - kRobotDrive_ArcadeStandard = 1, - kRobotDrive_ArcadeButtonSpin = 2, - kRobotDrive_ArcadeRatioCurve = 3, - kRobotDrive_Tank = 4, - kRobotDrive_MecanumPolar = 5, - kRobotDrive_MecanumCartesian = 6, - - kDriverStationCIO_Analog = 1, - kDriverStationCIO_DigitalIn = 2, - kDriverStationCIO_DigitalOut = 3, - - kDriverStationEIO_Acceleration = 1, - kDriverStationEIO_AnalogIn = 2, - kDriverStationEIO_AnalogOut = 3, - kDriverStationEIO_Button = 4, - kDriverStationEIO_LED = 5, - kDriverStationEIO_DigitalIn = 6, - kDriverStationEIO_DigitalOut = 7, - kDriverStationEIO_FixedDigitalOut = 8, - kDriverStationEIO_PWM = 9, - kDriverStationEIO_Encoder = 10, - kDriverStationEIO_TouchSlider = 11, - - kADXL345_SPI = 1, - kADXL345_I2C = 2, - - kCommand_Scheduler = 1, - - kSmartDashboard_Instance = 1, -} tInstances; - -/** - * Report the usage of a resource of interest. - * - * @param resource one of the values in the tResourceType above (max value 51). - * @param instanceNumber an index that identifies the resource instance. - * @param context an optional additional context number for some cases (such as - * module number). Set to 0 to omit. - * @param feature a string to be included describing features in use on a - * specific resource. Setting the same resource more than once allows you to - * change the feature string. - */ -uint32_t EXPORT_FUNC report(tResourceType resource, uint8_t instanceNumber, - uint8_t context = 0, const char *feature = nullptr); -} - -#ifdef __cplusplus -extern "C" { -#endif - -uint32_t EXPORT_FUNC -FRC_NetworkCommunication_nUsageReporting_report(uint8_t resource, - uint8_t instanceNumber, - uint8_t context, - const char *feature); - -#ifdef __cplusplus -} -#endif - -#endif // __UsageReporting_h__ diff --git a/wpilibc/Athena/src/AnalogAccelerometer.cpp b/wpilibc/Athena/src/AnalogAccelerometer.cpp index 3880ba2477..5cf41d9133 100644 --- a/wpilibc/Athena/src/AnalogAccelerometer.cpp +++ b/wpilibc/Athena/src/AnalogAccelerometer.cpp @@ -6,7 +6,6 @@ /*----------------------------------------------------------------------------*/ #include "AnalogAccelerometer.h" -//#include "NetworkCommunication/UsageReporting.h" #include "WPIErrors.h" #include "LiveWindow/LiveWindow.h" diff --git a/wpilibc/Athena/src/AnalogGyro.cpp b/wpilibc/Athena/src/AnalogGyro.cpp index e1997a53b7..54093ec800 100644 --- a/wpilibc/Athena/src/AnalogGyro.cpp +++ b/wpilibc/Athena/src/AnalogGyro.cpp @@ -7,7 +7,6 @@ #include "AnalogGyro.h" #include "AnalogInput.h" -//#include "NetworkCommunication/UsageReporting.h" #include "Timer.h" #include "WPIErrors.h" #include "LiveWindow/LiveWindow.h" diff --git a/wpilibc/Athena/src/AnalogInput.cpp b/wpilibc/Athena/src/AnalogInput.cpp index 09ef75f6b7..dc8e872e59 100644 --- a/wpilibc/Athena/src/AnalogInput.cpp +++ b/wpilibc/Athena/src/AnalogInput.cpp @@ -5,7 +5,6 @@ /*----------------------------------------------------------------------------*/ #include "AnalogInput.h" -//#include "NetworkCommunication/UsageReporting.h" #include "Resource.h" #include "Timer.h" #include "WPIErrors.h" diff --git a/wpilibc/Athena/src/AnalogTrigger.cpp b/wpilibc/Athena/src/AnalogTrigger.cpp index cbe627bcf2..b49d6a0fd9 100644 --- a/wpilibc/Athena/src/AnalogTrigger.cpp +++ b/wpilibc/Athena/src/AnalogTrigger.cpp @@ -8,7 +8,6 @@ #include "AnalogTrigger.h" #include "AnalogInput.h" -//#include "NetworkCommunication/UsageReporting.h" #include "Resource.h" #include "WPIErrors.h" #include "HAL/Port.h" diff --git a/wpilibc/Athena/src/AnalogTriggerOutput.cpp b/wpilibc/Athena/src/AnalogTriggerOutput.cpp index 9d75fbb7ab..8254275f5b 100644 --- a/wpilibc/Athena/src/AnalogTriggerOutput.cpp +++ b/wpilibc/Athena/src/AnalogTriggerOutput.cpp @@ -7,7 +7,6 @@ #include "AnalogTriggerOutput.h" #include "AnalogTrigger.h" -//#include "NetworkCommunication/UsageReporting.h" #include "WPIErrors.h" /** diff --git a/wpilibc/Athena/src/CANJaguar.cpp b/wpilibc/Athena/src/CANJaguar.cpp index 27a8a6066f..fc71e84d65 100644 --- a/wpilibc/Athena/src/CANJaguar.cpp +++ b/wpilibc/Athena/src/CANJaguar.cpp @@ -8,7 +8,6 @@ #include "Timer.h" #define tNIRIO_i32 int #include "NetworkCommunication/CANSessionMux.h" -//#include "NetworkCommunication/UsageReporting.h" #include "WPIErrors.h" #include #include diff --git a/wpilibc/Athena/src/Counter.cpp b/wpilibc/Athena/src/Counter.cpp index 0a4e73a33b..cd70de54f4 100644 --- a/wpilibc/Athena/src/Counter.cpp +++ b/wpilibc/Athena/src/Counter.cpp @@ -8,7 +8,6 @@ #include "Counter.h" #include "AnalogTrigger.h" #include "DigitalInput.h" -//#include "NetworkCommunication/UsageReporting.h" #include "Resource.h" #include "WPIErrors.h" diff --git a/wpilibc/Athena/src/DigitalInput.cpp b/wpilibc/Athena/src/DigitalInput.cpp index 38c29b7a7d..f6b96f5144 100644 --- a/wpilibc/Athena/src/DigitalInput.cpp +++ b/wpilibc/Athena/src/DigitalInput.cpp @@ -6,7 +6,6 @@ /*----------------------------------------------------------------------------*/ #include "DigitalInput.h" -//#include "NetworkCommunication/UsageReporting.h" #include "Resource.h" #include "WPIErrors.h" #include "LiveWindow/LiveWindow.h" diff --git a/wpilibc/Athena/src/DigitalOutput.cpp b/wpilibc/Athena/src/DigitalOutput.cpp index bc361c8a86..d74f93b008 100644 --- a/wpilibc/Athena/src/DigitalOutput.cpp +++ b/wpilibc/Athena/src/DigitalOutput.cpp @@ -5,7 +5,6 @@ /*----------------------------------------------------------------------------*/ #include "DigitalOutput.h" -//#include "NetworkCommunication/UsageReporting.h" #include "Resource.h" #include "WPIErrors.h" diff --git a/wpilibc/Athena/src/DoubleSolenoid.cpp b/wpilibc/Athena/src/DoubleSolenoid.cpp index 4d088b7a43..6a669fb1d3 100644 --- a/wpilibc/Athena/src/DoubleSolenoid.cpp +++ b/wpilibc/Athena/src/DoubleSolenoid.cpp @@ -5,7 +5,6 @@ /*----------------------------------------------------------------------------*/ #include "DoubleSolenoid.h" -//#include "NetworkCommunication/UsageReporting.h" #include "WPIErrors.h" #include "LiveWindow/LiveWindow.h" diff --git a/wpilibc/Athena/src/DriverStation.cpp b/wpilibc/Athena/src/DriverStation.cpp index bdfd77b36d..455a9874e5 100644 --- a/wpilibc/Athena/src/DriverStation.cpp +++ b/wpilibc/Athena/src/DriverStation.cpp @@ -9,7 +9,6 @@ #include "AnalogInput.h" #include "Timer.h" #include "NetworkCommunication/FRCComm.h" -#include "NetworkCommunication/UsageReporting.h" #include "MotorSafetyHelper.h" #include "Utility.h" #include "WPIErrors.h" diff --git a/wpilibc/Athena/src/Encoder.cpp b/wpilibc/Athena/src/Encoder.cpp index 953bf1d97c..0fa12dfcff 100644 --- a/wpilibc/Athena/src/Encoder.cpp +++ b/wpilibc/Athena/src/Encoder.cpp @@ -7,7 +7,6 @@ #include "Encoder.h" #include "DigitalInput.h" -//#include "NetworkCommunication/UsageReporting.h" #include "Resource.h" #include "WPIErrors.h" #include "LiveWindow/LiveWindow.h" diff --git a/wpilibc/Athena/src/IterativeRobot.cpp b/wpilibc/Athena/src/IterativeRobot.cpp index 4027ae7000..fa1d2babe3 100644 --- a/wpilibc/Athena/src/IterativeRobot.cpp +++ b/wpilibc/Athena/src/IterativeRobot.cpp @@ -8,7 +8,6 @@ #include "IterativeRobot.h" #include "DriverStation.h" -//#include "NetworkCommunication/UsageReporting.h" #include "HAL/HAL.hpp" #include "SmartDashboard/SmartDashboard.h" #include "LiveWindow/LiveWindow.h" diff --git a/wpilibc/Athena/src/Jaguar.cpp b/wpilibc/Athena/src/Jaguar.cpp index 9b02302eb9..ce61d364b7 100644 --- a/wpilibc/Athena/src/Jaguar.cpp +++ b/wpilibc/Athena/src/Jaguar.cpp @@ -6,7 +6,6 @@ /*----------------------------------------------------------------------------*/ #include "Jaguar.h" -//#include "NetworkCommunication/UsageReporting.h" #include "LiveWindow/LiveWindow.h" /** diff --git a/wpilibc/Athena/src/Joystick.cpp b/wpilibc/Athena/src/Joystick.cpp index a7a299ced8..388832c96c 100644 --- a/wpilibc/Athena/src/Joystick.cpp +++ b/wpilibc/Athena/src/Joystick.cpp @@ -7,7 +7,6 @@ #include "Joystick.h" #include "DriverStation.h" -//#include "NetworkCommunication/UsageReporting.h" #include "WPIErrors.h" #include #include diff --git a/wpilibc/Athena/src/PWM.cpp b/wpilibc/Athena/src/PWM.cpp index 5a70932424..6b3b4b7ec0 100644 --- a/wpilibc/Athena/src/PWM.cpp +++ b/wpilibc/Athena/src/PWM.cpp @@ -7,7 +7,6 @@ #include "PWM.h" -//#include "NetworkCommunication/UsageReporting.h" #include "Resource.h" #include "Utility.h" #include "WPIErrors.h" diff --git a/wpilibc/Athena/src/Preferences.cpp b/wpilibc/Athena/src/Preferences.cpp index ed3f076bcb..95f6a4a593 100644 --- a/wpilibc/Athena/src/Preferences.cpp +++ b/wpilibc/Athena/src/Preferences.cpp @@ -6,7 +6,6 @@ #include "Preferences.h" -//#include "NetworkCommunication/UsageReporting.h" #include "WPIErrors.h" #include "HAL/HAL.hpp" diff --git a/wpilibc/Athena/src/Relay.cpp b/wpilibc/Athena/src/Relay.cpp index bc3b824b9c..17f0ef8179 100644 --- a/wpilibc/Athena/src/Relay.cpp +++ b/wpilibc/Athena/src/Relay.cpp @@ -9,7 +9,6 @@ #include "Relay.h" #include "MotorSafetyHelper.h" -//#include "NetworkCommunication/UsageReporting.h" #include "Resource.h" #include "WPIErrors.h" #include "LiveWindow/LiveWindow.h" diff --git a/wpilibc/Athena/src/RobotBase.cpp b/wpilibc/Athena/src/RobotBase.cpp index 77449e9dc2..2bd1d13acf 100644 --- a/wpilibc/Athena/src/RobotBase.cpp +++ b/wpilibc/Athena/src/RobotBase.cpp @@ -8,9 +8,6 @@ #include "RobotBase.h" #include "DriverStation.h" -//#include "NetworkCommunication/FRCComm.h" -//#include "NetworkCommunication/symModuleLink.h" -//#include "NetworkCommunication/UsageReporting.h" #include "RobotState.h" #include "HLUsageReporting.h" #include "Internal/HardwareHLReporting.h" diff --git a/wpilibc/Athena/src/RobotDrive.cpp b/wpilibc/Athena/src/RobotDrive.cpp index ef72f3420e..c1353e9263 100644 --- a/wpilibc/Athena/src/RobotDrive.cpp +++ b/wpilibc/Athena/src/RobotDrive.cpp @@ -11,7 +11,6 @@ #include "GenericHID.h" #include "Joystick.h" #include "Talon.h" -//#include "NetworkCommunication/UsageReporting.h" #include "Utility.h" #include "WPIErrors.h" #include diff --git a/wpilibc/Athena/src/SampleRobot.cpp b/wpilibc/Athena/src/SampleRobot.cpp index c13d4312ae..37b134f602 100644 --- a/wpilibc/Athena/src/SampleRobot.cpp +++ b/wpilibc/Athena/src/SampleRobot.cpp @@ -8,7 +8,6 @@ #include "SampleRobot.h" #include "DriverStation.h" -//#include "NetworkCommunication/UsageReporting.h" #include "Timer.h" #include "SmartDashboard/SmartDashboard.h" #include "LiveWindow/LiveWindow.h" diff --git a/wpilibc/Athena/src/SerialPort.cpp b/wpilibc/Athena/src/SerialPort.cpp index 9edc21d96c..c4e259a8a5 100644 --- a/wpilibc/Athena/src/SerialPort.cpp +++ b/wpilibc/Athena/src/SerialPort.cpp @@ -7,7 +7,6 @@ #include "SerialPort.h" -//#include "NetworkCommunication/UsageReporting.h" #include "HAL/HAL.hpp" #include diff --git a/wpilibc/Athena/src/Servo.cpp b/wpilibc/Athena/src/Servo.cpp index 72a35260ea..4300cc46ad 100644 --- a/wpilibc/Athena/src/Servo.cpp +++ b/wpilibc/Athena/src/Servo.cpp @@ -7,7 +7,6 @@ #include "Servo.h" -//#include "NetworkCommunication/UsageReporting.h" #include "LiveWindow/LiveWindow.h" constexpr float Servo::kMaxServoAngle; diff --git a/wpilibc/Athena/src/Solenoid.cpp b/wpilibc/Athena/src/Solenoid.cpp index d64ffbf10e..9d106b2356 100644 --- a/wpilibc/Athena/src/Solenoid.cpp +++ b/wpilibc/Athena/src/Solenoid.cpp @@ -6,7 +6,6 @@ /*----------------------------------------------------------------------------*/ #include "Solenoid.h" -//#include "NetworkCommunication/UsageReporting.h" #include "WPIErrors.h" #include "LiveWindow/LiveWindow.h" diff --git a/wpilibc/Athena/src/Talon.cpp b/wpilibc/Athena/src/Talon.cpp index 1270af839b..dc1cf3bc7f 100644 --- a/wpilibc/Athena/src/Talon.cpp +++ b/wpilibc/Athena/src/Talon.cpp @@ -7,7 +7,6 @@ #include "Talon.h" -//#include "NetworkCommunication/UsageReporting.h" #include "LiveWindow/LiveWindow.h" /** diff --git a/wpilibc/Athena/src/TalonSRX.cpp b/wpilibc/Athena/src/TalonSRX.cpp index 6e6115f872..07438c40c3 100644 --- a/wpilibc/Athena/src/TalonSRX.cpp +++ b/wpilibc/Athena/src/TalonSRX.cpp @@ -7,7 +7,6 @@ #include "TalonSRX.h" -//#include "NetworkCommunication/UsageReporting.h" #include "LiveWindow/LiveWindow.h" /** diff --git a/wpilibc/Athena/src/Task.cpp b/wpilibc/Athena/src/Task.cpp index 44f7cc9630..9157dca56b 100644 --- a/wpilibc/Athena/src/Task.cpp +++ b/wpilibc/Athena/src/Task.cpp @@ -7,7 +7,6 @@ #include "Task.h" -//#include "NetworkCommunication/UsageReporting.h" #include "WPIErrors.h" #include #include diff --git a/wpilibc/Athena/src/Ultrasonic.cpp b/wpilibc/Athena/src/Ultrasonic.cpp index 07d3b479eb..ba25a04070 100644 --- a/wpilibc/Athena/src/Ultrasonic.cpp +++ b/wpilibc/Athena/src/Ultrasonic.cpp @@ -10,7 +10,6 @@ #include "Counter.h" #include "DigitalInput.h" #include "DigitalOutput.h" -//#include "NetworkCommunication/UsageReporting.h" #include "Timer.h" #include "Utility.h" #include "WPIErrors.h" diff --git a/wpilibc/Athena/src/Victor.cpp b/wpilibc/Athena/src/Victor.cpp index 30202db528..f8a4970522 100644 --- a/wpilibc/Athena/src/Victor.cpp +++ b/wpilibc/Athena/src/Victor.cpp @@ -7,7 +7,6 @@ #include "Victor.h" -//#include "NetworkCommunication/UsageReporting.h" #include "LiveWindow/LiveWindow.h" /** diff --git a/wpilibc/Athena/src/VictorSP.cpp b/wpilibc/Athena/src/VictorSP.cpp index 5341ccfb93..ccbc163741 100644 --- a/wpilibc/Athena/src/VictorSP.cpp +++ b/wpilibc/Athena/src/VictorSP.cpp @@ -7,7 +7,6 @@ #include "VictorSP.h" -//#include "NetworkCommunication/UsageReporting.h" #include "LiveWindow/LiveWindow.h" /** diff --git a/wpilibj/src/athena/java/edu/wpi/first/wpilibj/communication/FRCNetworkCommunicationsLibrary.java b/wpilibj/src/athena/java/edu/wpi/first/wpilibj/communication/FRCNetworkCommunicationsLibrary.java index 7ed601dcc4..0ab6a3f41c 100644 --- a/wpilibj/src/athena/java/edu/wpi/first/wpilibj/communication/FRCNetworkCommunicationsLibrary.java +++ b/wpilibj/src/athena/java/edu/wpi/first/wpilibj/communication/FRCNetworkCommunicationsLibrary.java @@ -398,7 +398,12 @@ public class FRCNetworkCommunicationsLibrary extends JNIWrapper { * native declaration : * src\main\include\NetworkCommunication\UsageReporting.h:66 */ - public static final int kResourceType_DigitalGlitchFilter = 56; + public static final int kResourceType_MindsensorsSD540 = 56; + /** + * native declaration : + * src\main\include\NetworkCommunication\UsageReporting.h:67 + */ + public static final int kResourceType_DigitalGlitchFilter = 57; }; /** * native declaration :