Skip to content

Commit b6c949a

Browse files
authored
Merge pull request #17 from sparkfun/release_candidate
Version 3.0.7
2 parents a1728f6 + 9df0b57 commit b6c949a

File tree

28 files changed

+333
-196
lines changed

28 files changed

+333
-196
lines changed

examples/AssistNow/AssistNow_Online/Example5_AssistNowOnline_MQTT/Example5_AssistNowOnline_MQTT.ino

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ void setup()
5050

5151
Wire.begin(); //Start I2C
5252

53+
//myGNSS.enableDebugging(); //Uncomment this line to enable helpful debug messages on Serial
54+
5355
if (myGNSS.begin() == false) //Connect to the Ublox module using Wire port
5456
{
5557
Serial.println(F("u-blox GPS not detected at default I2C address. Please check wiring. Freezing."));
@@ -58,7 +60,7 @@ void setup()
5860

5961
Serial.println(F("u-blox module connected"));
6062
myGNSS.setI2COutput(COM_TYPE_UBX); //Turn off NMEA noise
61-
myGNSS.setI2CInput(COM_TYPE_UBX | COM_TYPE_NMEA | COM_TYPE_SPARTN);
63+
myGNSS.setI2CInput(COM_TYPE_UBX | COM_TYPE_NMEA);
6264

6365
myGNSS.setNavigationFrequency(1); //Set output in Hz.
6466

@@ -106,6 +108,8 @@ void mqttMessageHandler(int messageSize)
106108
Serial.print(mqttClient.messageTopic());
107109
Serial.println(F(" topic to ZED"));
108110

111+
uint16_t mqttTotal = 0;
112+
109113
while (mqttClient.available())
110114
{
111115
uint16_t mqttCount = 0;
@@ -122,12 +126,17 @@ void mqttMessageHandler(int messageSize)
122126

123127
if (mqttCount > 0)
124128
{
125-
//Push KEYS or SPARTN data to GNSS module over I2C
129+
//Push AssistNow data to GNSS module over I2C
126130
myGNSS.pushRawData(mqttData, mqttCount, false);
127131
lastReceived_ms = millis();
132+
mqttTotal += mqttCount;
128133
}
129134
}
130135

136+
Serial.print(F("Pushed "));
137+
Serial.print(mqttTotal);
138+
Serial.println(F(" bytes to ZED"));
139+
131140
delete[] mqttData;
132141
}
133142

examples/Automatic_NMEA/Example1_getLatestNMEAGPGGA/Example1_getLatestNMEAGPGGA.ino

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,12 @@ void setup()
6060
//Disable or enable various NMEA sentences over the I2C interface
6161
myGNSS.setI2COutput(COM_TYPE_NMEA | COM_TYPE_UBX); // Turn on both UBX and NMEA sentences on I2C. (Turn off RTCM and SPARTN)
6262
myGNSS.newCfgValset(VAL_LAYER_RAM_BBR); // Use cfgValset to disable / enable individual NMEA messages
63-
myGNSS.addCfgValset8(UBLOX_CFG_MSGOUT_NMEA_ID_GLL_I2C, 0); // Several of these are on by default so let's disable them
64-
myGNSS.addCfgValset8(UBLOX_CFG_MSGOUT_NMEA_ID_GSA_I2C, 0);
65-
myGNSS.addCfgValset8(UBLOX_CFG_MSGOUT_NMEA_ID_GSV_I2C, 0);
66-
myGNSS.addCfgValset8(UBLOX_CFG_MSGOUT_NMEA_ID_RMC_I2C, 0);
67-
myGNSS.addCfgValset8(UBLOX_CFG_MSGOUT_NMEA_ID_VTG_I2C, 0);
68-
myGNSS.addCfgValset8(UBLOX_CFG_MSGOUT_NMEA_ID_GGA_I2C, 1); // Leave only GGA enabled at current navigation rate
63+
myGNSS.addCfgValset(UBLOX_CFG_MSGOUT_NMEA_ID_GLL_I2C, 0); // Several of these are on by default so let's disable them
64+
myGNSS.addCfgValset(UBLOX_CFG_MSGOUT_NMEA_ID_GSA_I2C, 0);
65+
myGNSS.addCfgValset(UBLOX_CFG_MSGOUT_NMEA_ID_GSV_I2C, 0);
66+
myGNSS.addCfgValset(UBLOX_CFG_MSGOUT_NMEA_ID_RMC_I2C, 0);
67+
myGNSS.addCfgValset(UBLOX_CFG_MSGOUT_NMEA_ID_VTG_I2C, 0);
68+
myGNSS.addCfgValset(UBLOX_CFG_MSGOUT_NMEA_ID_GGA_I2C, 1); // Leave only GGA enabled at current navigation rate
6969
if (myGNSS.sendCfgValset()) // Send the configuration VALSET
7070
Serial.println(F("NMEA messages were configured successfully"));
7171
else

