Just wondering if anyone else has hit this. I’m guessing this is a WPI bug in the new AddressableLED() routines.
This is what I get and the code:
- Unhandled exception: edu.wpi.first.hal.util.UncleanStatusException: Code: -1004. HAL: No available resources to allocate
- Error at frc.robot.subsystems.DisplayLEDs.(DisplayLEDs.java:29): Unhandled exception: edu.wpi.first.hal.util.UncleanStatusException: Code: -1004. HAL: No available resources to allocate
- at edu.wpi.first.hal.AddressableLEDJNI.initialize(Native Method)
public class DisplayLEDs extends SubsystemBase {
private AddressableLED m_led01;
private AddressableLED m_led02;
private AddressableLEDBuffer m_Buffer01;
private AddressableLEDBuffer m_Buffer02;
// ** Initialize the Sensors.
public DisplayLEDs() {
// *** PWM port 0
m_led01 = new AddressableLED(0);
// *** PWM port 1
m_led02 = new AddressableLED(1); [this is line 29 from above]
m_Buffer01 = new AddressableLEDBuffer(60);
m_led01.setLength(m_Buffer01.getLength());
}
I’m not using PWM ports anywhere else. I can move the LED to the other channels but as soon as I try to declare another instance of AddressableLED I get the error.
I would think I could declare 10 of these (0-9) but I’m guessing the routine only let’s you declare one.
Frustrating since the first one works really well. I would just like to do some more things on our robot so I’ll have to try another alternative.
Thanks,
Petrie