types.... yeah... I know about them.

This commit is contained in:
Martyn 2021-01-03 11:24:45 +01:00
parent 0dae7447a5
commit a915977cea
2 changed files with 6 additions and 6 deletions

View File

@ -118,9 +118,9 @@ func singleColorPlasmaFromFloatVal(val float64, baseColor RGBcolor) (byte, byte,
var g byte
var b byte
val = positiveModF(val)
r = baseColor[0] * val
g = baseColor[1] * val
b = baseColor[2] * val
r = byte(math.Trunc(float64(baseColor[0]) * val))
g = byte(math.Trunc(float64(baseColor[1]) * val))
b = byte(math.Trunc(float64(baseColor[2]) * val))
return r, g, b
}

View File

@ -174,9 +174,9 @@ func HandleHTTP(queueChannel chan queue.QueueItem, Port int, overrideChannel cha
r.HandleFunc("/colorpattern/{color}/{pattern}/", PatternHandler)
r.HandleFunc("/colorpattern/{color}/{pattern}/{duration}", PatternHandler)
r.HandleFunc("/colorpattern/{color}/{pattern}/{duration}/{speed}", PatternHandler)
r.HandleFunc("/bloop/{name}", ColourHandler)
r.HandleFunc("/bloop/{name}/override={override}", ColourHandler)
r.HandleFunc("/bloop/{name}/{duration}", ColourHandler)
r.HandleFunc("/colour/{name}", ColourHandler)
r.HandleFunc("/colour/{name}/override={override}", ColourHandler)
r.HandleFunc("/colour/{name}/{duration}", ColourHandler)
r.HandleFunc("/color/{name}", ColourHandler)
r.HandleFunc("/color/{name}/override={override}", ColourHandler)
r.HandleFunc("/color/{name}/{duration}", ColourHandler)