examples/Automatic_NMEA/Example2_NMEA_GGA_Callbacks/Example2_NMEA_GGA_Callbacks.ino

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -85,12 +85,12 @@ void setup()
8585
// Disable or enable various NMEA sentences over the I2C interface
8686
myGNSS.setI2COutput(COM_TYPE_NMEA | COM_TYPE_UBX); // Turn on both UBX and NMEA sentences on I2C. (Turn off RTCM and SPARTN)
8787
myGNSS.newCfgValset(VAL_LAYER_RAM_BBR); // Use cfgValset to disable / enable individual NMEA messages
88-
myGNSS.addCfgValset8(UBLOX_CFG_MSGOUT_NMEA_ID_GLL_I2C, 0); // Several of these are on by default so let's disable them
89-
myGNSS.addCfgValset8(UBLOX_CFG_MSGOUT_NMEA_ID_GSA_I2C, 0);
90-
myGNSS.addCfgValset8(UBLOX_CFG_MSGOUT_NMEA_ID_GSV_I2C, 0);
91-
myGNSS.addCfgValset8(UBLOX_CFG_MSGOUT_NMEA_ID_RMC_I2C, 0);
92-
myGNSS.addCfgValset8(UBLOX_CFG_MSGOUT_NMEA_ID_VTG_I2C, 0);
93-
myGNSS.addCfgValset8(UBLOX_CFG_MSGOUT_NMEA_ID_GGA_I2C, 1); // Leave only GGA enabled at current navigation rate
88+
myGNSS.addCfgValset(UBLOX_CFG_MSGOUT_NMEA_ID_GLL_I2C, 0); // Several of these are on by default so let's disable them
89+
myGNSS.addCfgValset(UBLOX_CFG_MSGOUT_NMEA_ID_GSA_I2C, 0);
90+
myGNSS.addCfgValset(UBLOX_CFG_MSGOUT_NMEA_ID_GSV_I2C, 0);
91+
myGNSS.addCfgValset(UBLOX_CFG_MSGOUT_NMEA_ID_RMC_I2C, 0);
92+
myGNSS.addCfgValset(UBLOX_CFG_MSGOUT_NMEA_ID_VTG_I2C, 0);
93+
myGNSS.addCfgValset(UBLOX_CFG_MSGOUT_NMEA_ID_GGA_I2C, 1); // Leave only GGA enabled at current navigation rate
9494
if (myGNSS.sendCfgValset()) // Send the configuration VALSET
9595
Serial.println(F("NMEA messages were configured successfully"));
9696
else

