完善设备配置

This commit is contained in:
fish 2019-03-23 15:53:17 +08:00
parent 97116ffb1e
commit a338a46654
2 changed files with 9 additions and 7 deletions

View File

@ -93,10 +93,10 @@
"wireless_slave_devices":[ "wireless_slave_devices":[
{ {
"adrh":0, "adrh":0,
"adrl":0, "adrl":4,
"type":0, "type":0,
"version":"yunhorn_ys_l_v1", "version":"yunhorn_ys_l_v1",
"flip":true, "flip":false,
"id":"BDA9D650-5E4C-41A0-A78F-DA8A8D488E45" "id":"BDA9D650-5E4C-41A0-A78F-DA8A8D488E45"
}, },
{ {
@ -109,10 +109,10 @@
}, },
{ {
"adrh":0, "adrh":0,
"adrl":2, "adrl":0,
"type":0, "type":0,
"version":"yunhorn_ys_l_v1", "version":"yunhorn_ys_l_v1",
"flip":true, "flip":false,
"id":"018B5704-55BE-40CA-9D3E-90EF157C2489" "id":"018B5704-55BE-40CA-9D3E-90EF157C2489"
} }
], ],

View File

@ -46,6 +46,8 @@ func yunhorn_wireless(data_buf []byte){
continue; continue;
} }
if item.FLIP{ if item.FLIP{
if data==0{ if data==0{
data = 1 data = 1
@ -67,9 +69,9 @@ func yunhorn_wireless(data_buf []byte){
} }
} }
} }
if(len(data_buf)>8){ // if(len(data_buf)>8){
go yunhorn_wireless(data_buf[4:]) // go yunhorn_wireless(data_buf[4:])
} // }
} }
func yunhorn_xdy_l_v1(data_buf []byte){ func yunhorn_xdy_l_v1(data_buf []byte){