wait for valid satellites and altitude

This commit is contained in:
damage 2024-06-23 18:48:18 +02:00
parent 5abae49a33
commit 39a80ed732

View File

@ -82,7 +82,9 @@ void loop() {
if (gps.encode(serialGPS.read())) {
if (gps.location.isValid()
&& gps.date.isValid()
&& gps.time.isValid()) {
&& gps.time.isValid()
&& gps.altitude.isValid()
&& gps.satellites.isValid()) {
mqttClient.beginMessage("/gps/data");
mqttClient.print(gps.date.year());