Add usage reporting for AddressableLED (#2108)

This commit is contained in:
Austin Shalit
2019-11-20 23:13:39 -05:00
committed by Peter Johnson
parent 4ebae17123
commit 5f85457a97
2 changed files with 5 additions and 0 deletions

View File

@@ -8,6 +8,7 @@
#include "frc/AddressableLED.h"
#include <hal/AddressableLED.h>
#include <hal/FRCUsageReporting.h>
#include <hal/HALBase.h>
#include <hal/PWM.h>
#include <hal/Ports.h>
@@ -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() {