Marc BUSSON / C027_Support

Fork of C027_Support by u-blox

Files at this revision

API Documentation at this revision

Comitter:
Prez
Date:
Mon Oct 03 12:14:48 2016 +0000
Parent:
138:dafbbf31bf76
Commit message:
Change in MDM.h to allow compile on all platforms & updated powerOff in GPS.cpp to work with M8 GPS

Changed in this revision

GPS.cpp Show annotated file Show diff for this revision Revisions of this file
MDM.cpp Show annotated file Show diff for this revision Revisions of this file
MDM.h Show annotated file Show diff for this revision Revisions of this file
--- a/GPS.cpp	Thu Feb 25 13:22:34 2016 +0000
+++ b/GPS.cpp	Mon Oct 03 12:14:48 2016 +0000
@@ -8,8 +8,11 @@
 void GPSParser::powerOff(void)
 {
     // set the gps into backup mode using the command RMX-LPREQ
-    struct { unsigned long dur; unsigned long flags; } msg = {0/*endless*/,0/*backup*/};
+    //struct { unsigned long dur; unsigned long flags; } msg = {0/*endless*/,0/*backup*/};
+    // updated for M8
+    struct { unsigned long dur; unsigned long flags; } msg = {0, 2};
     sendUbx(0x02, 0x41, &msg, sizeof(msg));
+    
 }
 
 int GPSParser::_getMessage(Pipe<char>* pipe, char* buf, int len)
--- a/MDM.cpp	Thu Feb 25 13:22:34 2016 +0000
+++ b/MDM.cpp	Mon Oct 03 12:14:48 2016 +0000
@@ -2038,6 +2038,8 @@
 // ----------------------------------------------------------------
 bool MDMParser::setDebug(int level) 
 {
+    int _debugLevel = 0; // to compile on all platforms
+    //int _debugLevel = 0;
 #ifdef MDM_DEBUG
     _debugLevel = (level < -1) ? -1 : 
                   (level >  3) ?  3 : 
@@ -2347,4 +2349,4 @@
 
 int MDMUsb::getLine(char* buffer, int length)    { return NOT_FOUND; }
 
-#endif
\ No newline at end of file
+#endif
--- a/MDM.h	Thu Feb 25 13:22:34 2016 +0000
+++ b/MDM.h	Mon Oct 03 12:14:48 2016 +0000
@@ -6,6 +6,8 @@
 #include "Pipe.h"
 #include "SerialPipe.h"
 
+
+
 #ifdef TARGET_UBLOX_C027 
  // you can change this is you like to use a shield even on the C027
  #define MDM_IF(onboard,shield) onboard
@@ -760,8 +762,9 @@
 #ifdef TARGET_UBLOX_C027
     bool _onboard;
 #endif
+    
 #ifdef MDM_DEBUG
-    int _debugLevel;
+   
     Timer _debugTime;
     void _debugPrint(int level, const char* color, const char* format, ...);
 #endif