update
This commit is contained in:
parent
3ab0ddc2db
commit
dd16d45784
|
@ -165,7 +165,7 @@ def local():
|
|||
# print("当前风向为:", int(return_data_hex[10:14], 16))#单位mm
|
||||
# 6号设备是8方位
|
||||
if subscribe_topic == zhanguan_device_name:
|
||||
winddirection_data = int(return_data_hex[10:14], 16)
|
||||
winddirection_data = int(return_data_hex[6:10], 16)
|
||||
else:
|
||||
winddirection_data = int(return_data_hex[6:10], 16) / 10
|
||||
time.sleep(5)
|
||||
|
|
|
@ -169,7 +169,7 @@ def get_data():
|
|||
# print("当前风向为:", int(return_data_hex[10:14], 16) ) #单位mm
|
||||
# 6号设备是8方位
|
||||
if subscribe_topic == zhanguan_device_name:
|
||||
winddirection_data = int(return_data_hex[10:14], 16)
|
||||
winddirection_data = int(return_data_hex[6:10], 16)
|
||||
else:
|
||||
winddirection_data = int(return_data_hex[6:10], 16) / 10
|
||||
time.sleep(5)
|
||||
|
|
Loading…
Reference in New Issue