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

feat: RGB leds supports #3909

Merged
merged 5 commits into from
Oct 14, 2023
Merged

feat: RGB leds supports #3909

merged 5 commits into from
Oct 14, 2023

Conversation

raphaelcoeffic
Copy link
Member

@raphaelcoeffic raphaelcoeffic commented Aug 6, 2023

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

@Eldenroot
Copy link
Contributor

CZ:

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

@raphaelcoeffic
Copy link
Member Author

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

@mha1
Copy link
Contributor

mha1 commented Aug 8, 2023

@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
Copy link
Contributor

mha1 commented Aug 8, 2023

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
Member Author

@mha1 should be fixed now.

@3djc
Copy link
Collaborator

3djc commented Aug 10, 2023

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
Copy link
Contributor

mha1 commented Aug 10, 2023

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
Copy link
Member Author

raphaelcoeffic commented Aug 10, 2023

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
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
Copy link
Contributor

mha1 commented Aug 10, 2023

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
Copy link
Contributor

mha1 commented Aug 10, 2023

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

@raphaelcoeffic
Copy link
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
Copy link
Collaborator

JimB40 commented Aug 10, 2023

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
Copy link
Contributor

mha1 commented Aug 11, 2023

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

@pfeerick
Copy link
Member

pfeerick commented Sep 3, 2023

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

@richardclli
Copy link
Collaborator

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

@pfeerick
Copy link
Member

pfeerick commented Oct 9, 2023

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
Member Author

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

Should be fixes now.

@pfeerick
Copy link
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
40 checks passed
@pfeerick pfeerick deleted the rgb-led-ws2812 branch October 14, 2023 04:06
@pfeerick pfeerick mentioned this pull request Mar 11, 2024
13 tasks
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