Move logNMEA into process so it does not matter if processNMEA is overwritten
This commit is contained in:
@@ -9,9 +9,6 @@
|
|||||||
This example shows how to configure the u-blox GNSS to send PVT reports automatically
|
This example shows how to configure the u-blox GNSS to send PVT reports automatically
|
||||||
and log those and any incoming NMEA messages to SD card in UBX format
|
and log those and any incoming NMEA messages to SD card in UBX format
|
||||||
|
|
||||||
** Please note: NMEA logging relies upon processNMEA **
|
|
||||||
** You will not be able to log NMEA data automatically through the library if you overwrite processNMEA with your own function **
|
|
||||||
|
|
||||||
** Please note: this example will only work on processors like the Artemis which have plenty of RAM available **
|
** Please note: this example will only work on processors like the Artemis which have plenty of RAM available **
|
||||||
|
|
||||||
This code is intended to be run on the MicroMod Data Logging Carrier Board using the Artemis Processor
|
This code is intended to be run on the MicroMod Data Logging Carrier Board using the Artemis Processor
|
||||||
|
|||||||
@@ -1243,6 +1243,10 @@ void SFE_UBLOX_GNSS::process(uint8_t incoming, ubxPacket *incomingUBX, uint8_t r
|
|||||||
}
|
}
|
||||||
else if (currentSentence == NMEA)
|
else if (currentSentence == NMEA)
|
||||||
{
|
{
|
||||||
|
//If _logNMEA is true, attempt to store incoming in the file buffer
|
||||||
|
if (_logNMEA)
|
||||||
|
storeFileBytes(&incoming, 1);
|
||||||
|
|
||||||
processNMEA(incoming); //Process each NMEA character
|
processNMEA(incoming); //Process each NMEA character
|
||||||
}
|
}
|
||||||
else if (currentSentence == RTCM)
|
else if (currentSentence == RTCM)
|
||||||
@@ -1259,10 +1263,6 @@ void SFE_UBLOX_GNSS::processNMEA(char incoming)
|
|||||||
//If user has assigned an output port then pipe the characters there
|
//If user has assigned an output port then pipe the characters there
|
||||||
if (_nmeaOutputPort != NULL)
|
if (_nmeaOutputPort != NULL)
|
||||||
_nmeaOutputPort->write(incoming); //Echo this byte to the serial port
|
_nmeaOutputPort->write(incoming); //Echo this byte to the serial port
|
||||||
|
|
||||||
//If _logNMEA is true, attempt to store incoming in the file buffer
|
|
||||||
if (_logNMEA)
|
|
||||||
storeFileBytes((uint8_t *)&incoming, 1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//We need to be able to identify an RTCM packet and then the length
|
//We need to be able to identify an RTCM packet and then the length
|
||||||
|
|||||||
Reference in New Issue
Block a user