piLights / backend

Control your dioder via rpc
GNU General Public License v3.0
1 stars 0 forks source link

fade in/out #13

Open boergegrunicke opened 8 years ago

boergegrunicke commented 8 years ago

a smooth fade in/out in hard switch the light on / off would be nice

jannickfahlbusch commented 8 years ago

Could be done by specifing the maximum duration of the transition between two color states.

We need to calculate the difference between the new and the old value (or the other way, depending on the bigger value).

After that we divide the difference by the duration and fade the light with the current fraction of the duration.