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

@ -41,9 +41,13 @@ func PatternHandler(response http.ResponseWriter, request *http.Request) {
if found {
i, _ := strconv.ParseUint(vars["duration"], 10, 64)
e.Duration = i
} else {
if vars["override"] == "true" {
e.Duration = 0
} else {
e.Duration = 5000
}
}
_, found = vars["speed"]
if found {
i, _ := strconv.Atoi(vars["speed"])
@ -69,9 +73,13 @@ func ColourHandler(response http.ResponseWriter, request *http.Request) {
if found {
i, _ := strconv.ParseUint(vars["duration"], 10, 64)
e.Duration = i
} else {
if vars["override"] == "true" {
e.Duration = 0
} else {
e.Duration = 5000
}
}
var c queue.RGBcolor
for cn, cv := range colornames.Map {
if cn == strings.ToLower(vars["name"]) {
@ -99,9 +107,13 @@ func FadeHandler(response http.ResponseWriter, request *http.Request) {
if found {
i, _ := strconv.ParseUint(vars["duration"], 10, 64)
e.Duration = i
} else {
if vars["override"] == "true" {
e.Duration = 0
} else {
e.Duration = 5000
}
}
var c queue.RGBcolor
for cn, cv := range colornames.Map {
if cn == strings.ToLower(vars["namefrom"]) {