Skip to content

Commit b7bb3db

Browse files
authored
Merge pull request #47 from sparkfun/release_candidate
v3.1.1
2 parents 746ad2b + 3ab265c commit b7bb3db

File tree

16 files changed

+397
-84
lines changed

16 files changed

+397
-84
lines changed

.github/workflows/compile-sketch.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ jobs:
8686
8787
steps:
8888
- name: Checkout
89-
uses: actions/checkout@v2
89+
uses: actions/checkout@v4
9090

9191
- name: Branch name
9292
run: echo running on branch ${GITHUB_REF##*/}

examples/NEO-D9S_and_NEO-D9C/Example2_LBand_Corrections_with_NEO-D9S/Example2_LBand_Corrections_with_NEO-D9S.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ void printPVTdata(UBX_NAV_PVT_data_t *ubxDataStruct)
108108
Serial.print(F(" (2D)"));
109109
else if (fixType == 3)
110110
Serial.print(F(" (3D)"));
111-
else if (fixType == 3)
111+
else if (fixType == 4)
112112
Serial.print(F(" (GNSS + Dead Reckoning)"));
113113
else if (fixType == 5)
114114
Serial.print(F(" (Time Only)"));

examples/NEO-D9S_and_NEO-D9C/Example3_LBand_Corrections_with_NEO-D9S_using_SPI/Example3_LBand_Corrections_with_NEO-D9S_using_SPI.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ void printPVTdata(UBX_NAV_PVT_data_t *ubxDataStruct)
100100
Serial.print(F(" (2D)"));
101101
else if (fixType == 3)
102102
Serial.print(F(" (3D)"));
103-
else if (fixType == 3)
103+
else if (fixType == 4)
104104
Serial.print(F(" (GNSS + Dead Reckoning)"));
105105
else if (fixType == 5)
106106
Serial.print(F(" (Time Only)"));

examples/NEO-D9S_and_NEO-D9C/Example5_QZSSL6_Corrections_with_NEO-D9C/Example5_QZSSL6_Corrections_with_NEO-D9C.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ void printPVTdata(UBX_NAV_PVT_data_t *ubxDataStruct)
126126
Serial.print(F(" (2D)"));
127127
else if (fixType == 3)
128128
Serial.print(F(" (3D)"));
129-
else if (fixType == 3)
129+
else if (fixType == 4)
130130
Serial.print(F(" (GNSS + Dead Reckoning)"));
131131
else if (fixType == 5)
132132
Serial.print(F(" (Time Only)"));

examples/NEO-D9S_and_NEO-D9C/Example6_PMP_with_L-Band_Keys_via_MQTT/Example6_PMP_with_L-Band_Keys_via_MQTT.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ void printPVTdata(UBX_NAV_PVT_data_t *ubxDataStruct)
132132
Serial.print(F(" (2D)"));
133133
else if (fixType == 3)
134134
Serial.print(F(" (3D)"));
135-
else if (fixType == 3)
135+
else if (fixType == 4)
136136
Serial.print(F(" (GNSS + Dead Reckoning)"));
137137
else if (fixType == 5)
138138
Serial.print(F(" (Time Only)"));

examples/NEO-D9S_and_NEO-D9C/Example7_LBand_Corrections_over_Serial/Example7_LBand_Corrections_over_Serial.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ void printPVTdata(UBX_NAV_PVT_data_t *ubxDataStruct)
9797
Serial.print(F(" (2D)"));
9898
else if (fixType == 3)
9999
Serial.print(F(" (3D)"));
100-
else if (fixType == 3)
100+
else if (fixType == 4)
101101
Serial.print(F(" (GNSS + Dead Reckoning)"));
102102
else if (fixType == 5)
103103
Serial.print(F(" (Time Only)"));

examples/NEO-D9S_and_NEO-D9C/Example8_LBand_SPARTN_Parsing/Example8_LBand_SPARTN_Parsing.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ void printPVTdata(UBX_NAV_PVT_data_t *ubxDataStruct)
126126
Serial.print(F(" (2D)"));
127127
else if (fixType == 3)
128128
Serial.print(F(" (3D)"));
129-
else if (fixType == 3)
129+
else if (fixType == 4)
130130
Serial.print(F(" (GNSS + Dead Reckoning)"));
131131
else if (fixType == 5)
132132
Serial.print(F(" (Time Only)"));

examples/NEO-F10N/Example1_RAWX/Example1_RAWX.ino

+61-18
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Configuring the NEO-F10N GNSS to send RXM RAWX reports over I2C and display them using a callback
2+
Configuring the NEO-F10N GNSS to send RXM RAWX reports over Serial and display them using a callback
33
By: Paul Clark
44
SparkFun Electronics
55
Date: November 24th, 2023
@@ -8,20 +8,29 @@
88
This example shows how to configure the u-blox NEO-F10N GNSS to send RXM RAWX reports automatically
99
and access the data via a callback. It also demonstrates how to mark the L5 signals as healthy.
1010
11+
Note: the NEO-F10N only supports UART1. It does not support I2C, SPI or built-in USB.
12+
To run this example on the SparkFun NEO-F10N breakout, you need to open the USB-TX and USB-RX jumpers
13+
to isolate the on-board CH340 USB interface chip. See Hardware Connections below.
14+
15+
Note: the engineering sample of the NEO-F10N-00B supports RXM-RAWX. Production firmware may not.
16+
1117
Feel like supporting open source hardware?
1218
Buy a board from SparkFun!
1319
NEO-F10N: https://www.sparkfun.com/products/24114
1420
1521
Hardware Connections:
16-
Plug a Qwiic cable into the GPS and a BlackBoard
17-
If you don't have a platform with a Qwiic connection use the SparkFun Qwiic Breadboard Jumper (https://www.sparkfun.com/products/14425)
22+
Open the USB-TX and USB-RX jumpers to isolate the on-board CH340 USB interface chip.
23+
Solder header pins (9-way) to the board so you can access the UART1 TX and RX connections.
24+
Use jumper wires to connect:
25+
* TX to Serial1 RX on your Arduino board.
26+
* RX to Serial1 TX on your Arduino board.
27+
* GND to GND
28+
* 5V to 5V (or 3V3 to 3V3)
1829
Open the serial monitor at 115200 baud to see the output
1930
*/
2031

21-
#include <Wire.h> //Needed for I2C to GPS
22-
2332
#include <SparkFun_u-blox_GNSS_v3.h> //http://librarymanager/All#SparkFun_u-blox_GNSS_v3
24-
SFE_UBLOX_GNSS myGNSS;
33+
SFE_UBLOX_GNSS_SERIAL myGNSS;
2534

2635
// Callback: newRAWX will be called when new RXM RAWX data arrives
2736
// See u-blox_structs.h for the full definition of UBX_RXMRAWX_data_t
@@ -209,9 +218,9 @@ void newRAWX(UBX_RXM_RAWX_data_t *ubxDataStruct)
209218
else if (ubxDataStruct->blocks[block].svId < 100) sprintf(&SV[14], "%d ", ubxDataStruct->blocks[block].svId); // Align the svId
210219
else sprintf(&SV[14], "%d ", ubxDataStruct->blocks[block].svId); // Align the svId
211220

212-
if (ubxDataStruct->blocks[block].cno < 10) sprintf(&SV[18], " %d ", ubxDataStruct->blocks[block].cno); // Align the svId
213-
else if (ubxDataStruct->blocks[block].cno < 100) sprintf(&SV[18], " %d ", ubxDataStruct->blocks[block].cno); // Align the svId
214-
else sprintf(&SV[18], "%d ", ubxDataStruct->blocks[block].cno); // Align the svId
221+
if (ubxDataStruct->blocks[block].cno < 10) sprintf(&SV[18], " %d ", ubxDataStruct->blocks[block].cno); // Align the cno
222+
else if (ubxDataStruct->blocks[block].cno < 100) sprintf(&SV[18], " %d ", ubxDataStruct->blocks[block].cno); // Align the cno
223+
else sprintf(&SV[18], "%d ", ubxDataStruct->blocks[block].cno); // Align the cno
215224

216225
// Print cno as a bar chart
217226
uint8_t cno;
@@ -231,25 +240,50 @@ void setup()
231240
while (!Serial); //Wait for user to open terminal
232241
Serial.println("SparkFun u-blox Example");
233242

234-
Wire.begin();
243+
Serial1.begin(38400); // The NEO-F10N defaults to 38400 baud
235244

236245
//myGNSS.enableDebugging(); // Uncomment this line to enable helpful debug messages on Serial
237246

238-
if (myGNSS.begin() == false) //Connect to the u-blox module using Wire port
247+
while (myGNSS.begin(Serial1) == false) //Connect to the u-blox module using Serial1 (UART)
239248
{
240-
Serial.println(F("u-blox GNSS not detected at default I2C address. Please check wiring. Freezing."));
241-
while (1);
249+
Serial.println(F("u-blox GNSS not detected. Please check wiring. Retrying..."));
250+
delay(1000);
242251
}
243252

244-
myGNSS.setGPSL5HealthOverride(true); // Mark L5 signals as healthy - store in RAM and BBR
253+
if (myGNSS.getModuleInfo())
254+
{
255+
Serial.print(F("FWVER: "));
256+
Serial.print(myGNSS.getFirmwareVersionHigh()); // Returns uint8_t
257+
Serial.print(F("."));
258+
Serial.println(myGNSS.getFirmwareVersionLow()); // Returns uint8_t
259+
260+
Serial.print(F("Firmware: "));
261+
Serial.println(myGNSS.getFirmwareType()); // Returns HPG, SPG, SPGL1L5 etc. as (const char *)
245262

246-
myGNSS.setLNAMode(SFE_UBLOX_LNA_MODE_NORMAL); // Set the LNA gain to normal (full). Other options: LOWGAIN, BYPASS
263+
Serial.print(F("PROTVER: "));
264+
Serial.print(myGNSS.getProtocolVersionHigh()); // Returns uint8_t
265+
Serial.print(F("."));
266+
Serial.println(myGNSS.getProtocolVersionLow()); // Returns uint8_t
267+
268+
Serial.print(F("MOD: "));
269+
Serial.println(myGNSS.getModuleName()); // Returns ZED-F9P, MAX-M10S etc. as (const char *)
270+
}
271+
else
272+
Serial.println(F("Error: could not read module info!"));
247273

248-
myGNSS.setI2COutput(COM_TYPE_UBX); //Set the I2C port to output UBX only (turn off NMEA noise)
274+
myGNSS.setUART1Output(COM_TYPE_UBX); //Set the UART1 port to output UBX only (turn off NMEA noise)
249275
myGNSS.saveConfigSelective(VAL_CFG_SUBSEC_IOPORT); //Save (only) the communications port settings to flash and BBR
250276

251277
myGNSS.setMeasurementRate(5000); //Produce one solution every five seconds (RAWX produces a _lot_ of data!)
252278

279+
myGNSS.setVal8(UBLOX_CFG_SIGNAL_GPS_L5_ENA, 1); // Make sure the GPS L5 band is enabled (needed on the NEO-F9P)
280+
281+
myGNSS.setGPSL5HealthOverride(true); // Mark L5 signals as healthy - store in RAM and BBR
282+
283+
myGNSS.setLNAMode(SFE_UBLOX_LNA_MODE_NORMAL); // Set the LNA gain to normal (full). Other options: LOWGAIN, BYPASS
284+
285+
myGNSS.softwareResetGNSSOnly(); // Restart the GNSS to apply the L5 health override
286+
253287
myGNSS.setAutoRXMRAWXcallbackPtr(&newRAWX); // Enable automatic RXM RAWX messages with callback to newRAWX
254288
}
255289

@@ -258,6 +292,15 @@ void loop()
258292
myGNSS.checkUblox(); // Check for the arrival of new data and process it.
259293
myGNSS.checkCallbacks(); // Check if any callbacks are waiting to be processed.
260294

261-
Serial.print(".");
262-
delay(50);
295+
printDot();
296+
}
297+
298+
void printDot() // Print a dot every 200ms - without using delay
299+
{
300+
static unsigned long lastPrint = millis();
301+
if (millis() > (lastPrint + 200))
302+
{
303+
Serial.print(".");
304+
lastPrint = millis();
305+
}
263306
}

0 commit comments

Comments
 (0)