From cee1d301809ec0b517962816b1b232c22a41eb3b Mon Sep 17 00:00:00 2001 From: Sam Anthony Date: Fri, 29 Nov 2024 15:17:06 -0500 Subject: server: record duty cycle over time --- server/duty.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'server/duty.go') diff --git a/server/duty.go b/server/duty.go index 55022f3..532bfbc 100644 --- a/server/duty.go +++ b/server/duty.go @@ -2,7 +2,6 @@ package main import ( "fmt" - "github.com/sam-rba/share" "log" "net/http" "strconv" @@ -16,7 +15,7 @@ const ( type DutyCycle float32 type DutyCycleHandler struct { - dc share.Val[DutyCycle] + dc Record[DutyCycle] } func (h DutyCycleHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { @@ -34,7 +33,7 @@ func (h DutyCycleHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { return } - h.dc.Set <- DutyCycle(dc) + h.dc.put <- DutyCycle(dc) } func isValidDutyCycle(dc float64) bool { -- cgit v1.2.3