From 669b88c9be37f4e86d23308020983d17a14e4426 Mon Sep 17 00:00:00 2001 From: Sara Damiano Date: Tue, 18 Feb 2020 15:21:13 -0500 Subject: [PATCH] Changed printout again Signed-off-by: Sara Damiano --- examples/AllFunctions/AllFunctions.ino | 13 +++++++------ src/TinyGsmGPRS.tpp | 3 --- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/examples/AllFunctions/AllFunctions.ino b/examples/AllFunctions/AllFunctions.ino index 7c6cfa2..7582ae7 100644 --- a/examples/AllFunctions/AllFunctions.ino +++ b/examples/AllFunctions/AllFunctions.ino @@ -330,7 +330,7 @@ void loop() { int min = 0; int sec = 0; for (int8_t i = 5; i; i--) { - DBG("Waiting for GSM location"); + DBG("Requesting current GSM location"); if (modem.getGsmLocation(&lat, &lon, &accuracy, &year, &month, &day, &hour, &min, &sec)) { DBG("Latitude:", String(lat, 8), "\tLongitude:", String(lon, 8)); @@ -342,14 +342,14 @@ void loop() { DBG("Couldn't get GSM location, retrying in 15s."); delay(15000L); } + } DBG("Retrieving GSM location again as a string"); String location = modem.getGsmLocation(); DBG("GSM Based Location String:", location); - } #endif #if TINY_GSM_TEST_GPS && defined TINY_GSM_MODEM_HAS_GPS - DBG("Enabling GPS/GNSS/GLONASS"); + DBG("Enabling GPS/GNSS/GLONASS and waiting 15s for warm-up"); modem.enableGPS(); delay(15000L); float lat2 = 0; @@ -366,7 +366,7 @@ void loop() { int min2 = 0; int sec2 = 0; for (int8_t i = 5; i; i--) { - DBG("Waiting for GPS/GNSS/GLONASS location"); + DBG("Requesting current GPS/GNSS/GLONASS location"); if (modem.getGPS(&lat2, &lon2, &speed2, &alt2, &vsat2, &usat2, &accuracy2, &year2, &month2, &day2, &hour2, &min2, &sec2)) { DBG("Latitude:", String(lat2, 8), "\tLongitude:", String(lon2, 8)); @@ -380,10 +380,11 @@ void loop() { DBG("Couldn't get GPS/GNSS/GLONASS location, retrying in 15s."); delay(15000L); } + } DBG("Retrieving GPS/GNSS/GLONASS location again as a string"); String gps_raw = modem.getGPSraw(); DBG("GPS/GNSS Based Location String:", gps_raw); - } + DBG("Disabling GPS"); modem.disableGPS(); #endif @@ -407,10 +408,10 @@ void loop() { DBG("Couldn't get network time, retrying in 15s."); delay(15000L); } + } DBG("Retrieving time again as a string"); String time = modem.getGSMDateTime(DATE_FULL); DBG("Current Network Time:", time); - } #endif #if TINY_GSM_TEST_GPRS diff --git a/src/TinyGsmGPRS.tpp b/src/TinyGsmGPRS.tpp index f7321a7..c3ad5e0 100644 --- a/src/TinyGsmGPRS.tpp +++ b/src/TinyGsmGPRS.tpp @@ -146,9 +146,6 @@ class TinyGsmGPRS { * GPRS functions */ protected: - bool thisHasGPRS() { - return true; - } // Checks if current attached to GPRS/EPS service bool isGprsConnectedImpl() { thisModem().sendAT(GF("+CGATT?"));