From b8af94b57f5d950c37dfd8553861d6c960d049be Mon Sep 17 00:00:00 2001 From: "suguo.yao" Date: Tue, 28 Feb 2023 11:46:55 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BC=96=E8=BE=91=E5=87=BAwindows?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Makefile | 2 ++ handler/mqtt-handler.go | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..44cfd06 --- /dev/null +++ b/Makefile @@ -0,0 +1,2 @@ +windows: + CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -o iBeaconMeasure.exe . \ No newline at end of file diff --git a/handler/mqtt-handler.go b/handler/mqtt-handler.go index 1d02929..87e16ed 100644 --- a/handler/mqtt-handler.go +++ b/handler/mqtt-handler.go @@ -37,7 +37,7 @@ var serviceHandler MQTT.MessageHandler = func(client MQTT.Client, msg MQTT.Messa if o[1] != "D02EAB2D6D49" { continue } - payload := fmt.Sprintf("%s,%s,%s,%f", time.Unix(int64(body.Time), 0), body.Mac, o[1], o[2].(float64)) + payload := fmt.Sprintf("%s,%s,%s,%f,%s", time.Unix(int64(body.Time), 0), body.Mac, o[1], o[2].(float64), o[3]) logrus.Println(payload) } }