2024-08-03 -
This commit is contained in:
parent
36d1e9c401
commit
8f315b06f7
@ -83,11 +83,11 @@ def initialize_gps(gps_ser):
|
||||
time.sleep(2) # Aumentar el tiempo de espera
|
||||
gps_ser.write(b'AT+CGNSTST=1\r') # Iniciar la transmisión de datos
|
||||
time.sleep(2) # Aumentar el tiempo de espera
|
||||
|
||||
|
||||
# Leer la respuesta del GPS para asegurarse de que está funcionando
|
||||
response = gps_ser.read(100)
|
||||
logging.info(f"GPS initialized with response: {response}")
|
||||
|
||||
|
||||
except Exception as e:
|
||||
logging.error(f"Error initializing GPS: {e}")
|
||||
|
||||
@ -229,4 +229,4 @@ def main():
|
||||
influx_client.close()
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
main()
|
||||
|
Loading…
Reference in New Issue
Block a user