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

[T-Embed-CC1101] Encoder RGB LED Support #563

Closed
wants to merge 10 commits into from
Closed

Conversation

rouing
Copy link
Contributor

@rouing rouing commented Dec 16, 2024

Related: #562

This is a draft request, do not merge yet.

I am using this to checkpoint milestones.

@rouing rouing marked this pull request as draft December 16, 2024 05:49
@rouing
Copy link
Contributor Author

rouing commented Dec 17, 2024

Im opening this up for merge since it provides original functionality. This is not a complete feature and will still be tracked in #562 with further pull requests.

@rouing rouing marked this pull request as ready for review December 17, 2024 00:49
@rouing
Copy link
Contributor Author

rouing commented Dec 17, 2024

This does function as intended on the T-Embed-CC1101
The Menu Option can be found in Others > LED Control (Color), LED Brightness (Brightness)

It does not save state. You must set it on powerup.

#define LED_TYPE LED_STRIP_SK6812
// #define LED_STRIP_APA106
// #define LED_STRIP_SM16703
#ifdef T_EMBED_1101
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't it be better to use the LED_TYPE as condition instead of T-EMBED? ( I'm trying to remove as much Device related MACROS from the ./src/ files and make it as generic as possible)

Otherwise we would need to add more devices in here when we could be declaring this MACRO on platformio.ini..

I would suggest to use like:

#if LED_TYPE==WS2812B
   #define LED_ORDER GRB
   #define LED_TYPE_IS_RGBW 0
   #define LED_COUNT 8
#elif LED_TYPE==SK6812
   #define LED_ORDER RGB
   #define LED_TYPE_IS_RGBW 1
   #define LED_COUNT 1
#endif

and in cardputer/platformio.ini add -DLED_TYPE=SK6812 after -DHAS_RGB_LED=1
and in t-embed/platformio.ini add -DLED_TYPE=WS2812B

if other LED models compatible with FastLED come, we can just make the proper setup in the platformio

@rouing
Copy link
Contributor Author

rouing commented Dec 20, 2024

Pending #571 merge to fix up the flags

@rouing
Copy link
Contributor Author

rouing commented Dec 28, 2024

Resuming work on this.

@rouing rouing closed this Dec 29, 2024
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.

2 participants