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

LEDs: add felony led effect #5

Merged
merged 1 commit into from
Aug 15, 2024
Merged

LEDs: add felony led effect #5

merged 1 commit into from
Aug 15, 2024

Conversation

acheronfail
Copy link
Contributor

My kids found this effect amusing from the old float package, so I ported it over to this one, too!

Copy link
Owner

@lukash lukash left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey, thanks for the PR, I was looking forward to people contributing effects, and nicely written, too.

src/leds.c Outdated Show resolved Hide resolved
@lukash
Copy link
Owner

lukash commented Aug 14, 2024

Apologies for the long turnaround.

I wanted to test this, and then I also thought about LED strips with an odd number of LEDs. The way it is one half of the effect will be longer. What about making the center LED always black to make it symmetric?

Also, feel free to squash the second commit to the first and when making changes just amend the outstanding commit, I don't need to see the differences in separate ones.

Lastly, would you add a line like this to your commit message, it's a git trailer and will ensure automatic changelog item (with an attribution to you):

Feature: Add the Felony LED effect.

Thank you!

@acheronfail acheronfail force-pushed the felony branch 2 times, most recently from fae1f28 to fae1ac9 Compare August 14, 2024 13:46
@acheronfail
Copy link
Contributor Author

I wanted to test this, and then I also thought about LED strips with an odd number of LEDs. The way it is one half of the effect will be longer. What about making the center LED always black to make it symmetric?

I have some test footage I can upload here if you'd like. Unfortunately I only have LED strips with even numbers of LEDs, so I can't test out odd variations. But I did like your suggestion, so I implemented it.

Also, feel free to squash the second commit to the first and when making changes just amend the outstanding commit, I don't need to see the differences in separate ones.

Lastly, would you add a line like this to your commit message [...]

Squashed, amended commit message with trailer and rebased on the latest trunk. 🙂

Copy link
Owner

@lukash lukash left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I only have LED strips with even numbers of LEDs, so I can't test out odd variations.

You can test it easily, just configure the strip with one less LED 😀

I'll try to test it myself tonight though.

src/leds.c Outdated Show resolved Hide resolved
src/leds.c Outdated Show resolved Hide resolved
src/leds.c Outdated Show resolved Hide resolved
@acheronfail
Copy link
Contributor Author

You can test it easily, just configure the strip with one less LED 😀

Of course 🤦‍♂️

I tested it (at a slow speed 0.2) with the strip set to 20 and 19 leds, as well as with different colours. You can see the results in these videos here:

even_green-gold.mp4
odd_red-blue.mp4

This effect mimics the pattern of common emergency service vehicles.
Its colors are configurable, as well as its speed via Refloat settings.

In the case where the LED strip has an odd number of LEDs, the middle
LED is kept as solid black to ensure the effect is symmetrical.

Feature: Add the Felony LED effect.
@lukash
Copy link
Owner

lukash commented Aug 15, 2024

Thank you!

@lukash lukash merged commit 5e73abf into lukash:main Aug 15, 2024
1 check passed
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.

2 participants