Skip to content

feat: RGB leds supports - #3909

Merged
pfeerick merged 5 commits into
mainfrom
rgb-led-ws2812
Oct 14, 2023
Merged

pfeerick merged 5 commits into
mainfrom
rgb-led-ws2812

Conversation

@raphaelcoeffic

@raphaelcoeffic raphaelcoeffic commented Aug 6, 2023 •

Copy link
Copy Markdown
Member

Summary of Changes:

  • Adds support for WS2812 LEDs (taranis targets only for now)
  • New custom function allowing to select a LUA script that controls a LED strip (see Add basic RGB leds script support edgetx-sdcard#115)
  • stm32_pulse_driver modified to initialise DMA only once during init
  • Improved pulse driver support for complementary channels

3djc added a commit to EdgeTX/edgetx-sdcard that referenced this pull request Aug 6, 2023
@Eldenroot

Copy link
Copy Markdown
Contributor

CZ:

#define TR_SF_MOD_BIND "Modul Bind"
#define TR_SF_RGBLEDS "RGB led"

@raphaelcoeffic

Copy link
Copy Markdown
Member Author

@mha1 may I ask you to check if the changes in the timer / pulses drivers still work for all modules / protocols?

@mha1

mha1 commented Aug 8, 2023

Copy link
Copy Markdown
Contributor

@raphaelcoeffic good one. batting my pitch to a home run.

I'll do some spot checks on what I think I can do . §xternal/internal MPM, external ELRS, PWM out, softserial in. That's about it I think .

@mha1

mha1 commented Aug 8, 2023

Copy link
Copy Markdown
Contributor

Including quick functional tests:
external ELRS control, telemetry, ELRS LUA script-> ok
internal MPM control, telemetry, HOTT LUA script -> ok
external MPM control, telemetry, HOTT LUA script -> ok
module bay softserial-in on SPort pin -> ok

Just looking at signals, no functional test:
DSM2 out (all 3 sub protocols) at CPPM pin -> looks ok
XJT D16 out at CPPM pin -> idle low bitstream available at 11Hz, -> should be ok
PPM out at CPPM pin -> single pulse at 22Hz with correct idle level but no channel data -> not ok

Hope that helps

@raphaelcoeffic

Copy link
Copy Markdown
Member Author

@mha1 should be fixed now.

@3djc

3djc commented Aug 10, 2023 •

Copy link
Copy Markdown
Collaborator

Tested on X7

  • Flash internal XJT : ok
  • Flash receiver through SPORT : ok after fix: PCBREV detect not working #3922
  • Use XJT : ok, both control and telemetry
  • Flash external MPM (STM32): ok
  • Multi telemetry: ok

@mha1

mha1 commented Aug 10, 2023

Copy link
Copy Markdown
Contributor

Just looked at PPM for now. Channels are back but frame rate is fixed at 14ms regardless of the set PPM frame length.

This was done with PPM frame length set to 40ms
image

@raphaelcoeffic

raphaelcoeffic commented Aug 10, 2023 •

Copy link
Copy Markdown
Member Author

Channels are back but frame rate is fixed at 14ms regardless of the set PPM frame length.

Do you happen to have another module turned ON? (internal?)

Screenshot 2023-08-10 at 15 08 02

@raphaelcoeffic

Copy link
Copy Markdown
Member Author

For example, with a internal XJT module on QX7:

Screenshot 2023-08-10 at 15 13 54

The internal module sends every 9ms, but as the PPM pulse is not finished, every other slot is skipped, so that you get 2x9ms = 18ms.

@raphaelcoeffic
raphaelcoeffic marked this pull request as ready for review August 10, 2023 13:17
@mha1

mha1 commented Aug 10, 2023

Copy link
Copy Markdown
Contributor

It looks a lot like MPM's 7ms. And indeed it was on. I was fooled because there is no more GUI indication (yellow) if there is a module set. But at least consistent. No indication for internal and external modules. Set internal module to off, all good now.

@mha1

mha1 commented Aug 10, 2023

Copy link
Copy Markdown
Contributor

Was the highlighting Internal RF and External RF is set to other than off scraped on purpose?

@raphaelcoeffic

Copy link
Copy Markdown
Member Author

Was the highlighting Internal RF and External RF is set to other than off scraped on purpose?

Probably a question for @JimB40 and @philmoz

@JimB40

JimB40 commented Aug 10, 2023 •

Copy link
Copy Markdown
Collaborator

If on purpose you would see PR with rather long discussion. Most of UI behaviour that differs from 2.8 is due to some 'fixes'.

@mha1

mha1 commented Aug 11, 2023

Copy link
Copy Markdown
Contributor

@raphaelcoeffic alll the serial out on CPPM/SPort and (soft and hardware) serial in on SPort seems to work too

@pfeerick

pfeerick commented Sep 3, 2023

Copy link
Copy Markdown
Member

Of concern: anything that uses soft serial, i.e. pulse drivers

@richardclli

Copy link
Copy Markdown
Member

Hey, I need this one and see if it works in my PL18 branch.

@pfeerick

pfeerick commented Oct 9, 2023

Copy link
Copy Markdown
Member

Neither X9D+2019 nor Boxer are booting with the GitHub builds for this PR.

@raphaelcoeffic raphaelcoeffic self-assigned this Oct 9, 2023
This would otherwise cause endless loops when active polling is used
@raphaelcoeffic

Copy link
Copy Markdown
Member Author

Neither X9D+2019 nor Boxer are booting with the GitHub builds for this PR.

Should be fixes now.

@pfeerick

Copy link
Copy Markdown
Member

TX16S, X9D+2019, X9D, Zorro: All connected to pre-bound/bound as necessary RXs with internal MPM/ISRM/XJT, telemetry and control link good. Mix of Ghost, CRSF, Tracer, XJT/XJTLite and MPM external modules used across all the radios with no issues with github builds.

@pfeerick
pfeerick merged commit b22a1b5 into main Oct 14, 2023
@pfeerick
pfeerick deleted the rgb-led-ws2812 branch October 14, 2023 04:06
@pfeerick pfeerick mentioned this pull request Mar 11, 2024
11 of 13 tasks
JunOllyLi pushed a commit to JunOllyLi/edgetx_muffin that referenced this pull request Mar 28, 2026
Co-authored-by: 3djc <lesitewebdejc@hotmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants