per effect smoothing (#456)

* add dynamic smoothing first step
* extend prio muxer to hold smoothing preset id
* add icons for systray
* fix missing changes in prio muxer
*  implement specific smoothing params for effects
* refactoring: std::min/max to qMin/Max
* some code optimization
* fix schema and translation
* revoke change of python include order
* fix eol in effect shemas
* optimize random,candle and fadecandy json schemas
This commit is contained in:
redPanther
2017-08-04 12:01:45 +02:00
committed by GitHub
parent 6625a318ac
commit 6279dcb2a9
44 changed files with 824 additions and 568 deletions

View File

@@ -13,12 +13,17 @@ minStepTime = float(hyperion.latchTime)/1000.0
currentR = currentG = currentB = 0
# create color table for fading from start to end color
steps = float(abs(max((colorEnd[0] - colorStart[0]),max((colorEnd[1] - colorStart[1]),(colorEnd[2] - colorStart[2])))))
color_step = (
(colorEnd[0] - colorStart[0]) / steps,
(colorEnd[1] - colorStart[1]) / steps,
(colorEnd[2] - colorStart[2]) / steps
)
steps = float(max(abs(colorEnd[0] - colorStart[0]),max(abs(colorEnd[1] - colorStart[1]),abs(colorEnd[2] - colorStart[2]))))
color_step = (0,0,0)
if steps == 0:
steps = 1
else:
color_step = (
(colorEnd[0] - colorStart[0]) / steps,
(colorEnd[1] - colorStart[1]) / steps,
(colorEnd[2] - colorStart[2]) / steps
)
calcChannel = lambda i: min(max(int(round(colorStart[i] + color_step[i]*step)),0), colorEnd[i] if colorStart[i] < colorEnd[i] else colorStart[i])
colors = []