diff --git a/wpilibc/src/main/native/cpp/AddressableLED.cpp b/wpilibc/src/main/native/cpp/AddressableLED.cpp index 36cf7a46ec..0209484672 100644 --- a/wpilibc/src/main/native/cpp/AddressableLED.cpp +++ b/wpilibc/src/main/native/cpp/AddressableLED.cpp @@ -8,6 +8,7 @@ #include "frc/AddressableLED.h" #include +#include #include #include #include @@ -30,6 +31,8 @@ AddressableLED::AddressableLED(int port) { if (m_handle == HAL_kInvalidHandle) { HAL_FreePWMPort(m_pwmHandle, &status); } + + HAL_Report(HALUsageReporting::kResourceType_AddressableLEDs, port + 1); } AddressableLED::~AddressableLED() { diff --git a/wpilibj/src/main/java/edu/wpi/first/wpilibj/AddressableLED.java b/wpilibj/src/main/java/edu/wpi/first/wpilibj/AddressableLED.java index cfe8a3f642..223c6f20a7 100644 --- a/wpilibj/src/main/java/edu/wpi/first/wpilibj/AddressableLED.java +++ b/wpilibj/src/main/java/edu/wpi/first/wpilibj/AddressableLED.java @@ -8,6 +8,7 @@ package edu.wpi.first.wpilibj; import edu.wpi.first.hal.AddressableLEDJNI; +import edu.wpi.first.hal.FRCNetComm.tResourceType; import edu.wpi.first.hal.HAL; import edu.wpi.first.hal.PWMJNI; @@ -26,6 +27,7 @@ public class AddressableLED implements AutoCloseable { public AddressableLED(int port) { m_pwmHandle = PWMJNI.initializePWMPort(HAL.getPort((byte) port)); m_handle = AddressableLEDJNI.initialize(m_pwmHandle); + HAL.report(tResourceType.kResourceType_AddressableLEDs, port + 1); } @Override