Skip to content

Add stub implementation for local testing#1366

Closed
sethtroisi wants to merge 3 commits into
FastLED:masterfrom
sethtroisi:stub_impl
Closed

Add stub implementation for local testing#1366
sethtroisi wants to merge 3 commits into
FastLED:masterfrom
sethtroisi:stub_impl

Conversation

@sethtroisi
Copy link
Copy Markdown
Contributor

@sethtroisi sethtroisi commented Feb 17, 2022

I wanted to test some of my patterns on my computer were it's much quicker to compile, test, tune, and iterate.

So I wrote a little wrapper demo_simple.cpp around FastLED so that I could see the pixels on my computer (while still using 99% of my same pattern code).

I'd love to upstream the FastLED Controller Stub if you consider it reasonable. I think I got the right pieces in the right place and I'm happy to change if there are things I've messed up.

FastLED continues to make my art fabulous!


EDIT: Looking at the tests using defined(__x86_64__) might conflict on some platforms, I'm open to better solutions; possible passing in -DSTUB_IMPL or adding a setting a new #define to fastled_config.h

@marmilicious
Copy link
Copy Markdown
Contributor

Do you have a video of this running?

@sethtroisi
Copy link
Copy Markdown
Contributor Author

This is a video of demo_simple with some extra delay added (so it doesn't run at 10,000 FPS)
https://user-images.githubusercontent.com/10172976/155034306-7d4a26b7-318b-4d02-9124-a8b36c7d9452.mp4

And this is a screenshot of an effect I'm tuning with 50x100 strips
Screenshot from 2022-02-08 02-13-28

@marmilicious
Copy link
Copy Markdown
Contributor

Pretty cool, thank you for the video and screenshot.

@Jueff
Copy link
Copy Markdown
Contributor

Jueff commented Feb 23, 2022

Hello @sethtroisi. I like this idea very much, could you please share a description of your build environment containing tools, scripts/makefile?

Thank you!

@sethtroisi
Copy link
Copy Markdown
Contributor Author

I have three versions of my project all sharing the same lights driving code. I target esp32, photon particle, and do tuning in my desktop. I do all the programming in VS Code.

VSCode has an extension for the photon particle it simple take all the cpp and h files and passes everything to gcc, compiling everything without any config.

For the esp32 I cloned a FastLED demo from espresso which uses cmake. The build tool is ninja(?).

Finally and most simple is my new desktop visualizer. I tend to compile the FastLED source files to object files then use ar to turn that into a library which speeds up compilation but it's also possible to build with g++ demo_simple.cpp -I~/Projects/FastLED/src -lsfml-graphics -lsfml-window -lsfml-system -pthread where demo_simple.cppis linked above.

Let me know if other details would be useful.

zackees added a commit that referenced this pull request Aug 30, 2024
@zackees
Copy link
Copy Markdown
Member

zackees commented Aug 30, 2024

Thanks, merged in manually:

#1685

@zackees zackees closed this Aug 30, 2024
@sethtroisi sethtroisi deleted the stub_impl branch September 3, 2024 17:03
@sethtroisi
Copy link
Copy Markdown
Contributor Author

Thanks for merging this. It's so nice to have fewer branches and get to use a clean upstream :)

@zackees
Copy link
Copy Markdown
Member

zackees commented Sep 4, 2024

What's thsi effect called btw?

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.

4 participants