2024-07-11 -
This commit is contained in:
parent
4bc4c4e6c6
commit
0717aed610
5
gps2.py
5
gps2.py
@ -52,8 +52,11 @@ def get_gps_position():
|
||||
if 1 == answer:
|
||||
answer = 0
|
||||
if ',,,,,,' in rec_buff:
|
||||
gps_info = extract_gps_info(rec_buff)
|
||||
client.publish("iiot/" + myhost + "/gps", gps_info, 2)
|
||||
return True
|
||||
else:
|
||||
print('GPS no está listo')
|
||||
rec_null = False
|
||||
time.sleep(1)
|
||||
else:
|
||||
print('error %d'%answer)
|
||||
|
Loading…
Reference in New Issue
Block a user