@@ -279,7 +279,7 @@ boolean SFE_UBLOX_GPS::checkUbloxI2C()
279
279
if (lsb == 0xFF )
280
280
{
281
281
// I believe this is a Ublox bug. Device should never present an 0xFF.
282
- debugPrintln ((char *)" checkUbloxI2C: Ublox bug, no bytes available" );
282
+ debugPrintln ((char *)F ( " checkUbloxI2C: Ublox bug, no bytes available" ) );
283
283
lastCheck = millis (); // Put off checking to avoid I2C bus traffic
284
284
return (false );
285
285
}
@@ -288,7 +288,7 @@ boolean SFE_UBLOX_GPS::checkUbloxI2C()
288
288
289
289
if (bytesAvailable == 0 )
290
290
{
291
- debugPrintln ((char *)" checkUbloxI2C: OK, zero bytes available" );
291
+ debugPrintln ((char *)F ( " checkUbloxI2C: OK, zero bytes available" ) );
292
292
lastCheck = millis (); // Put off checking to avoid I2C bus traffic
293
293
return (false );
294
294
}
@@ -345,7 +345,7 @@ boolean SFE_UBLOX_GPS::checkUbloxI2C()
345
345
{
346
346
if (incoming == 0x7F )
347
347
{
348
- debugPrintln ((char *)" Module not ready with data" );
348
+ debugPrintln ((char *)F ( " Module not ready with data" ) );
349
349
delay (5 ); // In logic analyzation, the module starting responding after 1.48ms
350
350
goto TRY_AGAIN;
351
351
}
@@ -573,9 +573,9 @@ void SFE_UBLOX_GPS::processUBX(uint8_t incoming, ubxPacket *incomingUBX)
573
573
printPacket (incomingUBX);
574
574
575
575
if (packetCfg.valid == true )
576
- debugPrintln ((char *)" packetCfg now valid" );
576
+ debugPrintln ((char *)F ( " packetCfg now valid" ) );
577
577
if (packetAck.valid == true )
578
- debugPrintln ((char *)" packetAck now valid" );
578
+ debugPrintln ((char *)F ( " packetAck now valid" ) );
579
579
}
580
580
581
581
processUBXpacket (incomingUBX); // We've got a valid packet, now do something with it
@@ -592,7 +592,7 @@ void SFE_UBLOX_GPS::processUBX(uint8_t incoming, ubxPacket *incomingUBX)
592
592
digitalWrite ((uint8_t )checksumFailurePin, HIGH);
593
593
}
594
594
595
- debugPrint ((char *)" Checksum failed:" );
595
+ debugPrint ((char *)F ( " Checksum failed:" ) );
596
596
_debugSerial->print (F (" checksumA: " ));
597
597
_debugSerial->print (incomingUBX->checksumA );
598
598
_debugSerial->print (F (" checksumB: " ));
@@ -640,13 +640,13 @@ void SFE_UBLOX_GPS::processUBXpacket(ubxPacket *msg)
640
640
if (msg->id == UBX_ACK_ACK && msg->payload [0 ] == packetCfg.cls && msg->payload [1 ] == packetCfg.id )
641
641
{
642
642
// The ack we just received matched the CLS/ID of last packetCfg sent (or received)
643
- debugPrintln ((char *)" UBX ACK: Command sent/ack'd successfully" );
643
+ debugPrintln ((char *)F ( " UBX ACK: Command sent/ack'd successfully" ) );
644
644
commandAck = UBX_ACK_ACK;
645
645
}
646
646
else if (msg->id == UBX_ACK_NACK && msg->payload [0 ] == packetCfg.cls && msg->payload [1 ] == packetCfg.id )
647
647
{
648
648
// The ack we just received matched the CLS/ID of last packetCfg sent
649
- debugPrintln ((char *)" UBX ACK: Not-Acknowledged" );
649
+ debugPrintln ((char *)F ( " UBX ACK: Not-Acknowledged" ) );
650
650
commandAck = UBX_ACK_NACK;
651
651
}
652
652
break ;
@@ -771,7 +771,7 @@ sfe_ublox_status_e SFE_UBLOX_GPS::sendCommand(ubxPacket outgoingUBX, uint16_t ma
771
771
retVal = sendI2cCommand (outgoingUBX, maxWait);
772
772
if (retVal != SFE_UBLOX_STATUS_SUCCESS)
773
773
{
774
- debugPrintln ((char *)" Send I2C Command failed" );
774
+ debugPrintln ((char *)F ( " Send I2C Command failed" ) );
775
775
return retVal;
776
776
}
777
777
}
@@ -785,12 +785,12 @@ sfe_ublox_status_e SFE_UBLOX_GPS::sendCommand(ubxPacket outgoingUBX, uint16_t ma
785
785
// Depending on what we just sent, either we need to look for an ACK or not
786
786
if (outgoingUBX.cls == UBX_CLASS_CFG)
787
787
{
788
- debugPrintln ((char *)" sendCommand: Waiting for ACK response" );
788
+ debugPrintln ((char *)F ( " sendCommand: Waiting for ACK response" ) );
789
789
retVal = waitForACKResponse (outgoingUBX.cls , outgoingUBX.id , maxWait); // Wait for Ack response
790
790
}
791
791
else
792
792
{
793
- debugPrintln ((char *)" sendCommand: Waiting for No ACK response" );
793
+ debugPrintln ((char *)F ( " sendCommand: Waiting for No ACK response" ) );
794
794
retVal = waitForNoACKResponse (outgoingUBX.cls , outgoingUBX.id , maxWait); // Wait for Ack response
795
795
}
796
796
}
@@ -1025,21 +1025,21 @@ sfe_ublox_status_e SFE_UBLOX_GPS::waitForACKResponse(uint8_t requestedClass, uin
1025
1025
else
1026
1026
{
1027
1027
// Reset packet and continue checking incoming data for matching cls/id
1028
- debugPrintln ((char *)" waitForACKResponse: CLS/ID mismatch, continue to wait..." );
1028
+ debugPrintln ((char *)F ( " waitForACKResponse: CLS/ID mismatch, continue to wait..." ) );
1029
1029
packetCfg.valid = false ; // This will go true when we receive a response to the packet we sent
1030
1030
}
1031
1031
}
1032
1032
else
1033
1033
{
1034
1034
// We were expecting data but didn't get a valid config packet
1035
- debugPrintln ((char *)" waitForACKResponse: Invalid config packet" );
1035
+ debugPrintln ((char *)F ( " waitForACKResponse: Invalid config packet" ) );
1036
1036
return (SFE_UBLOX_STATUS_FAIL); // We got an ACK, we're never going to get valid config data
1037
1037
}
1038
1038
}
1039
1039
else
1040
1040
{
1041
1041
// We have sent new data. We expect an ACK but no return config packet.
1042
- debugPrintln ((char *)" waitForACKResponse: New data successfully sent" );
1042
+ debugPrintln ((char *)F ( " waitForACKResponse: New data successfully sent" ) );
1043
1043
return (SFE_UBLOX_STATUS_DATA_SENT); // New data successfully sent
1044
1044
}
1045
1045
}
@@ -1062,7 +1062,7 @@ sfe_ublox_status_e SFE_UBLOX_GPS::waitForACKResponse(uint8_t requestedClass, uin
1062
1062
// Through debug warning, This command might not get an ACK
1063
1063
if (packetCfg.valid == true )
1064
1064
{
1065
- debugPrintln ((char *)" waitForACKResponse: Config was valid but ACK not received" );
1065
+ debugPrintln ((char *)F ( " waitForACKResponse: Config was valid but ACK not received" ) );
1066
1066
}
1067
1067
1068
1068
if (_printDebug == true )
@@ -1106,7 +1106,7 @@ sfe_ublox_status_e SFE_UBLOX_GPS::waitForNoACKResponse(uint8_t requestedClass, u
1106
1106
}
1107
1107
else
1108
1108
{
1109
- debugPrintln ((char *)" waitForNoACKResponse: CLS/ID match but failed CRC" );
1109
+ debugPrintln ((char *)F ( " waitForNoACKResponse: CLS/ID match but failed CRC" ) );
1110
1110
return (SFE_UBLOX_STATUS_CRC_FAIL); // We got the right packet but it was corrupt
1111
1111
}
1112
1112
}
@@ -1115,7 +1115,7 @@ sfe_ublox_status_e SFE_UBLOX_GPS::waitForNoACKResponse(uint8_t requestedClass, u
1115
1115
// Reset packet and continue checking incoming data for matching cls/id
1116
1116
if (_printDebug == true )
1117
1117
{
1118
- debugPrint ((char *)" waitForNoACKResponse: CLS/ID mismatch: " );
1118
+ debugPrint ((char *)F ( " waitForNoACKResponse: CLS/ID mismatch: " ) );
1119
1119
_debugSerial->print (F (" CLS: " ));
1120
1120
_debugSerial->print (packetCfg.cls , HEX);
1121
1121
_debugSerial->print (F (" ID: " ));
@@ -1681,7 +1681,7 @@ boolean SFE_UBLOX_GPS::setPortOutput(uint8_t portID, uint8_t outStreamSettings,
1681
1681
1682
1682
if (commandAck != UBX_ACK_ACK)
1683
1683
{
1684
- debugPrintln ((char *)" setPortOutput failed to ACK" );
1684
+ debugPrintln ((char *)F ( " setPortOutput failed to ACK" ) );
1685
1685
return (false );
1686
1686
}
1687
1687
@@ -2072,7 +2072,7 @@ boolean SFE_UBLOX_GPS::powerSaveMode(bool power_save, uint16_t maxWait)
2072
2072
*/
2073
2073
if (protVer >= 27 )
2074
2074
{
2075
- debugPrintln ((char *)" powerSaveMode (UBX-CFG-RXM) is not supported by this protocol version" );
2075
+ debugPrintln ((char *)F ( " powerSaveMode (UBX-CFG-RXM) is not supported by this protocol version" ) );
2076
2076
return (false );
2077
2077
}
2078
2078
@@ -2238,19 +2238,19 @@ boolean SFE_UBLOX_GPS::getPVT(uint16_t maxWait)
2238
2238
if (autoPVT && autoPVTImplicitUpdate)
2239
2239
{
2240
2240
// The GPS is automatically reporting, we just check whether we got unread data
2241
- debugPrintln ((char *)" getPVT: Autoreporting" );
2241
+ debugPrintln ((char *)F ( " getPVT: Autoreporting" ) );
2242
2242
checkUblox ();
2243
2243
return moduleQueried.all ;
2244
2244
}
2245
2245
else if (autoPVT && !autoPVTImplicitUpdate)
2246
2246
{
2247
2247
// Someone else has to call checkUblox for us...
2248
- debugPrintln ((char *)" getPVT: Exit immediately" );
2248
+ debugPrintln ((char *)F ( " getPVT: Exit immediately" ) );
2249
2249
return (false );
2250
2250
}
2251
2251
else
2252
2252
{
2253
- debugPrintln ((char *)" getPVT: Polling" );
2253
+ debugPrintln ((char *)F ( " getPVT: Polling" ) );
2254
2254
2255
2255
// The GPS is not automatically reporting navigation position so we have to poll explicitly
2256
2256
packetCfg.cls = UBX_CLASS_NAV;
0 commit comments