Comments (2)
Changed the default behavior to reset both time and state when the animation is changed or recompiled since this makes more sense, clarified the README, and added a command-line flag to revert back to the original behavior.
from led-control.
Thank you for the amazingly fast response.
May I suggest: the desire to transition smoothly between two animations is a property of the transition, or maybe of the pattern. It's not a global property of the whole execution lifetime. There's a reasonable use case for both (and a mixture of both, which is my own case).
Consider a pattern like "fade to off," or "fade in from end to end". There's no way to implement these if t and prev_state are linked like this.
If it's globally set to blackout at the first cycle, I could check for t==1 and set the color... but I have no access to the previous state, so I don't know what that color is. If it's globally set to preserve prev_state and t, I can't determine time from start of animation to do that progressive fade in.
But if the t value resets and prev_state is preserved, then I have options. I can manually set a blackout at beginning, or just inherit. And I always know my time from animation start.
I suggest that t should always reset at start of pattern/compile (after all, what's the value of a cycle count from execution start?), and the global option should only control if prev_state is zeroed out. In fact the global option could disappear, since the pattern code can manually zero it out.
from led-control.
Related Issues (20)
- ledcontrol service needs manual restart after klipper restarts
- can I include speed and scale in a custom pattern?
- How many LED's with 1 data pin HOT 2
- Fixed it with reinstall of raspbian
- Controlling multiple LED strips from a single frontend
- Support 6 LEDs-per-pixel (24v strips) HOT 1
- Alternative sigle board computers? HOT 2
- sacn enforced to off on startup
- Get an error if I try the --hap argument
- Failed building wheel for pyfastnoisesimd HOT 5
- pyOpenSSL dependency breaks install
- V.2.1.1 don't work with my raspberry version - setup.py don't work HOT 5
- issu sudo command not working HOT 6
- Issue starting up HOT 3
- Unable to start ledcontrol HOT 3
- No module named '_ledcontrol_rpi_ws281x_driver HOT 4
- Raspberry Pi 3A+ Revision 1.1 not yet supported by rpi_ws281x
- can't run setup , something to do with bjoern? HOT 5
- sACN input not processed unless an animated pattern is selected
- Error when running setup.py - deprecation warning, script not starting :( HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from led-control.