Skip to content

Commit 2ae7289

Browse files
authored
Merge pull request #175 from sparkfun/release_candidate
Correct setval to setval8 in examples
2 parents b2f5f0f + 2e24bf4 commit 2ae7289

File tree

6 files changed

+48
-26
lines changed

6 files changed

+48
-26
lines changed

examples/Example30_NEO-D9S/Example30_NEO-D9S.ino

+4-4
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,10 @@ void setup()
9090
if (ok) ok = myLBand.setVal16(UBLOX_CFG_PMP_DESCRAMBLER_INIT, 26969); // Default 23560
9191
if (ok) ok = myLBand.setVal8(UBLOX_CFG_PMP_USE_PRESCRAMBLING, 0); // Default 0
9292
if (ok) ok = myLBand.setVal64(UBLOX_CFG_PMP_UNIQUE_WORD, 16238547128276412563ull);
93-
if (ok) ok = myLBand.setVal(UBLOX_CFG_MSGOUT_UBX_RXM_PMP_I2C, 1); // Ensure UBX-RXM-PMP is enabled on the I2C port
94-
if (ok) ok = myLBand.setVal(UBLOX_CFG_MSGOUT_UBX_RXM_PMP_UART1, 1); // Output UBX-RXM-PMP on UART1
95-
if (ok) ok = myLBand.setVal(UBLOX_CFG_UART2OUTPROT_UBX, 1); // Enable UBX output on UART2
96-
if (ok) ok = myLBand.setVal(UBLOX_CFG_MSGOUT_UBX_RXM_PMP_UART2, 1); // Output UBX-RXM-PMP on UART2
93+
if (ok) ok = myLBand.setVal8(UBLOX_CFG_MSGOUT_UBX_RXM_PMP_I2C, 1); // Ensure UBX-RXM-PMP is enabled on the I2C port
94+
if (ok) ok = myLBand.setVal8(UBLOX_CFG_MSGOUT_UBX_RXM_PMP_UART1, 1); // Output UBX-RXM-PMP on UART1
95+
if (ok) ok = myLBand.setVal8(UBLOX_CFG_UART2OUTPROT_UBX, 1); // Enable UBX output on UART2
96+
if (ok) ok = myLBand.setVal8(UBLOX_CFG_MSGOUT_UBX_RXM_PMP_UART2, 1); // Output UBX-RXM-PMP on UART2
9797
if (ok) ok = myLBand.setVal32(UBLOX_CFG_UART1_BAUDRATE, 38400); // match baudrate with ZED default
9898
if (ok) ok = myLBand.setVal32(UBLOX_CFG_UART2_BAUDRATE, 38400); // match baudrate with ZED default
9999

examples/Example32_NEO-D9C/Example32_NEO-D9C.ino

+4-4
Original file line numberDiff line numberDiff line change
@@ -106,19 +106,19 @@ void setup()
106106
}
107107
Serial.println(F("u-blox NEO-D9C connected"));
108108

109-
uint8_t ok = myQZSS.setVal(UBLOX_CFG_MSGOUT_UBX_RXM_QZSSL6_I2C, 1); // Output QZSS-L6 message on the I2C port
109+
uint8_t ok = myQZSS.setVal8(UBLOX_CFG_MSGOUT_UBX_RXM_QZSSL6_I2C, 1); // Output QZSS-L6 message on the I2C port
110110

111111
Serial.print(F("QZSS-L6: I2C configuration "));
112112
Serial.println(OK(ok));
113113

114-
if (ok) ok = myQZSS.setVal(UBLOX_CFG_MSGOUT_UBX_RXM_QZSSL6_UART1, 1); // Output QZSS-L6 message on UART1
114+
if (ok) ok = myQZSS.setVal8(UBLOX_CFG_MSGOUT_UBX_RXM_QZSSL6_UART1, 1); // Output QZSS-L6 message on UART1
115115
if (ok) ok = myQZSS.setVal32(UBLOX_CFG_UART1_BAUDRATE, 38400); // Match UART1 baudrate with ZED
116116

117117
Serial.print(F("QZSS-L6: UART1 configuration "));
118118
Serial.println(OK(ok));
119119

