-
-
Notifications
You must be signed in to change notification settings - Fork 387
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
Implement ftdi led device #1595
Conversation
Hello @nurikk 👋 I'm the Hyperion Project Bot and I want to thank you for To help you and other users test your pull requests faster, 🔗 https://github.com/hyperion-project/hyperion.ng/actions/runs/4520879701 Of course, if you make changes to your PR, I will create a new link. Best regards, |
Hey @nurikk I created a new link to your workflow artifacts: |
Hey @nurikk I created a new link to your workflow artifacts: |
Hey @nurikk I created a new link to your workflow artifacts: |
Hey @nurikk I created a new link to your workflow artifacts: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @nurikk
many thanks for your contribution!
Thanks for the PR backporting FTDI support from HyperHDR.
In some areas hyperion works a bit differently.
Therefore, please find some review comments below and related to the files.
I am happy to support you in getting it aligned.
Following additional comments:
- The content_leds.js code does not support the discovery mechanism.
Ping me privately on discord and I share a updated version with you or provide access to your repository and I push a commit with some updates... - Would you mind adding
libftdi1-dev
to doc/development/CompileHowto.md - I am still wondering, if it would make sense changing the backend code that way, that e.g. apa102 can work via SPI or FTDI.
i.e. having common LED type code but working via a different way of communication.
Currently, the e.g. APA SPI and APA FTDI is not consistent any longer.
Hey @nurikk I created a new link to your workflow artifacts: |
Hi @Lord-Grey, thanks for a great review! I've addressed all questions.
I'd love to do that, but I'm afraid I'm not competent enough in cpp and overall project structure to start such refactoring. |
Hey @nurikk I created a new link to your workflow artifacts: |
@Lord-Grey can you help me with linker issues? It compiled right for mac os, but it fails on linux https://github.com/nurikk/hyperion.ng/actions/runs/4526347559/jobs/7971453468 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for turning the previous feedback round quickly!
@Lord-Grey can you help me with linker issues? It compiled right for mac os, but it fails on linux https://github.com/nurikk/hyperion.ng/actions/runs/4526347559/jobs/7971453468
Please see some feedback below. It should address to issue.
You can also run unix docker compiles with local codes to test before running the docker on Git
For the failing Stretch build you would execute in the local code directory:
sudo ./bin/scripts/docker-compile.sh -i x86_64 -t stretch -b Debug -p false -l
Look at the script and you can easily cross-compile for testing on other platforms too.
"required": true, | ||
"propertyOrder": 1 | ||
}, | ||
"rate": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ist the baud rate totally dynamic or does it follow the USB serial baud rates?
If it follows the baud rate, I suggest you use a rateList as in
https://github.com/hyperion-project/hyperion.ng/blob/master/libsrc/leddevice/schemas/schema-adalight.json
to avoid user misconfiguration.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's not abut serial baud rate, since sk6812 is pwm driven and we simulate pwm signal using spi, allowing users to manually adjust baud rate will help to fix any troubles with dodgy strings. same for ws2812
Hey @nurikk I created a new link to your workflow artifacts: |
@nurikk Sorry, I missed one thing, Could you adding and to hyperion.ng/.github/workflows/codeql.yml Line 35 in e0060eb
Otherwise the Code-Checker will fail to build. |
Done |
@Lord-Grey can you advise me on how to refactor spi and ftdi led devices to adhere DRY? I don't quite like the inheritance here |
Maybe you missed to push the commits. |
Oh yeah, I forgot to push:) I’ll push once get back home |
Hey @nurikk I created a new link to your workflow artifacts: |
Pushed :) |
Many thanks, it's not possible to support windows platform (too)? |
Great. Thank you! |
This should be possible, but I have no idea how to install libraries on windows. |
I am not a Cpp-Pro and would need to investigate about it. There are different options, but not limited to, like a bridging class, multiple inheritance, using templates, etc… |
Hey @nurikk I created a new link to your workflow artifacts: |
Hey @nurikk I created a new link to your workflow artifacts: |
Hey @nurikk I created a new link to your workflow artifacts: |
Hey @nurikk I created a new link to your workflow artifacts: |
Hey @nurikk I created a new link to your workflow artifacts: |
Hey @nurikk I created a new link to your workflow artifacts: |
Hey @nurikk I created a new link to your workflow artifacts: |
Hey @nurikk I created a new link to your workflow artifacts: |
Hello, is there any chance to implement the Hyperion FTDI for Windows? |
Hey @nurikk I created a new link to your workflow artifacts: |
Hi, it's definitely possible, but not the top priority atm |
I really liked the previously white calc. algorithms ("auto", "auto_max", "auto_accurate"), could we have them back (or they get removed not intentionally) ? |
Hey @nurikk I created a new link to your workflow artifacts: |
added them back |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CodeQL found more than 10 potential problems in the proposed changes. Check the Files changed tab for more details.
Is it possible that very low led color causes the led flashing between on/off? I used the same length cable /5cm?/ + level shifter /sn74ahct/ (even hooked OE to GND instead of CS /AD3/) as used for esp32 where this problem doesn't occurs. I captured short footage of the issue (the movie was paused): Any idea what can cause this? I tried different baud rates, latch time, slower led update rate, but the problem persist :/. p.s.: SK6812 RGBW strip |
@asturel |
Is the reset time typo or lowered on purpose based on some tests? btw it shouldn't be dependent on leds count? (the datasheet applies to 300 leds (?)) |
I use a FT232H without a level shifter and tried this patch, but I had to do some adjustments:
With that being said, its driving my old 189 APA102 setup without any problems for two weeks now. |
@nurikk / @nurikk-sa It has been a very long time that this PR is open. Too long! As I do not have the time to fully and conceptually separate LED protocols from communication ones holistically. I put your work as #1746 to make it available to the community. You might want to check, if I missed some critical updated when pulling everything together. Many thanks again for your contribution and really sorry it took toooooo long! |
Client ng as replaced by #1746 |
Hello! This PR introduces
ftdilib1
led device implementation. FTDI chips are common usb2serial/spi/whatever chips, and are available for 5-10$ from Chinese website as various breakout boards.(This is the back port from awawa-dev/HyperHDR#521)
My wiring is following:
I've tested my code on MacOS and webos7(lg tv c2), no extra drivers required.
This implementation is tested against APA102, WS1218 and SK6812.
Requires libftdi1 dependency hyperion-project/hyperion.docker-ci#6
Test webOS builds available here https://github.com/nurikk/hyperion.ng-webos-loader/actions/runs/4520870590
What kind of change does this PR introduce? (check at least one)
If changing the UI of web configuration, please provide the before/after screenshot:
Does this PR introduce a breaking change? (check one)