zero-length override
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/tag Build is passing Details

Signed-off-by: Martyn Ranyard <m@rtyn.berlin>
This commit is contained in:
Martyn 2020-07-13 18:35:53 +02:00
parent ffec6c8260
commit 10cef66e13
1 changed files with 15 additions and 3 deletions

View File

@ -42,7 +42,11 @@ func PatternHandler(response http.ResponseWriter, request *http.Request) {
i, _ := strconv.ParseUint(vars["duration"], 10, 64) i, _ := strconv.ParseUint(vars["duration"], 10, 64)
e.Duration = i e.Duration = i
} else { } else {
e.Duration = 5000 if vars["override"] == "true" {
e.Duration = 0
} else {
e.Duration = 5000
}
} }
_, found = vars["speed"] _, found = vars["speed"]
if found { if found {
@ -70,7 +74,11 @@ func ColourHandler(response http.ResponseWriter, request *http.Request) {
i, _ := strconv.ParseUint(vars["duration"], 10, 64) i, _ := strconv.ParseUint(vars["duration"], 10, 64)
e.Duration = i e.Duration = i
} else { } else {
e.Duration = 5000 if vars["override"] == "true" {
e.Duration = 0
} else {
e.Duration = 5000
}
} }
var c queue.RGBcolor var c queue.RGBcolor
for cn, cv := range colornames.Map { for cn, cv := range colornames.Map {
@ -100,7 +108,11 @@ func FadeHandler(response http.ResponseWriter, request *http.Request) {
i, _ := strconv.ParseUint(vars["duration"], 10, 64) i, _ := strconv.ParseUint(vars["duration"], 10, 64)
e.Duration = i e.Duration = i
} else { } else {
e.Duration = 5000 if vars["override"] == "true" {
e.Duration = 0
} else {
e.Duration = 5000
}
} }
var c queue.RGBcolor var c queue.RGBcolor
for cn, cv := range colornames.Map { for cn, cv := range colornames.Map {