@@ -114,7 +114,9 @@ boolean SFE_UBLOX_GPS::checkUbloxI2C()
114114
115115 if (bytesAvailable == 0 )
116116 {
117- Serial.println (" No bytes available" );
117+ #ifdef DEBUG
118+ debug.println (" No bytes available" );
119+ #endif
118120 lastCheck = millis (); // Put off checking to avoid I2C bus traffic
119121 }
120122
@@ -659,9 +661,9 @@ uint8_t SFE_UBLOX_GPS::getVal(uint16_t group, uint16_t id, uint8_t size, uint8_t
659661 key |= (uint32_t )size << 28 ;
660662
661663#ifdef DEBUG
662- Serial .print (" key: 0x" );
663- Serial .print (key, HEX);
664- Serial .println ();
664+ debug .print (" key: 0x" );
665+ debug .print (key, HEX);
666+ debug .println ();
665667#endif
666668
667669 // Load key into outgoing payload
@@ -694,7 +696,6 @@ boolean SFE_UBLOX_GPS::setSurveyMode(uint8_t mode, uint16_t observationTime, flo
694696{
695697 if (getSurveyMode () == false ) // Ask module for the current TimeMode3 settings. Loads into payloadCfg.
696698 return (false );
697- // Serial.println("Current settings obtained");
698699
699700 packetCfg.cls = UBX_CLASS_CFG;
700701 packetCfg.id = UBX_CFG_TMODE3;
@@ -716,7 +717,6 @@ boolean SFE_UBLOX_GPS::setSurveyMode(uint8_t mode, uint16_t observationTime, flo
716717 payloadCfg[29 ] = svinAccLimit >> 8 ;
717718 payloadCfg[30 ] = svinAccLimit >> 16 ;
718719
719- // Serial.println("Sending new settings");
720720 return ( sendCommand (packetCfg, maxWait) ); // Wait for ack
721721}
722722
@@ -1141,15 +1141,15 @@ boolean SFE_UBLOX_GPS::getProtocolVersion(uint16_t maxWait)
11411141 return (false ); // If command send fails then bail
11421142
11431143#ifdef DEBUG
1144- Serial .print (" Extension " );
1145- Serial .print (extensionNumber);
1146- Serial .print (" : " );
1144+ debug .print (" Extension " );
1145+ debug .print (extensionNumber);
1146+ debug .print (" : " );
11471147 for (int location = 0 ; location < MAX_PAYLOAD_SIZE ; location++)
11481148 {
11491149 if (payloadCfg[location] == ' \0 ' ) break ;
1150- Serial .write (payloadCfg[location]);
1150+ debug .write (payloadCfg[location]);
11511151 }
1152- Serial .println ();
1152+ debug .println ();
11531153#endif
11541154
11551155 // Now we need to find "PROTVER=18.00" in the incoming byte stream
0 commit comments