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

Support SK9822 type LEDs with adaptive brightness control via SPI #1017

Merged
merged 2 commits into from
Sep 25, 2020

Conversation

The-Master777
Copy link
Contributor

Summary

Support for SK9822 type LEDs is added with global brightness control feature.

SK9822 type LEDs allow for 5-Bit (32 level) brightness adjustment using simultaneous regulation of R/G/B LED current. This allows for fine granular control of output light levels while maintaining full 8-Bit grayscale resolution. Even though the LED type is generally compatible with APA 102 style LEDs, the constant current regulation function shows compatibility issues with the existing implementation of the APA 102 control protocol.

This PR introduces support for SK9822 devices via SPI. Maximum current (brightness) level is user controllable on the 32 value scale. Also, low luminosity (near black) colors below a user defined threshold are converted such that optimal grayscale resolution is archived on a per LED basis over full brightness range, especially on the low end.

What kind of change does this PR introduce? (check at least one)

  • Bugfix
  • Feature
  • Code style update
  • Refactor
  • Docs
  • Build-related changes
  • Other, please describe:

If changing the UI of web configuration, please provide the before/after screenshot:

Does this PR introduce a breaking change? (check one)

  • Yes
  • No

If yes, please describe the impact and migration path for existing setups:

The PR fulfills these requirements:

  • When resolving a specific issue, it's referenced in the PR's body (e.g. Fixes: #xxx[,#xxx], where "xxx" is the issue number)

If adding a new feature, the PR's description includes:

  • A convincing reason for adding this feature: Support Current regulated global brightness control on SK9822 leds; not supported with existing the APA 102 device.
  • Related documents have been updated (docs/docs/en)
  • Related tests have been updated

PLEASE DON'T FORGET TO ADD YOUR CHANGES TO CHANGELOG.MD

  • Yes, CHANGELOG.md is also updated

To avoid wasting your time, it's best to open a feature request issue first and wait for approval before working on it.

Other information:

LED Type: SK9822 by DONGGUAN OPSCO OPTOELECTRONICS CO., LTD
Device: SPI
Specsheet: https://www.exp-tech.de/media/pdf/SK9822-EC20-REV-05-EN.pdf

@hyperion-project
Copy link

Hello @The-Master777 👋

I'm your friendly neighborhood bot and would like to say thank you for
submitting a pull request to Hyperion!

So that you and other users can test your changes more quickly,
you can find your workflow artifacts here.

If you make changes to your PR, i create a new link to your workflow artifacts.

Best regards,
Hyperion-Project

@Lord-Grey
Copy link
Collaborator

Hi @The-Master777
thank you very much for your contribution!

Only minor comments reviewing the code/files provided.

assets/webconfig/i18n/de.json Show resolved Hide resolved
libsrc/leddevice/dev_spi/LedDeviceSK9822.cpp Outdated Show resolved Hide resolved
libsrc/leddevice/dev_spi/LedDeviceSK9822.h Show resolved Hide resolved
@hyperion-project
Copy link

Here is your new link to your workflow artifacts.

@Lord-Grey
Copy link
Collaborator

@ The-Master777 Thank you for turning this round quickly. Looks good.

@Paulchen-Panther
Copy link
Member

@The-Master777 Ready to merge?

@The-Master777
Copy link
Contributor Author

@The-Master777 Ready to merge?

Yap, can be merged 👍

@Paulchen-Panther Paulchen-Panther merged commit 6c68454 into hyperion-project:master Sep 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants