Ensure we have a multiple of the delay in duration, and tick by the delay
Signed-off-by: Martyn Ranyard <m@rtyn.berlin>
This commit is contained in:
parent
8c3df1dfa2
commit
7a5bb1108a
|
@ -149,7 +149,10 @@ func main() {
|
|||
}
|
||||
if overrideEffect.Effect == "queue" {
|
||||
if currentEffect.Duration > 0 {
|
||||
currentEffect.Duration -= 40
|
||||
if currentEffect.Duration%uint16(msDelay) != 0 {
|
||||
currentEffect.Duration = uint16(currentEffect.Duration/uint16(msDelay)) * uint16(msDelay)
|
||||
}
|
||||
currentEffect.Duration -= uint16(msDelay)
|
||||
} else {
|
||||
if len(globalEffectChannel) > 0 {
|
||||
previousEffect.Effect = "queue"
|
||||
|
|
Loading…
Reference in New Issue