examples/Automatic_NMEA/Example3_getLatestNMEA_GPGGA-VTG-RMC-ZDA/Example3_getLatestNMEA_GPGGA-VTG-RMC-ZDA.ino

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,13 @@ void setup()
5858
//Disable or enable various NMEA sentences over the I2C interface
5959
myGNSS.setI2COutput(COM_TYPE_NMEA | COM_TYPE_UBX); // Turn on both UBX and NMEA sentences on I2C. (Turn off RTCM and SPARTN)
6060
myGNSS.newCfgValset(VAL_LAYER_RAM_BBR); // Use cfgValset to disable / enable individual NMEA messages
61-
myGNSS.addCfgValset8(UBLOX_CFG_MSGOUT_NMEA_ID_GLL_I2C, 0);
62-
myGNSS.addCfgValset8(UBLOX_CFG_MSGOUT_NMEA_ID_GSA_I2C, 0);
63-
myGNSS.addCfgValset8(UBLOX_CFG_MSGOUT_NMEA_ID_GSV_I2C, 0);
64-
myGNSS.addCfgValset8(UBLOX_CFG_MSGOUT_NMEA_ID_RMC_I2C, 1);
65-
myGNSS.addCfgValset8(UBLOX_CFG_MSGOUT_NMEA_ID_VTG_I2C, 1);
66-
myGNSS.addCfgValset8(UBLOX_CFG_MSGOUT_NMEA_ID_GGA_I2C, 1);
67-
myGNSS.addCfgValset8(UBLOX_CFG_MSGOUT_NMEA_ID_ZDA_I2C, 1);
61+
myGNSS.addCfgValset(UBLOX_CFG_MSGOUT_NMEA_ID_GLL_I2C, 0);
62+
myGNSS.addCfgValset(UBLOX_CFG_MSGOUT_NMEA_ID_GSA_I2C, 0);
63+
myGNSS.addCfgValset(UBLOX_CFG_MSGOUT_NMEA_ID_GSV_I2C, 0);
64+
myGNSS.addCfgValset(UBLOX_CFG_MSGOUT_NMEA_ID_RMC_I2C, 1);
65+
myGNSS.addCfgValset(UBLOX_CFG_MSGOUT_NMEA_ID_VTG_I2C, 1);
66+
myGNSS.addCfgValset(UBLOX_CFG_MSGOUT_NMEA_ID_GGA_I2C, 1);
67+
myGNSS.addCfgValset(UBLOX_CFG_MSGOUT_NMEA_ID_ZDA_I2C, 1);
6868
if (myGNSS.sendCfgValset()) // Send the configuration VALSET
6969
Serial.println(F("NMEA messages were configured successfully"));
7070
else

examples/Automatic_NMEA/Example4_NMEA_GGA_VTG_RMC_ZDA_Callbacks/Example4_NMEA_GGA_VTG_RMC_ZDA_Callbacks.ino

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -173,13 +173,13 @@ void setup()
173173
// Disable or enable various NMEA sentences over the I2C interface
174174
myGNSS.setI2COutput(COM_TYPE_NMEA | COM_TYPE_UBX); // Turn on both UBX and NMEA sentences on I2C. (Turn off RTCM and SPARTN)
175175
myGNSS.newCfgValset(VAL_LAYER_RAM_BBR); // Use cfgValset to disable / enable individual NMEA messages
176-
myGNSS.addCfgValset8(UBLOX_CFG_MSGOUT_NMEA_ID_GLL_I2C, 0);
177-
myGNSS.addCfgValset8(UBLOX_CFG_MSGOUT_NMEA_ID_GSA_I2C, 0);
178-
myGNSS.addCfgValset8(UBLOX_CFG_MSGOUT_NMEA_ID_GSV_I2C, 0);
179-
myGNSS.addCfgValset8(UBLOX_CFG_MSGOUT_NMEA_ID_RMC_I2C, 1);
180-
myGNSS.addCfgValset8(UBLOX_CFG_MSGOUT_NMEA_ID_VTG_I2C, 1);
181-
myGNSS.addCfgValset8(UBLOX_CFG_MSGOUT_NMEA_ID_GGA_I2C, 1);
182-
myGNSS.addCfgValset8(UBLOX_CFG_MSGOUT_NMEA_ID_ZDA_I2C, 1);
176+
myGNSS.addCfgValset(UBLOX_CFG_MSGOUT_NMEA_ID_GLL_I2C, 0);
177+
myGNSS.addCfgValset(UBLOX_CFG_MSGOUT_NMEA_ID_GSA_I2C, 0);
178+
myGNSS.addCfgValset(UBLOX_CFG_MSGOUT_NMEA_ID_GSV_I2C, 0);
179+
myGNSS.addCfgValset(UBLOX_CFG_MSGOUT_NMEA_ID_RMC_I2C, 1);
180+
myGNSS.addCfgValset(UBLOX_CFG_MSGOUT_NMEA_ID_VTG_I2C, 1);
181+
myGNSS.addCfgValset(UBLOX_CFG_MSGOUT_NMEA_ID_GGA_I2C, 1);
182+
myGNSS.addCfgValset(UBLOX_CFG_MSGOUT_NMEA_ID_ZDA_I2C, 1);
183183
if (myGNSS.sendCfgValset()) // Send the configuration VALSET
184184
Serial.println(F("NMEA messages were configured successfully"));
185185
else

