mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
Add PDP usage reporting (#1167)
This commit is contained in:
committed by
Peter Johnson
parent
122fdf48b2
commit
3eae079db4
@@ -32,6 +32,8 @@ PowerDistributionPanel::PowerDistributionPanel(int module) {
|
||||
HAL_GetErrorMessage(status));
|
||||
return;
|
||||
}
|
||||
|
||||
HAL_Report(HALUsageReporting::kResourceType_PDP, module);
|
||||
SetName("PowerDistributionPanel", module);
|
||||
}
|
||||
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
|
||||
package edu.wpi.first.wpilibj;
|
||||
|
||||
import edu.wpi.first.wpilibj.hal.FRCNetComm.tResourceType;
|
||||
import edu.wpi.first.wpilibj.hal.HAL;
|
||||
import edu.wpi.first.wpilibj.hal.PDPJNI;
|
||||
import edu.wpi.first.wpilibj.smartdashboard.SendableBuilder;
|
||||
|
||||
@@ -25,6 +27,8 @@ public class PowerDistributionPanel extends SendableBase {
|
||||
public PowerDistributionPanel(int module) {
|
||||
SensorUtil.checkPDPModule(module);
|
||||
m_handle = PDPJNI.initializePDP(module);
|
||||
|
||||
HAL.report(tResourceType.kResourceType_PDP, module);
|
||||
setName("PowerDistributionPanel", module);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user