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

per effect smoothing #456

Merged
merged 10 commits into from
Aug 4, 2017
Merged

Conversation

redPanther
Copy link
Contributor

1. Tell us something about your changes.
this pr adds ability to set per effect smooting settings.
Smoothing settings are written in effect json file.
As default all effects without smoothing params in json config have smoothing disabled.

Currently I added smoothing settings only to effect "candle" and "random".
(others should follow, but I don't feel in a artistic mood today. Feel free to post settings for a specific effect as comment to this pr.)

new candle.json

{
	"name" : "Candle",
	"script" : "candle.py",
	"args" :
	{
		"sleepTime" : 0.20,
		"brightness" : 100,
		"color" : [ 255, 138, 0 ],
		"candles" : "all",
		"smoothing-custom-settings" : true,
		"smoothing-time_ms" : 500,
		"smoothing-updateDelay" : 0,
		"smoothing-updateFrequency" : 20.0,
		"smoothing-pause" : false
	}
}

Additionaly:

  • refactored some qt vs. stl stuff (mainly std::min/max to qMin/Max).
  • fixed fade.py effect (crashed with div by zero)

2. If this changes affect the .conf file. Please provide the changed section

3. Reference an issue (optional)
#447

@penfold42
Copy link
Contributor

Perfect !

Great work

@redPanther redPanther requested review from tvdzwan and removed request for tvdzwan August 4, 2017 08:15
@brindosch
Copy link
Contributor

Very cool!
You can hide options by adding a dependency

			"options": {
				"dependencies": {
					"smoothing-custom-settings": true
				}
			},

So this option won't be shown until smoothing-custom-setting is true

@redPanther
Copy link
Contributor Author

cool I always wanted such option :-) it's integrated now

@redPanther
Copy link
Contributor Author

testbuild complete. from my side ready to merge. We can add custom smoothing settings to other effects later on ...

@redPanther redPanther merged commit 6279dcb into hyperion-project:master Aug 4, 2017
- optimize random,candle and fadecandy json schemas
@redPanther redPanther deleted the dyn_smooth branch August 4, 2017 19:03
@brindosch
Copy link
Contributor

I have a question, is there a real diff between "enabled" and "pause" during usage? If you disable it, it is on kind of pause anway?

@redPanther
Copy link
Contributor Author

pause is internal for effects and enable is for the user.
technically pause feeds the smooth device and enabled does it not.

We can rename 'pause' in 'enabled' in effects json ... this would look a bit nicer for users.

@brindosch
Copy link
Contributor

So it does simply the "same". I think a merge is useful to reduce size!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants