From 43e71e4dd6dfdfe75c6aab353edd5be59e979258 Mon Sep 17 00:00:00 2001 From: yarnom Date: Fri, 1 Aug 2025 21:25:44 +0800 Subject: [PATCH] feat: add a new 485 type weather station --- main.go | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/main.go b/main.go index aa016d3..36af177 100644 --- a/main.go +++ b/main.go @@ -16,8 +16,6 @@ import ( "weatherstation/config" "weatherstation/model" - - "github.com/gin-gonic/gin" ) type UTF8Writer struct { @@ -164,15 +162,7 @@ func startUDP() { func main() { setupLogger() - go startUDP() - - r := gin.Default() - r.LoadHTMLGlob("templates/*") - r.Static("/static", "static") - r.GET("/", func(c *gin.Context) { - c.HTML(200, "index.html", gin.H{}) - }) - r.Run(":10007") + startUDP() // 直接运行UDP服务器,不再使用goroutine } func hexDump(data []byte) string {