package speedsign

import (
	"fmt"
	"net/http"

	"git.ctdo.de/henne/blitzer-v2/config"
	"git.ctdo.de/henne/blitzer-v2/db"
)

func Show(speed int) {
	if speed > db.GetConfig().TriggerSpeed {
		_, _ = http.Get("http://" + config.C.SpeedsignIP + "/api/color/FF0000")
	} else {
		_, _ = http.Get("http://" + config.C.SpeedsignIP + "/api/color/00FF00")
	}
	_, _ = http.Get(fmt.Sprintf("http://%s/api/number/%d", config.C.SpeedsignIP, speed))
}
