mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-23 01:21:42 +00:00
Fix usage reporting for new motor controllers and Analog output
Change-Id: I574e431ae551ecf8efc90c004abf14568f22c068
This commit is contained in:
@@ -60,7 +60,7 @@ public class AnalogOutput extends SensorBase implements LiveWindowSendable {
|
||||
HALUtil.checkStatus(status.asIntBuffer());
|
||||
|
||||
LiveWindow.addSensor("AnalogOutput", channel, this);
|
||||
UsageReporting.report(tResourceType.kResourceType_AnalogChannel, channel, 1);
|
||||
UsageReporting.report(tResourceType.kResourceType_AnalogOutput, channel);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -10,6 +10,8 @@ package edu.wpi.first.wpilibj;
|
||||
|
||||
import edu.wpi.first.wpilibj.hal.CanTalonSRX;
|
||||
import edu.wpi.first.wpilibj.hal.CanTalonJNI;
|
||||
import edu.wpi.first.wpilibj.communication.UsageReporting;
|
||||
import edu.wpi.first.wpilibj.communication.FRCNetworkCommunicationsLibrary.tResourceType;
|
||||
import edu.wpi.first.wpilibj.hal.SWIGTYPE_p_double;
|
||||
import edu.wpi.first.wpilibj.hal.SWIGTYPE_p_int;
|
||||
import edu.wpi.first.wpilibj.hal.SWIGTYPE_p_uint32_t;
|
||||
@@ -456,6 +458,8 @@ public class CANTalon implements MotorSafety, PIDOutput, SpeedController {
|
||||
m_controlEnabled = false;
|
||||
// Disable until set() is called.
|
||||
m_impl.SetModeSelect(ControlMode.Disabled.value);
|
||||
|
||||
UsageReporting.report(tResourceType.kResourceType_CANTalonSRX, m_deviceNumber + 1, controlMode.value);
|
||||
}
|
||||
public void changeControlMode(ControlMode controlMode) {
|
||||
if(m_controlMode == controlMode){
|
||||
|
||||
@@ -38,7 +38,7 @@ public class TalonSRX extends SafePWM implements SpeedController {
|
||||
setZeroLatch();
|
||||
|
||||
LiveWindow.addActuator("TalonSRX", getChannel(), this);
|
||||
UsageReporting.report(tResourceType.kResourceType_Talon, getChannel());
|
||||
UsageReporting.report(tResourceType.kResourceType_TalonSRX, getChannel());
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -37,7 +37,7 @@ public class VictorSP extends SafePWM implements SpeedController {
|
||||
setZeroLatch();
|
||||
|
||||
LiveWindow.addActuator("VictorSP", getChannel(), this);
|
||||
UsageReporting.report(tResourceType.kResourceType_Talon, getChannel());
|
||||
UsageReporting.report(tResourceType.kResourceType_VictorSP, getChannel());
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -157,6 +157,14 @@ public class FRCNetworkCommunicationsLibrary extends JNIWrapper {
|
||||
public static final int kResourceType_HiTechnicCompass = 47;
|
||||
/** <i>native declaration : src\main\include\NetworkCommunication\UsageReporting.h:58</i> */
|
||||
public static final int kResourceType_SRF08 = 48;
|
||||
/** <i>native declaration : src\main\include\NetworkCommunication\UsageReporting.h:59</i> */
|
||||
public static final int kResourceType_AnalogOutput = 49;
|
||||
/** <i>native declaration : src\main\include\NetworkCommunication\UsageReporting.h:60</i> */
|
||||
public static final int kResourceType_VictorSP = 50;
|
||||
/** <i>native declaration : src\main\include\NetworkCommunication\UsageReporting.h:61</i> */
|
||||
public static final int kResourceType_TalonSRX = 51;
|
||||
/** <i>native declaration : src\main\include\NetworkCommunication\UsageReporting.h:62</i> */
|
||||
public static final int kResourceType_CANTalonSRX = 52;
|
||||
};
|
||||
/**
|
||||
* <i>native declaration : src\main\include\NetworkCommunication\UsageReporting.h</i><br>
|
||||
|
||||
Reference in New Issue
Block a user