120-
if (ok) ok = myQZSS.setVal(UBLOX_CFG_UART2OUTPROT_UBX, 1); // Enable UBX output on UART2
121-
if (ok) ok = myQZSS.setVal(UBLOX_CFG_MSGOUT_UBX_RXM_QZSSL6_UART2, 1); // Output QZSS-L6 message on UART2
120+
if (ok) ok = myQZSS.setVal8(UBLOX_CFG_UART2OUTPROT_UBX, 1); // Enable UBX output on UART2
121+
if (ok) ok = myQZSS.setVal8(UBLOX_CFG_MSGOUT_UBX_RXM_QZSSL6_UART2, 1); // Output QZSS-L6 message on UART2
122122
if (ok) ok = myQZSS.setVal32(UBLOX_CFG_UART2_BAUDRATE, 38400); // Match UART2 baudrate with ZED
123123

124124
Serial.print(F("QZSS-L6: UART2 configuration "));

examples/ZED-F9P/Example19_LBand_Corrections_with_NEO-D9S/Example19_LBand_Corrections_with_NEO-D9S.ino

+30-8
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,27 @@
1010
1111
This is a proof of concept to show how the UBX-RXM-PMP corrections control the accuracy.
1212
13+
If you are using the SparkFun Combo Board (SPX-20167), the correction data is transferred from the NEO to the ZED via UART2.
14+
You don't need to push it over I2C. Doing so just gives the ZED twice as many correction messages.
15+
Uncomment the "#define noPush" below to disable the I2C push.
16+
1317
You will need a Thingstream PointPerfect account to be able to access the SPARTN Credentials (L-Band or L-Band + IP Dynamic Keys).
1418
Copy and paste the Current Key and Next Key into secrets.h.
1519
1620
Feel like supporting open source hardware?
1721
Buy a board from SparkFun!
1822
ZED-F9P RTK2: https://www.sparkfun.com/products/16481
19-
NEO-D9S: Coming soon!
23+
NEO-D9S: https://www.sparkfun.com/products/19390
24+
Combo Board: https://www.sparkfun.com/products/20167
2025
2126
Hardware Connections:
2227
Use Qwiic cables to connect the NEO-D9S and ZED-F9x GNSS to your board
2328
If you don't have a platform with a Qwiic connection use the SparkFun Qwiic Breadboard Jumper (https://www.sparkfun.com/products/14425)
2429
Open the serial monitor at 115200 baud to see the output
2530
*/
2631

32+
//#define noPush // Uncomment this line to disable pushing the correction data over I2C. Useful for the combo board which uses UART2 instead.
33+
2734
#include "secrets.h" // <- Copy and paste the Current Key and Next Key into secrets.h
2835

2936
#include <SparkFun_u-blox_GNSS_Arduino_Library.h> //http://librarymanager/All#SparkFun_u-blox_GNSS
@@ -41,21 +48,31 @@ const uint32_t myLBandFreq = 1556290000; // Uncomment this line to use the US SP
4148
// See u-blox_structs.h for the full definition of UBX_RXM_PMP_message_data_t
4249
// _____ You can use any name you like for the callback. Use the same name when you call setRXMPMPmessageCallbackPtr
4350
// / _____ This _must_ be UBX_RXM_PMP_message_data_t
44-
// | / _____ You can use any name you like for the struct
45-
// | | /
46-
// | | |
51+
// | / _____ You can use any name you like for the struct
52+
// | | /
53+
// | | |
4754
void pushRXMPMP(UBX_RXM_PMP_message_data_t *pmpData)
4855
{
4956
//Extract the raw message payload length
5057
uint16_t payloadLen = ((uint16_t)pmpData->lengthMSB << 8) | (uint16_t)pmpData->lengthLSB;
5158
Serial.print(F("New RXM-PMP data received. Message payload length is "));
5259
Serial.print(payloadLen);
60+
61+
#ifndef noPush
62+
5363
Serial.println(F(" Bytes. Pushing it to the GNSS..."));
5464

5565
//Push the PMP data to the GNSS
5666
//The payload length could be variable, so we need to push the header and payload, then checksum
5767
myGNSS.pushRawData(&pmpData->sync1, (size_t)payloadLen + 6); // Push the sync chars, class, ID, length and payload
5868
myGNSS.pushRawData(&pmpData->checksumA, (size_t)2); // Push the checksum bytes
69+
70+
#else
71+
72+
Serial.println(F(" Bytes."));
73+
74+
#endif
75+
5976
}
6077

6178
//=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
@@ -202,7 +219,12 @@ void setup()
202219
Serial.println(F("u-blox GNSS module connected"));
203220

