From 795cc353961c52997683ac4012d08d4ded0478fb Mon Sep 17 00:00:00 2001 From: junleea <354425203@qq.com> Date: Mon, 10 Mar 2025 15:22:09 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E5=86=85=E5=AD=98=E6=B3=84?= =?UTF-8?q?=E9=9C=B2=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- handler/tool.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/handler/tool.go b/handler/tool.go index 27d6a49..252e395 100644 --- a/handler/tool.go +++ b/handler/tool.go @@ -195,14 +195,13 @@ func subscribeAndHandleMessagesV6(ws *websocket.Conn, deviceId int) { count := 0 //定时器,发送计数器 tCount := 0 - var buf []byte //计算帧率 for { //从service获取当前帧 c := service.DeviceFrameCount[deviceId] if c != count { count = c - buf = service.Device1CurrentFrame.ToBytes() + buf := service.Device1CurrentFrame.ToBytes() err2 := ws.WriteMessage(websocket.BinaryMessage, buf) if err2 != nil { log.Printf("send message to client err:%v", err2)