From 0717aed610f63c7b41363397ad469a3441c3c0ca Mon Sep 17 00:00:00 2001 From: Adolfo Delorenzo Date: Thu, 11 Jul 2024 14:39:26 -0600 Subject: [PATCH] 2024-07-11 - --- gps2.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/gps2.py b/gps2.py index 9d50aa7..d31f19a 100644 --- a/gps2.py +++ b/gps2.py @@ -52,9 +52,12 @@ def get_gps_position(): if 1 == answer: answer = 0 if ',,,,,,' in rec_buff: - print('GPS no está listo') - rec_null = False - time.sleep(1) + gps_info = extract_gps_info(rec_buff) + client.publish("iiot/" + myhost + "/gps", gps_info, 2) + return True + else: + print('GPS no está listo') + time.sleep(1) else: print('error %d'%answer) rec_buff = ''