examples/Basics/Example23_TimePulseParameters/Example23_TimePulse_BulletTime/Example23_TimePulse_BulletTime.ino

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -63,13 +63,13 @@ void setup()
6363
// Let's say that we want our pulse-per-second to be as accurate as possible. So, let's tell the module
6464
// to generate no signal while it is _locking_ to GNSS time. We want the signal to start only when the module is
6565
// _locked_ to GNSS time.
66-
myGNSS.addCfgValset32(UBLOX_CFG_TP_PERIOD_TP1, 0); // Set the period to zero
67-
myGNSS.addCfgValset32(UBLOX_CFG_TP_LEN_TP1, 0); // Set the pulse length to zero
66+
myGNSS.addCfgValset(UBLOX_CFG_TP_PERIOD_TP1, 0); // Set the period to zero
67+
myGNSS.addCfgValset(UBLOX_CFG_TP_LEN_TP1, 0); // Set the pulse length to zero
6868

6969
// When the module is _locked_ to GNSS time, make it generate a 0.1 second pulse once per second
70-
myGNSS.addCfgValset32(UBLOX_CFG_TP_PERIOD_LOCK_TP1, 1000000); // Set the period to 1,000,000 us
71-
myGNSS.addCfgValset32(UBLOX_CFG_TP_LEN_LOCK_TP1, 100000); // Set the pulse length to 0.1s (100,000 us)
72-
myGNSS.addCfgValset8(UBLOX_CFG_TP_POL_TP1, 1); // Set the polarity to "1" (high for 0.1s, low for 0.9s, rising edge at top of second)
70+
myGNSS.addCfgValset(UBLOX_CFG_TP_PERIOD_LOCK_TP1, 1000000); // Set the period to 1,000,000 us
71+
myGNSS.addCfgValset(UBLOX_CFG_TP_LEN_LOCK_TP1, 100000); // Set the pulse length to 0.1s (100,000 us)
72+
myGNSS.addCfgValset(UBLOX_CFG_TP_POL_TP1, 1); // Set the polarity to "1" (high for 0.1s, low for 0.9s, rising edge at top of second)
7373

7474
// We can use CFG_TP_USER_DELAY to delay the pulse for each camera. The delay needs to be negative for this example.
7575
// We can delay the pulse by +/- 2^31 nanoseconds (+/- 2.147 seconds).
@@ -85,12 +85,12 @@ void setup()
8585
//converter32.signed32 = -700000000; // Camera 8: delay the pulse by 0.7s (700,000,000 ns)
8686
//converter32.signed32 = -800000000; // Camera 9: delay the pulse by 0.8s (800,000,000 ns)
8787
//converter32.signed32 = -900000000; // Camera 10: delay the pulse by 0.9s (900,000,000 ns)
88-
myGNSS.addCfgValset32(UBLOX_CFG_TP_USER_DELAY_TP1, converter32.unsigned32); // Avoid any ambiguity by using converter32 to convert from signed to unsigned
88+
myGNSS.addCfgValset(UBLOX_CFG_TP_USER_DELAY_TP1, converter32.unsigned32); // Avoid any ambiguity by using converter32 to convert from signed to unsigned
8989

90-
myGNSS.addCfgValset8(UBLOX_CFG_TP_TP1_ENA, 1); // Make sure the enable flag is set to enable the time pulse. (Set to 0 to disable.)
91-
myGNSS.addCfgValset8(UBLOX_CFG_TP_USE_LOCKED_TP1, 1); // Tell the module to use PERIOD while locking and PERIOD_LOCK when locked to GNSS time
92-
myGNSS.addCfgValset8(UBLOX_CFG_TP_PULSE_DEF, 0); // Tell the module that we want to set the period (not the frequency). PERIOD = 0. FREQ = 1.
93-
myGNSS.addCfgValset8(UBLOX_CFG_TP_PULSE_LENGTH_DEF, 1); // Tell the module to set the pulse length (not the pulse ratio / duty). RATIO = 0. LENGTH = 1.
90+
myGNSS.addCfgValset(UBLOX_CFG_TP_TP1_ENA, 1); // Make sure the enable flag is set to enable the time pulse. (Set to 0 to disable.)
91+
myGNSS.addCfgValset(UBLOX_CFG_TP_USE_LOCKED_TP1, 1); // Tell the module to use PERIOD while locking and PERIOD_LOCK when locked to GNSS time
92+
myGNSS.addCfgValset(UBLOX_CFG_TP_PULSE_DEF, 0); // Tell the module that we want to set the period (not the frequency). PERIOD = 0. FREQ = 1.
93+
myGNSS.addCfgValset(UBLOX_CFG_TP_PULSE_LENGTH_DEF, 1); // Tell the module to set the pulse length (not the pulse ratio / duty). RATIO = 0. LENGTH = 1.
9494

9595
// Now set the time pulse parameters
9696
if (myGNSS.sendCfgValset() == false)

examples/Basics/Example23_TimePulseParameters/Example23_TimePulse_Frequency/Example23_TimePulse_Frequency.ino

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -60,18 +60,18 @@ void setup()
6060
myGNSS.newCfgValset(VAL_LAYER_RAM); // Create a new Configuration Interface VALSET message. Apply the changes in RAM only (not BBR).
6161

6262
// While the module is _locking_ to GNSS time, make it generate 2kHz
63-
myGNSS.addCfgValset32(UBLOX_CFG_TP_FREQ_TP1, 2000); // Set the frequency to 2000Hz
64-
myGNSS.addCfgValsetDouble(UBLOX_CFG_TP_DUTY_TP1, 100.0 / 3.0); // Set the pulse ratio / duty to 33.333% to produce 33.333:66.666 mark:space
63+
myGNSS.addCfgValset(UBLOX_CFG_TP_FREQ_TP1, 2000); // Set the frequency to 2000Hz
64+
myGNSS.addCfgValset(UBLOX_CFG_TP_DUTY_TP1, 100.0 / 3.0); // Set the pulse ratio / duty to 33.333% to produce 33.333:66.666 mark:space
6565

6666
// When the module is _locked_ to GNSS time, make it generate 1kHz
67-
myGNSS.addCfgValset32(UBLOX_CFG_TP_FREQ_LOCK_TP1, 1000); // Set the frequency to 1000Hz
68-
myGNSS.addCfgValsetDouble(UBLOX_CFG_TP_DUTY_LOCK_TP1, 50.0); // Set the pulse ratio / duty to 50% to produce 50:50 mark:space
69-
70-
myGNSS.addCfgValset8(UBLOX_CFG_TP_TP1_ENA, 1); // Make sure the enable flag is set to enable the time pulse. (Set to 0 to disable.)
71-
myGNSS.addCfgValset8(UBLOX_CFG_TP_USE_LOCKED_TP1, 1); // Tell the module to use FREQ while locking and FREQ_LOCK when locked to GNSS time
72-
myGNSS.addCfgValset8(UBLOX_CFG_TP_PULSE_DEF, 1); // Tell the module that we want to set the frequency (not the period). PERIOD = 0. FREQ = 1.
73-
myGNSS.addCfgValset8(UBLOX_CFG_TP_PULSE_LENGTH_DEF, 0); // Tell the module to set the pulse ratio / duty (not the pulse length). RATIO = 0. LENGTH = 1.
74-
myGNSS.addCfgValset8(UBLOX_CFG_TP_POL_TP1, 1); // Tell the module that we want the rising edge at the top of second. Falling Edge = 0. Rising Edge = 1.
67+
myGNSS.addCfgValset(UBLOX_CFG_TP_FREQ_LOCK_TP1, 1000); // Set the frequency to 1000Hz
68+
myGNSS.addCfgValset(UBLOX_CFG_TP_DUTY_LOCK_TP1, 50.0); // Set the pulse ratio / duty to 50% to produce 50:50 mark:space
69+
70+
myGNSS.addCfgValset(UBLOX_CFG_TP_TP1_ENA, 1); // Make sure the enable flag is set to enable the time pulse. (Set to 0 to disable.)
71+
myGNSS.addCfgValset(UBLOX_CFG_TP_USE_LOCKED_TP1, 1); // Tell the module to use FREQ while locking and FREQ_LOCK when locked to GNSS time
72+
myGNSS.addCfgValset(UBLOX_CFG_TP_PULSE_DEF, 1); // Tell the module that we want to set the frequency (not the period). PERIOD = 0. FREQ = 1.
73+
myGNSS.addCfgValset(UBLOX_CFG_TP_PULSE_LENGTH_DEF, 0); // Tell the module to set the pulse ratio / duty (not the pulse length). RATIO = 0. LENGTH = 1.
74+
myGNSS.addCfgValset(UBLOX_CFG_TP_POL_TP1, 1); // Tell the module that we want the rising edge at the top of second. Falling Edge = 0. Rising Edge = 1.
7575

7676
// Now set the time pulse parameters
7777
if (myGNSS.sendCfgValset() == false)

examples/Basics/Example23_TimePulseParameters/Example23_TimePulse_Period/Example23_TimePulse_Period.ino

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -63,18 +63,18 @@ void setup()
6363
// Let's say that we want our 1 pulse every 30 seconds to be as accurate as possible. So, let's tell the module
6464
// to generate no signal while it is _locking_ to GNSS time. We want the signal to start only when the module is
6565
// _locked_ to GNSS time.
66-
myGNSS.addCfgValset32(UBLOX_CFG_TP_PERIOD_TP1, 0); // Set the period to zero
67-
myGNSS.addCfgValset32(UBLOX_CFG_TP_LEN_TP1, 0); // Set the pulse length to zero
66+
myGNSS.addCfgValset(UBLOX_CFG_TP_PERIOD_TP1, 0); // Set the period to zero
67+
myGNSS.addCfgValset(UBLOX_CFG_TP_LEN_TP1, 0); // Set the pulse length to zero
6868

6969
// When the module is _locked_ to GNSS time, make it generate a 1 second pulse every 30 seconds
70-
myGNSS.addCfgValset32(UBLOX_CFG_TP_PERIOD_LOCK_TP1, 30000000); // Set the period to 30,000,000 us
71-
myGNSS.addCfgValset32(UBLOX_CFG_TP_LEN_LOCK_TP1, 1000000); // Set the pulse length to 1,000,000 us
72-
73-
myGNSS.addCfgValset8(UBLOX_CFG_TP_TP1_ENA, 1); // Make sure the enable flag is set to enable the time pulse. (Set to 0 to disable.)
74-
myGNSS.addCfgValset8(UBLOX_CFG_TP_USE_LOCKED_TP1, 1); // Tell the module to use PERIOD while locking and PERIOD_LOCK when locked to GNSS time
75-
myGNSS.addCfgValset8(UBLOX_CFG_TP_PULSE_DEF, 0); // Tell the module that we want to set the period (not the frequency). PERIOD = 0. FREQ = 1.
76-
myGNSS.addCfgValset8(UBLOX_CFG_TP_PULSE_LENGTH_DEF, 1); // Tell the module to set the pulse length (not the pulse ratio / duty). RATIO = 0. LENGTH = 1.
77-
myGNSS.addCfgValset8(UBLOX_CFG_TP_POL_TP1, 1); // Tell the module that we want the rising edge at the top of second. Falling Edge = 0. Rising Edge = 1.
70+
myGNSS.addCfgValset(UBLOX_CFG_TP_PERIOD_LOCK_TP1, 30000000); // Set the period to 30,000,000 us
71+
myGNSS.addCfgValset(UBLOX_CFG_TP_LEN_LOCK_TP1, 1000000); // Set the pulse length to 1,000,000 us
72+
73+
myGNSS.addCfgValset(UBLOX_CFG_TP_TP1_ENA, 1); // Make sure the enable flag is set to enable the time pulse. (Set to 0 to disable.)
74+
myGNSS.addCfgValset(UBLOX_CFG_TP_USE_LOCKED_TP1, 1); // Tell the module to use PERIOD while locking and PERIOD_LOCK when locked to GNSS time
75+
myGNSS.addCfgValset(UBLOX_CFG_TP_PULSE_DEF, 0); // Tell the module that we want to set the period (not the frequency). PERIOD = 0. FREQ = 1.
76+
myGNSS.addCfgValset(UBLOX_CFG_TP_PULSE_LENGTH_DEF, 1); // Tell the module to set the pulse length (not the pulse ratio / duty). RATIO = 0. LENGTH = 1.
77+
myGNSS.addCfgValset(UBLOX_CFG_TP_POL_TP1, 1); // Tell the module that we want the rising edge at the top of second. Falling Edge = 0. Rising Edge = 1.
7878

7979
// Now set the time pulse parameters
8080
if (myGNSS.sendCfgValset() == false)

examples/Basics/Example6_EnableNMEASentences/Example6_EnableNMEASentences.ino

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,13 @@ void setup()
5151

5252
//Disable or enable various NMEA sentences over the UART1 interface
5353
myGNSS.newCfgValset(VAL_LAYER_RAM); // Use cfgValset to disable / enable individual NMEA messages. Change the configuration in the RAM layer only (don't save to BBR)
54-
myGNSS.addCfgValset8(UBLOX_CFG_MSGOUT_NMEA_ID_GLL_UART1, 0); //Several of these are on by default so let's disable them
55-
myGNSS.addCfgValset8(UBLOX_CFG_MSGOUT_NMEA_ID_GSA_UART1, 0);
56-
myGNSS.addCfgValset8(UBLOX_CFG_MSGOUT_NMEA_ID_GSV_UART1, 0);
57-
myGNSS.addCfgValset8(UBLOX_CFG_MSGOUT_NMEA_ID_RMC_UART1, 0);
58-
myGNSS.addCfgValset8(UBLOX_CFG_MSGOUT_NMEA_ID_ZDA_UART1, 0);
59-
myGNSS.addCfgValset8(UBLOX_CFG_MSGOUT_NMEA_ID_VTG_UART1, 1); //Only leaving GGA & VTG enabled at current navigation rate
60-
myGNSS.addCfgValset8(UBLOX_CFG_MSGOUT_NMEA_ID_GGA_UART1, 1);
54+
myGNSS.addCfgValset(UBLOX_CFG_MSGOUT_NMEA_ID_GLL_UART1, 0); //Several of these are on by default so let's disable them
55+
myGNSS.addCfgValset(UBLOX_CFG_MSGOUT_NMEA_ID_GSA_UART1, 0);
56+
myGNSS.addCfgValset(UBLOX_CFG_MSGOUT_NMEA_ID_GSV_UART1, 0);
57+
myGNSS.addCfgValset(UBLOX_CFG_MSGOUT_NMEA_ID_RMC_UART1, 0);
58+
myGNSS.addCfgValset(UBLOX_CFG_MSGOUT_NMEA_ID_ZDA_UART1, 0);
59+
myGNSS.addCfgValset(UBLOX_CFG_MSGOUT_NMEA_ID_VTG_UART1, 1); //Only leaving GGA & VTG enabled at current navigation rate
60+
myGNSS.addCfgValset(UBLOX_CFG_MSGOUT_NMEA_ID_GGA_UART1, 1);
6161
if (myGNSS.sendCfgValset()) // Send the configuration VALSET
6262
Serial.println(F("NMEA messages were configured successfully"));
6363
else

examples/Data_Logging/DataLoggingExample6_NMEA/DataLoggingExample6_NMEA.ino

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,9 +137,9 @@ void setup()
137137
myGNSS.logNAVPVT(); // Enable NAV PVT data logging
138138

139139
myGNSS.newCfgValset(VAL_LAYER_RAM_BBR); // Use cfgValset to disable / enable individual NMEA messages
140-
myGNSS.addCfgValset8(UBLOX_CFG_MSGOUT_NMEA_ID_GGA_I2C, 1); // Ensure the GxGGA (Global positioning system fix data) message is enabled. Send every measurement.
141-
myGNSS.addCfgValset8(UBLOX_CFG_MSGOUT_NMEA_ID_GSA_I2C, 1); // Ensure the GxGSA (GNSS DOP and Active satellites) message is enabled. Send every measurement.
142-
myGNSS.addCfgValset8(UBLOX_CFG_MSGOUT_NMEA_ID_GSV_I2C, 1); // Ensure the GxGSV (GNSS satellites in view) message is enabled. Send every measurement.
140+
myGNSS.addCfgValset(UBLOX_CFG_MSGOUT_NMEA_ID_GGA_I2C, 1); // Ensure the GxGGA (Global positioning system fix data) message is enabled. Send every measurement.
141+
myGNSS.addCfgValset(UBLOX_CFG_MSGOUT_NMEA_ID_GSA_I2C, 1); // Ensure the GxGSA (GNSS DOP and Active satellites) message is enabled. Send every measurement.
142+
myGNSS.addCfgValset(UBLOX_CFG_MSGOUT_NMEA_ID_GSV_I2C, 1); // Ensure the GxGSV (GNSS satellites in view) message is enabled. Send every measurement.
143143
myGNSS.sendCfgValset(); // Send the configuration VALSET
144144

145145
myGNSS.setNMEALoggingMask(SFE_UBLOX_FILTER_NMEA_ALL); // Enable logging of all enabled NMEA messages

0 commit comments

Comments
 (0)