diff --git a/worker.go b/worker.go index f744ee1..615ef62 100644 --- a/worker.go +++ b/worker.go @@ -21,6 +21,24 @@ type Device struct { DATA map[string]interface{} `json:"data"` } +func yunhorn_ys_l_v1(data_buf []byte){ + //log.Println(data_buf) + log.Println(data_buf[3:4]) + data_int := Bytes2Bits(data_buf[3:4]) + var device Device + device.ID="deb03e28-ddcb-4e5d-aa31-d870a1f0f09b" + device.VERSION="yunhorn_ys_l_v1" + device.ONLINE=true + device.DATA=make(map[string]interface{}) + device.DATA["data"]=data_int[0] + if conf.DEBUG { + log.Println(device) + } + + send_data(1005, device) + +} + func yunhorn_lorawan_l_v1(s *serial.Port) { for { buf := make([]byte, 128)