Skip to content

Commit ae14ea7

Browse files
committed
Set main talker ID before/after NTRIP Client
1 parent a55d1ca commit ae14ea7

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

Firmware/RTK_Surveyor/Rover.ino

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,10 @@ bool configureUbloxModuleRover()
6666
if (response == false)
6767
Serial.println(F("Disable RTCM failed"));
6868

69+
response = i2cGNSS.setMainTalkerID(SFE_UBLOX_MAIN_TALKER_ID_GN); //Turn GNGGA back on after NTRIP Client
70+
if (response == false)
71+
Serial.println(F("setMainTalkerID failed"));
72+
6973
response = setNMEASettings(); //Enable high precision NMEA and extended sentences
7074
if (response == false)
7175
Serial.println(F("setNMEASettings failed"));
@@ -353,13 +357,10 @@ void storeHPdata(UBX_NAV_HPPOSLLH_data_t *ubxDataStruct)
353357
void pushGPGGA(NMEA_GGA_data_t *nmeaData)
354358
{
355359
#ifdef COMPILE_WIFI
356-
log_d("GGA called");
357-
358360
//Provide the caster with our current position as needed
359361
if ((ntripClient.connected() == true) && (settings.ntripClient_TransmitGGA == true))
360362
{
361-
Serial.printf("Pushing GGA to server: %s\n\r", nmeaData->nmea); //nmea is printable (NULL-terminated) and already has \r\n on the end
362-
//log_d("Pushing GGA to server: %s", nmeaData->nmea); //nmea is printable (NULL-terminated) and already has \r\n on the end
363+
log_d("Pushing GGA to server: %s", nmeaData->nmea); //nmea is printable (NULL-terminated) and already has \r\n on the end
363364

364365
ntripClient.print((const char *)nmeaData->nmea); //Push our current GGA sentence to caster
365366
}

Firmware/RTK_Surveyor/States.ino

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,9 @@ void updateSystemState()
136136

137137
i2cGNSS.setNMEAGPGGAcallbackPtr(&pushGPGGA); // Set up the callback for GPGGA
138138

139-
i2cGNSS.enableNMEAMessage(UBX_NMEA_GGA, COM_PORT_I2C, 10); // Tell the module to output GGA every 10 seconds
139+
float measurementFrequency = (1000.0 / settings.measurementRate) / settings.navigationRate;
140+
141+
i2cGNSS.enableNMEAMessage(UBX_NMEA_GGA, COM_PORT_I2C, measurementFrequency * 10); // Tell the module to output GGA every 10 seconds
140142

141143
changeState(STATE_ROVER_CLIENT_WIFI_CONNECTED);
142144
}

0 commit comments

Comments
 (0)