|
|
@@ -10,7 +10,7 @@ import (
|
|
|
"strconv"
|
|
|
)
|
|
|
|
|
|
-func sendCommand(n *noolite.NooliteAdapter, command string, channel, value, r, g, b int) error {
|
|
|
+func sendCommand(command string, channel, value, r, g, b int) error {
|
|
|
if channel == -1 {
|
|
|
return errors.New("Channel was not set")
|
|
|
}
|
|
|
@@ -94,7 +94,7 @@ func main() {
|
|
|
flag.Parse()
|
|
|
|
|
|
if *http_port < 0 {
|
|
|
- err := sendCommand(n, *command, *channel, *value, *red, *green, *blue)
|
|
|
+ err := sendCommand(*command, *channel, *value, *red, *green, *blue)
|
|
|
|
|
|
if err != nil {
|
|
|
panic(err)
|
|
|
@@ -103,7 +103,7 @@ func main() {
|
|
|
http.HandleFunc("/noolite/", func(w http.ResponseWriter, r *http.Request) {
|
|
|
command, channel, value, red, green, blue := parseParams(r.URL.Path[1:])
|
|
|
|
|
|
- err := sendCommand(n, command, channel, value, red, green, blue)
|
|
|
+ err := sendCommand(command, channel, value, red, green, blue)
|
|
|
|
|
|
if err != nil {
|
|
|
fmt.Fprintf(w, "{\"error\": %q}", err)
|