ohmtech-rdi / eurorack-blocks

Software to Hardware Prototyping for Eurorack using C++, Max/Gen~ or Faust
Other
303 stars 21 forks source link

Fix led 16b value range to avoid hole between 4036 and 4094 #483

Closed ohmtech-rdi closed 1 year ago

ohmtech-rdi commented 1 year ago

This PR fixes what seems to be a "bug" on the PCA9685 12-bit led driver, where there is a "hole" beetwen the values from 4036 to 4094 (inclusive).

We had a previous fix for that (#473 ) but the bug was still there for pins from LED8 to LED15.

We fix that by scaling from 0 to 4035 (inclusive) instead of 0 to 4095. 4095 is anyway not full off in our case, so lacking the dynamic range from this "hole" doesn't seem to have a really important visual effect.

ohmtech-rdi commented 1 year ago

Tested on kivu12_dev board.

ohmtech-rdi commented 1 year ago