Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛[BUG] - Addressible LEDs are broken. #631

Open
Tropix126 opened this issue Feb 14, 2024 · 0 comments
Open

🐛[BUG] - Addressible LEDs are broken. #631

Tropix126 opened this issue Feb 14, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@Tropix126
Copy link

Tropix126 commented Feb 14, 2024

Describe the bug
The ADILed device setters appear to be broken in a few ways.

  • ext_adi_led_set_pixel returns the wrong port mutex on L493. It essentially tries to zero-index a port that was already converted to zero-index, since get_ports already transforms the smart port outvalue. As a result, it tries to release a mutex on the port below what the LEDs are actually plugged into. In many cases this can permanently deadlock the user program (from past testing).
  • All other setters have a strange bug where it takes calling them twice, with a delay between calls to properly update the hardware state. The minimum delays between two setter calls seems to be around 70mS.

To Reproduce
This does not work

void initialize() {
  led.set_all(0xFFFFFF);
}

This does not work either

void initialize() {
  led.set_all(0xFFFFFF);
  led.set_all(0xFFFFFF);
}

This does

void initialize() {
  led.set_all(0xFFFFFF);
  pros::delay(70);
  led.set_all(0xFFFFFF);
}

This is likely an SDK bug. Sylib gets around this by updating LEDs in a daemon loop rather than just setting once.

Expected behavior
LEDs should update the first time the setter is called.

Screenshots
N/A

Desktop (please complete the following information):

  • OS: Windows
  • Version 11

Additional context
None

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant