This commit is contained in:
xyj 2023-12-07 09:39:03 +08:00
parent 68072b177b
commit a2210b4624
1 changed files with 155 additions and 151 deletions

View File

@ -31,6 +31,7 @@ if __name__ == '__main__':
windspeed_send = bytes.fromhex(windspeed_send) windspeed_send = bytes.fromhex(windspeed_send)
winddirection_send = bytes.fromhex(winddirection_send) winddirection_send = bytes.fromhex(winddirection_send)
while True: while True:
try:
# if ser.is_open: # if ser.is_open:
ser.write(temp_send) ser.write(temp_send)
time.sleep(1) time.sleep(1)
@ -182,3 +183,6 @@ if __name__ == '__main__':
} }
t = LOT_DATA(**data) t = LOT_DATA(**data)
add(t) add(t)
except Exception as e:
print(e)
pass