Uint64 because time...
continuous-integration/drone/push Build is failing
Details
continuous-integration/drone/push Build is failing
Details
Signed-off-by: Martyn Ranyard <m@rtyn.berlin>
This commit is contained in:
parent
7a5bb1108a
commit
4d72b04cc1
|
@ -3,9 +3,9 @@ package queue
|
||||||
type RGBcolor = [3]byte
|
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
|
||||||
}
|
}
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue