Skip to content

Release candidate #110

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Feb 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,9 @@ void setup()
if (ok) ok = myGNSS.setDGNSSConfiguration(SFE_UBLOX_DGNSS_MODE_FIXED); // Set the differential mode - ambiguities are fixed whenever possible

if (ok) ok = myGNSS.setNavigationFrequency(1); //Set output in Hz.


if (ok) ok = myGNSS.setVal8(UBLOX_CFG_SPARTN_USE_SOURCE, 1); // use LBAND PMP message

//Configure the SPARTN IP Dynamic Keys
//"When the receiver boots, the host should send 'current' and 'next' keys in one message." - Use setDynamicSPARTNKeys for this.
//"Every time the 'current' key is expired, 'next' takes its place."
Expand Down
7 changes: 7 additions & 0 deletions src/SparkFun_u-blox_GNSS_Arduino_Library.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1527,6 +1527,8 @@ uint16_t SFE_UBLOX_GNSS::getMaxPayloadSize(uint8_t Class, uint8_t ID)
// Take a given byte and file it into the proper array
void SFE_UBLOX_GNSS::process(uint8_t incoming, ubxPacket *incomingUBX, uint8_t requestedClass, uint8_t requestedID)
{
if (_outputPort != NULL)
_outputPort->write(incoming); // Echo this byte to the serial port
if ((currentSentence == NONE) || (currentSentence == NMEA))
{
if (incoming == UBX_SYNCH_1) // UBX binary frames start with 0xB5, aka μ
Expand Down Expand Up @@ -6451,6 +6453,11 @@ void SFE_UBLOX_GNSS::setNMEAOutputPort(Stream &nmeaOutputPort)
_nmeaOutputPort = &nmeaOutputPort; // Store the port from user
}

void SFE_UBLOX_GNSS::setOutputPort(Stream &outputPort)
{
_outputPort = &outputPort; // Store the port from user
}

// Reset to defaults

void SFE_UBLOX_GNSS::factoryReset()
Expand Down
3 changes: 2 additions & 1 deletion src/SparkFun_u-blox_GNSS_Arduino_Library.h
Original file line number Diff line number Diff line change
Expand Up @@ -809,6 +809,7 @@ class SFE_UBLOX_GNSS
bool setUSBOutput(uint8_t comSettings, uint16_t maxWait = defaultMaxWait); // Configure USB port to output UBX, NMEA, RTCM3, SPARTN or a combination thereof
bool setSPIOutput(uint8_t comSettings, uint16_t maxWait = defaultMaxWait); // Configure SPI port to output UBX, NMEA, RTCM3, SPARTN or a combination thereof
void setNMEAOutputPort(Stream &nmeaOutputPort); // Sets the internal variable for the port to direct NMEA characters to
void setOutputPort(Stream &outputPort); // Sets the internal variable for the port to direct ALL characters to

// Reset to defaults

Expand Down Expand Up @@ -1562,7 +1563,7 @@ class SFE_UBLOX_GNSS
Stream *_serialPort; // The generic connection to user's chosen Serial hardware
Stream *_nmeaOutputPort = NULL; // The user can assign an output port to print NMEA sentences if they wish
Stream *_debugSerial; // The stream to send debug messages to if enabled

Stream *_outputPort = NULL;
SPIClass *_spiPort; // The instance of SPIClass
uint8_t _csPin; // The chip select pin
uint32_t _spiSpeed; // The speed to use for SPI (Hz)
Expand Down