From 5e4c7a90a1622e97c9158b1e9bf1eef8889b4b27 Mon Sep 17 00:00:00 2001 From: Kent Wiliams Date: Tue, 19 May 2020 10:33:53 -0700 Subject: [PATCH] add cayennelpp gps packing --- .../longfi-us915-cayenne-gnss/longfi-us915-cayenne-gnss.ino | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ST-B-L072Z-LRWAN1/longfi-us915-cayenne-gnss/longfi-us915-cayenne-gnss.ino b/ST-B-L072Z-LRWAN1/longfi-us915-cayenne-gnss/longfi-us915-cayenne-gnss.ino index 2947088..d16037e 100644 --- a/ST-B-L072Z-LRWAN1/longfi-us915-cayenne-gnss/longfi-us915-cayenne-gnss.ino +++ b/ST-B-L072Z-LRWAN1/longfi-us915-cayenne-gnss/longfi-us915-cayenne-gnss.ino @@ -301,6 +301,9 @@ void readGPS() { ledState = !ledState; digitalWrite(LED_BUILTIN, ledState); + // Clear Payload + lpp.reset(); + // Output GPS information from previous second Serial.print("Valid fix: "); Serial.println(nmea.isValid() ? "yes" : "no"); @@ -345,12 +348,15 @@ void readGPS() { else Serial.println("not available"); + lpp.addGPS(1, latitude_mdeg, longitude_mdeg, alt); + Serial.print("Speed: "); Serial.println(nmea.getSpeed() / 1000., 3); Serial.print("Course: "); Serial.println(nmea.getCourse() / 1000., 3); Serial.println("-----------------------"); nmea.clear(); + } else {