Uint64 because time...
continuous-integration/drone/push Build is failing Details

Signed-off-by: Martyn Ranyard <m@rtyn.berlin>
This commit is contained in:
Martyn 2020-07-13 18:13:44 +02:00
parent 7a5bb1108a
commit 4d72b04cc1
2 changed files with 7 additions and 7 deletions

View File

@ -3,9 +3,9 @@ package queue
type RGBcolor = [3]byte
type QueueItem struct {
Effect string
Duration uint16
Speed uint16 //only used by some patterns
SeedColour RGBcolor // only used by some patterns
Effect string
Duration uint64
Speed uint16 //only used by some patterns
SeedColour RGBcolor // only used by some patterns
SecondColour RGBcolor // only used by some patterns
}
}

View File

@ -39,7 +39,7 @@ func PatternHandler(response http.ResponseWriter, request *http.Request) {
e.Effect = strings.ToLower(vars["pattern"])
_, found := vars["duration"]
if found {
i, _ := strconv.Atoi(vars["duration"])
i, _ := strconv.ParseUint(vars["duration"], 10, 64)
e.Duration = uint16(i)
} else {
e.Duration = 5000
@ -67,7 +67,7 @@ func ColourHandler(response http.ResponseWriter, request *http.Request) {
e.Effect = "colour"
_, found := vars["duration"]
if found {
i, _ := strconv.Atoi(vars["duration"])
i, _ := strconv.ParseUint(vars["duration"], 10, 64)
e.Duration = uint16(i)
} else {
e.Duration = 5000