mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-28 02:11:43 +00:00
Report usage for ADXL362 and ADRXS450.
Change-Id: I31c6b76923923606ea2838f346b24375b97b01ef
This commit is contained in:
@@ -92,9 +92,12 @@ namespace HALUsageReporting
|
||||
kResourceType_HiTechnicCompass,
|
||||
kResourceType_SRF08,
|
||||
kResourceType_AnalogOutput,
|
||||
kResourceType_VictorSP,
|
||||
kResourceType_TalonSRX,
|
||||
kResourceType_CANTalonSRX,
|
||||
kResourceType_VictorSP,
|
||||
kResourceType_TalonSRX,
|
||||
kResourceType_CANTalonSRX,
|
||||
kResourceType_ADXL362,
|
||||
kResourceType_ADXRS450,
|
||||
kResourceType_RevSPARK,
|
||||
kResourceType_DigitalGlitchFilter,
|
||||
};
|
||||
|
||||
@@ -110,6 +113,7 @@ namespace HALUsageReporting
|
||||
|
||||
kFramework_Iterative = 1,
|
||||
kFramework_Sample = 2,
|
||||
kFramework_CommandControl = 3,
|
||||
|
||||
kRobotDrive_ArcadeStandard = 1,
|
||||
kRobotDrive_ArcadeButtonSpin = 2,
|
||||
|
||||
@@ -68,7 +68,7 @@ ADXL362::ADXL362(SPI::Port port, Range range) : m_spi(port) {
|
||||
commands[2] = kPowerCtl_Measure | kPowerCtl_UltraLowNoise;
|
||||
m_spi.Write(commands, 3);
|
||||
|
||||
//HALReport(HALUsageReporting::kResourceType_ADXL362, 0);
|
||||
HALReport(HALUsageReporting::kResourceType_ADXL362, port);
|
||||
|
||||
LiveWindow::GetInstance()->AddSensor("ADXL362", port, this);
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@ ADXRS450_Gyro::ADXRS450_Gyro(SPI::Port port) : m_spi(port) {
|
||||
|
||||
Calibrate();
|
||||
|
||||
//HALReport(HALUsageReporting::kResourceType_ADXRS450, port);
|
||||
HALReport(HALUsageReporting::kResourceType_ADXRS450, port);
|
||||
LiveWindow::GetInstance()->AddSensor("ADXRS450_Gyro", port, this);
|
||||
}
|
||||
|
||||
|
||||
@@ -108,7 +108,7 @@ public class ADXL362 extends SensorBase implements Accelerometer, LiveWindowSend
|
||||
transferBuffer.put(2, (byte) (kPowerCtl_Measure | kPowerCtl_UltraLowNoise));
|
||||
m_spi.write(transferBuffer, 3);
|
||||
|
||||
//UsageReporting.report(tResourceType.kResourceType_ADXL362, 0);
|
||||
UsageReporting.report(tResourceType.kResourceType_ADXL362, port.getValue());
|
||||
LiveWindow.addSensor("ADXL362", port.getValue(), this);
|
||||
}
|
||||
|
||||
|
||||
@@ -78,7 +78,7 @@ public class ADXRS450_Gyro extends GyroBase implements Gyro, PIDSource, LiveWind
|
||||
|
||||
calibrate();
|
||||
|
||||
//UsageReporting.report(tResourceType.kResourceType_ADXRS450, port.getValue());
|
||||
UsageReporting.report(tResourceType.kResourceType_ADXRS450, port.getValue());
|
||||
LiveWindow.addSensor("ADXRS450_Gyro", port.getValue(), this);
|
||||
}
|
||||
|
||||
|
||||
@@ -383,7 +383,22 @@ public class FRCNetworkCommunicationsLibrary extends JNIWrapper {
|
||||
* <i>native declaration :
|
||||
* src\main\include\NetworkCommunication\UsageReporting.h:63</i>
|
||||
*/
|
||||
public static final int kResourceType_DigitalGlitchFilter = 53;
|
||||
public static final int kResourceType_ADXL362 = 53;
|
||||
/**
|
||||
* <i>native declaration :
|
||||
* src\main\include\NetworkCommunication\UsageReporting.h:64</i>
|
||||
*/
|
||||
public static final int kResourceType_ADXRS450 = 54;
|
||||
/**
|
||||
* <i>native declaration :
|
||||
* src\main\include\NetworkCommunication\UsageReporting.h:65</i>
|
||||
*/
|
||||
public static final int kResourceType_RevSPARK = 55;
|
||||
/**
|
||||
* <i>native declaration :
|
||||
* src\main\include\NetworkCommunication\UsageReporting.h:66</i>
|
||||
*/
|
||||
public static final int kResourceType_DigitalGlitchFilter = 56;
|
||||
};
|
||||
/**
|
||||
* <i>native declaration :
|
||||
@@ -431,6 +446,11 @@ public class FRCNetworkCommunicationsLibrary extends JNIWrapper {
|
||||
* src\main\include\NetworkCommunication\UsageReporting.h:72</i>
|
||||
*/
|
||||
public static final int kFramework_Sample = 2;
|
||||
/**
|
||||
* <i>native declaration :
|
||||
* src\main\include\NetworkCommunication\UsageReporting.h:73</i>
|
||||
*/
|
||||
public static final int kFramework_CommandControl = 3;
|
||||
/**
|
||||
* <i>native declaration :
|
||||
* src\main\include\NetworkCommunication\UsageReporting.h:74</i>
|
||||
|
||||
Reference in New Issue
Block a user