-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
TPM2 Playback from LittleFS and SD #2292
Conversation
…D, added recording as live-mode, made tpm2 uploadable via `/edit` interface
This is cool. And clean. 👍 |
I will do my best to get this merged. Not in 0.13 though. |
Credit goes to @constant-flow for the original idea and structure created for TPM2 playback! wled#2292 Adds support for playback of FSEQ files from xLights or Vixen Includes support for both SD_MMC and SD via SPI (e.g. TTGO devices) Uses FSEQFile class to prevent overlapping functions NOTE: Created REALTIME_MODE_FSEQ using 10 instead of 9 (next available value) to keep compatibility with TPM2RECORD once both are merged
I hope it will be possible to merge this PR soon. |
Meanwhile I compiled V0.13-b6 with these changes. |
I was finally able to delve into the code, examine it and prepared a few suggestions. First of all, idea is great and has a lot of potential - as a usermod. If you can rewrite it as a usermod (you may check existing usermods: multi relay, temperature, PWM fan, etc) it has a greater chance of being merged as it becomes optional for users. It will also allow for greater flexibility as the usermod framework allows usermods to tap into core WLED without changing original source. Second, I liked the idea of employing SD card. Unfortunately it turns out that there are 2 ways to connect SD card to ESP: MMC & SPI. Enhancing (usermod) with the ability to use either would be best as it seems that higher level API for both is the same. The actual connection may be selected using usermod's configuration page. I am sorry this has taken so long to review the code but I had other priorities unfortunately. I hope you will agree with the idea of rewriting your enhancement as a usermod. Best! |
No comment? |
Currently on vacation 🌴 Thanks for your suggestions though I'm still not so sure how easy an integration as a usermod would be. |
No problem. BTW take a look at my fork, audioreactive-prototype (or 2D-support) branch for the inspiration. |
I had a look into the docs again and finally understood how Usermods can alter the capabilities of the API-Commands. Also now it relies on the My plan now is to clean it up a bit more and abstract it from the recording format, to enable not only TPM2 but also any other format future devs want to playback like fseq, so they can easily support their format with this usermod.
Concerning the two ways to access the SD. I think I could integrate that via the usermod settings (if necessary). Do you have a link to projects using the MMC and one using SPI, so I can have a look whats the general difference in code to access files on them?
|
Hi. Checked your usermod prototype linked above. |
Please check update here about new progress Anything missing for a PR? |
@ElToberino thx for checking and reporting errors.
Looks like I forgot a default value from what you report. Will have a look. @harueg the TPM2 doesn't specify a framerate via the header. It's 25 FPS by convention from jinx! I think the TPM2 "standard" 🇩🇪 doesn't even define a default framerate
I will check on that, I hope I'll find some time to investigate. Last time the interface was still showing it being in realtime mode even though it stopped it via |
The more I look into this messed up PR the more I feel I should close this PR and open 2 new PRs
I hope i find the time to do it soon. Maybe then, things will be merged into main as usermod |
Here is the plan for the protocol, I don't think everything has been implemented yet. |
@constant-flow:
With these modifications everything works as intendend. @harueg: |
@ElToberino thx for investigating and solving this issue 🙇 . I merged the current main into my branch (v14) and added your fixes. It's still on my branch, from what I tested the fixes work, maybe check it. I'll try PR both mods individually soon, didn't have enough time today. |
So i created two PRs to close this one PR1 : Playback of .tpm2 |
Changes
esp32-eth-sd
env/edit
interfaceRelated