@@ -114,7 +114,9 @@ boolean SFE_UBLOX_GPS::checkUbloxI2C()
114
114
115
115
if (bytesAvailable == 0 )
116
116
{
117
- Serial.println (" No bytes available" );
117
+ #ifdef DEBUG
118
+ debug.println (" No bytes available" );
119
+ #endif
118
120
lastCheck = millis (); // Put off checking to avoid I2C bus traffic
119
121
}
120
122
@@ -659,9 +661,9 @@ uint8_t SFE_UBLOX_GPS::getVal(uint16_t group, uint16_t id, uint8_t size, uint8_t
659
661
key |= (uint32_t )size << 28 ;
660
662
661
663
#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 ();
665
667
#endif
666
668
667
669
// Load key into outgoing payload
@@ -694,7 +696,6 @@ boolean SFE_UBLOX_GPS::setSurveyMode(uint8_t mode, uint16_t observationTime, flo
694
696
{
695
697
if (getSurveyMode () == false ) // Ask module for the current TimeMode3 settings. Loads into payloadCfg.
696
698
return (false );
697
- // Serial.println("Current settings obtained");
698
699
699
700
packetCfg.cls = UBX_CLASS_CFG;
700
701
packetCfg.id = UBX_CFG_TMODE3;
@@ -716,7 +717,6 @@ boolean SFE_UBLOX_GPS::setSurveyMode(uint8_t mode, uint16_t observationTime, flo
716
717
payloadCfg[29 ] = svinAccLimit >> 8 ;
717
718
payloadCfg[30 ] = svinAccLimit >> 16 ;
718
719
719
- // Serial.println("Sending new settings");
720
720
return ( sendCommand (packetCfg, maxWait) ); // Wait for ack
721
721
}
722
722
@@ -1141,15 +1141,15 @@ boolean SFE_UBLOX_GPS::getProtocolVersion(uint16_t maxWait)
1141
1141
return (false ); // If command send fails then bail
1142
1142
1143
1143
#ifdef DEBUG
1144
- Serial .print (" Extension " );
1145
- Serial .print (extensionNumber);
1146
- Serial .print (" : " );
1144
+ debug .print (" Extension " );
1145
+ debug .print (extensionNumber);
1146
+ debug .print (" : " );
1147
1147
for (int location = 0 ; location < MAX_PAYLOAD_SIZE ; location++)
1148
1148
{
1149
1149
if (payloadCfg[location] == ' \0 ' ) break ;
1150
- Serial .write (payloadCfg[location]);
1150
+ debug .write (payloadCfg[location]);
1151
1151
}
1152
- Serial .println ();
1152
+ debug .println ();
1153
1153
#endif
1154
1154
1155
1155
// Now we need to find "PROTVER=18.00" in the incoming byte stream
0 commit comments