GTI GTI / MTS-Cellular

Fork of MTS-Cellular by MultiTech

Revision:
83:d250f7f3b8ef
Parent:
82:f6c6e6c07db2
Child:
84:7587adabd8a5
--- a/Cellular/EasyIP.cpp	Tue Aug 02 16:25:26 2016 +0000
+++ b/Cellular/EasyIP.cpp	Fri Aug 26 17:09:03 2016 +0000
@@ -1,5 +1,5 @@
 //Debug is disabled by default
-#define DEBUG_ENABLE    false
+#define DEBUG_ENABLE    true
 #if DEBUG_ENABLE
 //Enable debug
 #include <cstdio>
@@ -776,6 +776,9 @@
     // Get the position information in string format.
     std::string gps = sendCommand("AT$GPSACP?", 1000);
     if(gps.find("OK") != std::string::npos) {
+        // Igal
+        DBG("GPS raw response: %s", gps);
+
         position.success = true;
         // Remove echoed AT$GPSACP and leading non position characters.
         gps.erase(0,22);
@@ -783,9 +786,6 @@
         gps.erase(gps.end()-8, gps.end());
         // Split remaining data and load into corresponding structure fields.
 
-        // Igal
-        DBG("GPS raw response: %s", gps);
-
         std::vector<std::string> gpsParts = Text::split(gps, ',');
         // Check size.
         if(gpsParts.size() != numOfFields) {