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

@ -4,7 +4,7 @@ type RGBcolor = [3]byte
type QueueItem struct { type QueueItem struct {
Effect string Effect string
Duration uint16 Duration uint64
Speed uint16 //only used by some patterns Speed uint16 //only used by some patterns
SeedColour RGBcolor // only used by some patterns SeedColour RGBcolor // only used by some patterns
SecondColour 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"]) e.Effect = strings.ToLower(vars["pattern"])
_, found := vars["duration"] _, found := vars["duration"]
if found { if found {
i, _ := strconv.Atoi(vars["duration"]) i, _ := strconv.ParseUint(vars["duration"], 10, 64)
e.Duration = uint16(i) e.Duration = uint16(i)
} else { } else {
e.Duration = 5000 e.Duration = 5000
@ -67,7 +67,7 @@ func ColourHandler(response http.ResponseWriter, request *http.Request) {
e.Effect = "colour" e.Effect = "colour"
_, found := vars["duration"] _, found := vars["duration"]
if found { if found {
i, _ := strconv.Atoi(vars["duration"]) i, _ := strconv.ParseUint(vars["duration"], 10, 64)
e.Duration = uint16(i) e.Duration = uint16(i)
} else { } else {
e.Duration = 5000 e.Duration = 5000