succd: show logo

This commit is contained in:
Serge Bazanski 2024-09-27 02:10:39 +02:00
parent 7dffd2a4b4
commit 781bbaaeb4
3 changed files with 21 additions and 1 deletions

View file

@ -19,8 +19,15 @@ var (
//go:embed index.html
templateIndexText string
templateIndex = template.Must(template.New("index").Parse(templateIndexText))
//go:embed succd.png
favicon []byte
)
func (d *daemon) httpFavicon(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "image/png")
w.Write(favicon)
}
func formatVolts(v float32) string {
return fmt.Sprintf("%.4f V", v)
}