-
Notifications
You must be signed in to change notification settings - Fork 14
Closed
Labels
blockedother issues need to be resolved before this can be worked onother issues need to be resolved before this can be worked on
Description
Referring to purduesigbots/pros#631
Describe the bug
The ADILed device setters appear to be broken in a few ways.
ext_adi_led_set_pixelreturns the wrong port mutex on L493. It essentially tries to zero-index a port that was already converted to zero-index, sinceget_portsalready 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
Prerequisites
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
blockedother issues need to be resolved before this can be worked onother issues need to be resolved before this can be worked on