mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-22 01:11:42 +00:00
Add usage reporting for AddressableLED (#2108)
This commit is contained in:
committed by
Peter Johnson
parent
4ebae17123
commit
5f85457a97
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user