204221
uint8_t ok = myGNSS.setI2COutput(COM_TYPE_UBX); //Turn off NMEA noise
222+
205223
if (ok) ok = myGNSS.setPortInput(COM_PORT_I2C, COM_TYPE_UBX | COM_TYPE_NMEA | COM_TYPE_SPARTN); //Be sure SPARTN input is enabled
224+
225+
if (ok) ok = myGNSS.setPortInput(COM_PORT_UART1, COM_TYPE_UBX | COM_TYPE_NMEA | COM_TYPE_SPARTN); //Be sure SPARTN input is enabled
226+
227+
if (ok) ok = myGNSS.setPortInput(COM_PORT_UART2, COM_TYPE_UBX | COM_TYPE_RTCM3 | COM_TYPE_SPARTN); //Be sure SPARTN input is enabled
206228

207229
if (ok) ok = myGNSS.setDGNSSConfiguration(SFE_UBLOX_DGNSS_MODE_FIXED); // Set the differential mode - ambiguities are fixed whenever possible
208230

@@ -250,10 +272,10 @@ void setup()
250272
if (ok) ok = myLBand.setVal16(UBLOX_CFG_PMP_DESCRAMBLER_INIT, 26969); // Default 23560
251273
if (ok) ok = myLBand.setVal8(UBLOX_CFG_PMP_USE_PRESCRAMBLING, 0); // Default 0
252274
if (ok) ok = myLBand.setVal64(UBLOX_CFG_PMP_UNIQUE_WORD, 16238547128276412563ull);
253-
if (ok) ok = myLBand.setVal(UBLOX_CFG_MSGOUT_UBX_RXM_PMP_I2C, 1); // Ensure UBX-RXM-PMP is enabled on the I2C port
254-
if (ok) ok = myLBand.setVal(UBLOX_CFG_MSGOUT_UBX_RXM_PMP_UART1, 1); // Output UBX-RXM-PMP on UART1
255-
if (ok) ok = myLBand.setVal(UBLOX_CFG_UART2OUTPROT_UBX, 1); // Enable UBX output on UART2
256-
if (ok) ok = myLBand.setVal(UBLOX_CFG_MSGOUT_UBX_RXM_PMP_UART2, 1); // Output UBX-RXM-PMP on UART2
275+
if (ok) ok = myLBand.setVal8(UBLOX_CFG_MSGOUT_UBX_RXM_PMP_I2C, 1); // Ensure UBX-RXM-PMP is enabled on the I2C port
276+
if (ok) ok = myLBand.setVal8(UBLOX_CFG_MSGOUT_UBX_RXM_PMP_UART1, 1); // Output UBX-RXM-PMP on UART1
277+
if (ok) ok = myLBand.setVal8(UBLOX_CFG_UART2OUTPROT_UBX, 1); // Enable UBX output on UART2
278+
if (ok) ok = myLBand.setVal8(UBLOX_CFG_MSGOUT_UBX_RXM_PMP_UART2, 1); // Output UBX-RXM-PMP on UART2
257279
if (ok) ok = myLBand.setVal32(UBLOX_CFG_UART1_BAUDRATE, 38400); // match baudrate with ZED default
258280
if (ok) ok = myLBand.setVal32(UBLOX_CFG_UART2_BAUDRATE, 38400); // match baudrate with ZED default
259281

examples/ZED-F9P/Example20_PMP_with_L-Band_Keys_via_MQTT/Example20_PMP_with_L-Band_Keys_via_MQTT.ino

+4-4
Original file line numberDiff line numberDiff line change
@@ -273,10 +273,10 @@ void setup()
273273
if (ok) ok = myLBand.setVal16(UBLOX_CFG_PMP_DESCRAMBLER_INIT, 26969); // Default 23560
274274
if (ok) ok = myLBand.setVal8(UBLOX_CFG_PMP_USE_PRESCRAMBLING, 0); // Default 0
275275
if (ok) ok = myLBand.setVal64(UBLOX_CFG_PMP_UNIQUE_WORD, 16238547128276412563ull);
276-
if (ok) ok = myLBand.setVal(UBLOX_CFG_MSGOUT_UBX_RXM_PMP_I2C, 1); // Ensure UBX-RXM-PMP is enabled on the I2C port
277-
if (ok) ok = myLBand.setVal(UBLOX_CFG_MSGOUT_UBX_RXM_PMP_UART1, 1); // Output UBX-RXM-PMP on UART1
278-
if (ok) ok = myLBand.setVal(UBLOX_CFG_UART2OUTPROT_UBX, 1); // Enable UBX output on UART2
279-
if (ok) ok = myLBand.setVal(UBLOX_CFG_MSGOUT_UBX_RXM_PMP_UART2, 1); // Output UBX-RXM-PMP on UART2
276+
if (ok) ok = myLBand.setVal8(UBLOX_CFG_MSGOUT_UBX_RXM_PMP_I2C, 1); // Ensure UBX-RXM-PMP is enabled on the I2C port
277+
if (ok) ok = myLBand.setVal8(UBLOX_CFG_MSGOUT_UBX_RXM_PMP_UART1, 1); // Output UBX-RXM-PMP on UART1
278+
if (ok) ok = myLBand.setVal8(UBLOX_CFG_UART2OUTPROT_UBX, 1); // Enable UBX output on UART2
279+
if (ok) ok = myLBand.setVal8(UBLOX_CFG_MSGOUT_UBX_RXM_PMP_UART2, 1); // Output UBX-RXM-PMP on UART2
280280
if (ok) ok = myLBand.setVal32(UBLOX_CFG_UART1_BAUDRATE, 38400); // match baudrate with ZED default
281281
if (ok) ok = myLBand.setVal32(UBLOX_CFG_UART2_BAUDRATE, 38400); // match baudrate with ZED default
282282

examples/ZED-F9P/Example22_QZSSL6_Corrections_with_NEO-D9C/Example22_QZSSL6_Corrections_with_NEO-D9C.ino

+5-5
Original file line numberDiff line numberDiff line change
@@ -278,20 +278,20 @@ void setup()
278278
}
279279
Serial.println(F("u-blox NEO-D9C connected"));
280280

281-
ok = myQZSS.setVal(UBLOX_CFG_MSGOUT_UBX_RXM_QZSSL6_I2C, 1); // Output QZSS-L6 message on the I2C port
281+
ok = myQZSS.setVal8(UBLOX_CFG_MSGOUT_UBX_RXM_QZSSL6_I2C, 1); // Output QZSS-L6 message on the I2C port
282282

283283
Serial.print(F("QZSS-L6: I2C configuration "));
284284
Serial.println(OK(ok));
285285

286-
if (ok) ok = myQZSS.setVal(UBLOX_CFG_UART1OUTPROT_UBX, 1); // Enable UBX output on UART1
287-
if (ok) ok = myQZSS.setVal(UBLOX_CFG_MSGOUT_UBX_RXM_QZSSL6_UART1, 1); // Output QZSS-L6 message on UART1
286+
if (ok) ok = myQZSS.setVal8(UBLOX_CFG_UART1OUTPROT_UBX, 1); // Enable UBX output on UART1
287+
if (ok) ok = myQZSS.setVal8(UBLOX_CFG_MSGOUT_UBX_RXM_QZSSL6_UART1, 1); // Output QZSS-L6 message on UART1
288288
if (ok) ok = myQZSS.setVal32(UBLOX_CFG_UART1_BAUDRATE, 38400); // Match UART1 baudrate with ZED
289289

290290
Serial.print(F("QZSS-L6: UART1 configuration "));
291291
Serial.println(OK(ok));
292292

293-
if (ok) ok = myQZSS.setVal(UBLOX_CFG_UART2OUTPROT_UBX, 1); // Enable UBX output on UART2
294-
if (ok) ok = myQZSS.setVal(UBLOX_CFG_MSGOUT_UBX_RXM_QZSSL6_UART2, 1); // Output QZSS-L6 message on UART2
293+
if (ok) ok = myQZSS.setVal8(UBLOX_CFG_UART2OUTPROT_UBX, 1); // Enable UBX output on UART2
294+
if (ok) ok = myQZSS.setVal8(UBLOX_CFG_MSGOUT_UBX_RXM_QZSSL6_UART2, 1); // Output QZSS-L6 message on UART2
295295
if (ok) ok = myQZSS.setVal32(UBLOX_CFG_UART2_BAUDRATE, 38400); // Match UART2 baudrate with ZED
296296

297297
Serial.print(F("QZSS-L6: UART2 configuration "));

library.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=SparkFun u-blox GNSS Arduino Library
2-
version=2.2.20
2+
version=2.2.21
33
author=SparkFun Electronics <[email protected]>
44
maintainer=SparkFun Electronics <sparkfun.com>
55
sentence=Library for I2C, Serial and SPI Communication with u-blox GNSS modules<br/><br/>

0 commit comments

Comments
 (0)