Skip to content

Commit 505bffd

Browse files
authored
Update SparkFun_u-blox_GNSS_Arduino_Library.cpp
1 parent 286670c commit 505bffd

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/SparkFun_u-blox_GNSS_Arduino_Library.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1527,6 +1527,8 @@ uint16_t SFE_UBLOX_GNSS::getMaxPayloadSize(uint8_t Class, uint8_t ID)
15271527
// Take a given byte and file it into the proper array
15281528
void SFE_UBLOX_GNSS::process(uint8_t incoming, ubxPacket *incomingUBX, uint8_t requestedClass, uint8_t requestedID)
15291529
{
1530+
if (_outputPort != NULL)
1531+
_outputPort->write(incoming); // Echo this byte to the serial port
15301532
if ((currentSentence == NONE) || (currentSentence == NMEA))
15311533
{
15321534
if (incoming == UBX_SYNCH_1) // UBX binary frames start with 0xB5, aka μ
@@ -6449,6 +6451,11 @@ void SFE_UBLOX_GNSS::setNMEAOutputPort(Stream &nmeaOutputPort)
64496451
_nmeaOutputPort = &nmeaOutputPort; // Store the port from user
64506452
}
64516453

6454+
void SFE_UBLOX_GNSS::setOutputPort(Stream &outputPort)
6455+
{
6456+
_outputPort = &outputPort; // Store the port from user
6457+
}
6458+
64526459
// Reset to defaults
64536460

64546461
void SFE_UBLOX_GNSS::factoryReset()

0 commit comments

Comments
 (0)