pros-rs icon indicating copy to clipboard operation
pros-rs copied to clipboard

Addressable LED Support

Open Tropix126 opened this issue 11 months ago • 0 comments

Supersedes #59

What's the motivation for this feature?

PROS currently "supports" (more on this later) smart addressable LED control over ADI output. Unfortunately, this API is currently bugged in multiple ways (see: https://github.com/purduesigbots/pros/issues/631).

  • There's an off-by-one error in their mutex release which can deadlock programs in some cases.
  • The SDK has a """feature""" (trust me bro it's definetly not a bug) where inputs to vexDeviceAdiAddrLedSet will be thrown out if not sent in 10ms cycles for a given internal smart port. See https://sylvie.fyi/sylib/docs/d3/da5/md_module_writeups__background__services.html

Describe the solution you'd like

Implement non-broken addressible LED support. This will require:

  • https://github.com/purduesigbots/pros/pull/633 to be merged.
  • Some sort of daemon task if PROS decides they don't want to implement this on a kernel level.

Describe the drawbacks, if any

The daemon task implementation will not be pretty if we go that route.

Describe the alternative solutions, if any

Have LED setters block for 12ms to ensure they properly update for now, then fix it later on.

Additional context

None

Tropix126 avatar Mar 02 '24 02:03 Tropix126