Skip to content

Commit c8cbdc6

Browse files
authored
Merge pull request #1 from sparkfun/Add_Config_Size_IDs
Add template methods for VALSET and VALGET
2 parents f3e7d2b + 4a3599f commit c8cbdc6

File tree

22 files changed

+2130
-1190
lines changed

22 files changed

+2130
-1190
lines changed

.github/workflows/compile-sketch.yml

+1
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ jobs:
100100
- source-path: ./
101101
sketch-paths: |
102102
- examples/Example1_PositionVelocityTime
103+
- examples/VALGET_and_VALSET/Example6_multiSetVal_and_GetVal_Templates
103104
enable-warnings-report: true
104105
enable-deltas-report: true
105106
# verbose: true

README.md

+28-1
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,11 @@ Migrating to v3 is easy. There are two small changes all users will need to make
5454
v3 is _mostly_ backward-compatible with v2, but there have been some important changes. If in doubt, please look at the updated [examples](./examples).
5555
They have all been updated and tested with v3.
5656

57+
### VAL_LAYER
58+
5759
Because all module configuration is performed using the Configuration Interface, you will find that the **VAL_LAYER** has been added as
5860
a parameter in many methods. The set methods default to using ```VAL_LAYER_RAM_BBR``` - i.e. the configuration will be changed and stored in both
59-
RAM and Battery-Backed RAM. Options are: ```VAL_LAYER_RAM```, ```VAL_LAYER_BBR```, ```VAL_LAYER_FLASH``` (if your module has flash memory attached),
61+
RAM and Battery-Backed RAM but not flash. Options are: ```VAL_LAYER_RAM```, ```VAL_LAYER_BBR```, ```VAL_LAYER_FLASH``` (if your module has flash memory attached),
6062
```VAL_LAYER_RAM_BBR``` and ```VAL_LAYER_ALL``` (all three).
6163

6264
Please check your code. If you are using ```maxWait```, you will need to specify the LAYER too. E.g.:
@@ -84,6 +86,9 @@ Please check your code. If you are using ```maxWait```, you will need to specify
8486
```
8587

8688
Likewise, when reading (getting) the configuration, you can specify ```VAL_LAYER_RAM``` or ```VAL_LAYER_DEFAULT```. The methods default to ```VAL_LAYER_RAM```.
89+
(```VAL_LAYER_BBR``` and ```VAL_LAYER_FLASH``` are also supported - but earlier ZED-F9P's NACK'd reading those layers.)
90+
91+
### VALSET and VALGET
8792

8893
v3 provides a new way of reading (getting) values from the Configuration Interface: ```newCfgValget```, ```addCfgValget``` and ```sendCfgValget```.
8994
Please see the [VALSET and VALGET examples](./examples/VALGET_and_VALSET/) for more details.
@@ -106,6 +111,28 @@ To configure the ports, please use the methods:
106111
bool setSPIInput(uint8_t comSettings, uint8_t layer = VAL_LAYER_RAM_BBR, uint16_t maxWait = kUBLOXGNSSDefaultMaxWait);
107112
```
108113

114+
### Template VALSET and VALGET
115+
116+
Please also note that as of Jan 10th 2023 the u-blox Config Keys defined in [u-blox_config_keys.h](./src/u-blox_config_keys.h) now have their size encoded into them.
117+
We OR extra data into the unused bits in each key to define the size. This allows set and get template methods to cope with the different sizes. E.g.:
118+
119+
```
120+
// CFG-ANA: AssistNow Autonomous and Offline configuration
121+
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
122+
const uint32_t UBLOX_CFG_ANA_USE_ANA = UBX_CFG_L | 0x10230001; // Use AssistNow Autonomous
123+
const uint32_t UBLOX_CFG_ANA_ORBMAXERR = UBX_CFG_U2 | 0x30230002; // Maximum acceptable (modeled) orbit error in m. Range is from 5 to 1000.
124+
```
125+
126+
```UBX_CFG_L``` is a logical boolean single bit, stored as 8-bit U1 (uint8_t). ```UBX_CFG_U2``` is 2-byte (16-bit) unsigned (uint16_t). Etc..
127+
128+
If you are using the keys in your own code, you can restore the original key value by ANDing with the inverse of ```UBX_CFG_SIZE_MASK``` :
129+
130+
```
131+
key &= ~UBX_CFG_SIZE_MASK; // Mask off the size identifer bits
132+
```
133+
134+
The get and set template methods are based on an idea by Michael Ammann. Thank you @mazgch
135+
109136
## Compatibility
110137

111138
v3 of the library provides support for generation F9 and M10 u-blox GNSS modules.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
/*
2+
Powering off a ublox GNSS module
3+
By: bjorn
4+
unsurv.org
5+
Date: July 20th, 2020
6+
License: MIT. See license file for more information.
7+
8+
This example shows you how to turn off the ublox module to lower the power consumption.
9+
There are two functions: one just specifies a duration in milliseconds the other also specifies a pin on the GNSS device to wake it up with.
10+
By driving a voltage from LOW to HIGH or HIGH to LOW on the chosen module pin you wake the device back up.
11+
Note: Doing so on the INT0 pin when using the regular powerOff(durationInMs) function will wake the device anyway. (tested on SAM-M8Q)
12+
Note: While powered off, you should not query the device for data or it might wake up. This can be used to wake the device but is not recommended.
13+
Works best when also putting your microcontroller to sleep.
14+
15+
Feel like supporting open source hardware?
16+
Buy a board from SparkFun!
17+
SparkFun GPS-RTK2 - ZED-F9P (GPS-15136) https://www.sparkfun.com/products/15136
18+
SparkFun GPS-RTK-SMA - ZED-F9P (GPS-16481) https://www.sparkfun.com/products/16481
19+
SparkFun ZED-F9K Breakout (GPS-18719) https://www.sparkfun.com/products/18719
20+
SparkFun ZED-F9R Breakout (GPS-16344) https://www.sparkfun.com/products/16344
21+
22+
Hardware Connections:
23+
Plug a Qwiic cable into the GNSS and a BlackBoard.
24+
To force the device to wake up you need to connect to a pin (for example INT0) seperately on the module.
25+
If you don't have a platform with a Qwiic connection use the SparkFun Qwiic Breadboard Jumper (https://www.sparkfun.com/products/14425)
26+
Open the serial monitor at 115200 baud to see the output
27+
*/
28+
29+
#include <SparkFun_u-blox_GNSS_v3.h> //http://librarymanager/All#SparkFun_u-blox_GNSS_v3
30+
SFE_UBLOX_GNSS myGNSS;
31+
32+
// define a digital pin capable of driving HIGH and LOW
33+
#define WAKEUP_PIN 5
34+
35+
// Possible GNSS interrupt pins for powerOffWithInterrupt are:
36+
// VAL_RXM_PMREQ_WAKEUPSOURCE_UARTRX = uartrx
37+
// VAL_RXM_PMREQ_WAKEUPSOURCE_EXTINT0 = extint0 (default)
38+
// VAL_RXM_PMREQ_WAKEUPSOURCE_EXTINT1 = extint1
39+
// VAL_RXM_PMREQ_WAKEUPSOURCE_SPICS = spics
40+
// These values can be or'd (|) together to enable interrupts on multiple pins
41+
42+
void wakeUp() {
43+
44+
Serial.print("-- waking up module via pin " + String(WAKEUP_PIN));
45+
Serial.println(" on your microcontroller --");
46+
47+
digitalWrite(WAKEUP_PIN, LOW);
48+
delay(1000);
49+
digitalWrite(WAKEUP_PIN, HIGH);
50+
delay(1000);
51+
digitalWrite(WAKEUP_PIN, LOW);
52+
}
53+
54+
55+
void setup() {
56+
57+
pinMode(WAKEUP_PIN, OUTPUT);
58+
digitalWrite(WAKEUP_PIN, LOW);
59+
60+
Serial.begin(115200);
61+
while (!Serial); //Wait for user to open terminal
62+
Serial.println("SparkFun u-blox Example");
63+
64+
Wire.begin();
65+
66+
//myGNSS.enableDebugging(); // Enable debug messages
67+
68+
if (myGNSS.begin() == false) //Connect to the u-blox module using Wire port
69+
{
70+
Serial.println(F("u-blox GNSS not detected at default I2C address. Please check wiring. Freezing."));
71+
while (1);
72+
}
73+
74+
// Powering off for 20s, you should see the power consumption drop.
75+
Serial.println("-- Powering off module for 20s --");
76+
77+
myGNSS.powerOff(20000);
78+
//myGNSS.powerOffWithInterrupt(20000, VAL_RXM_PMREQ_WAKEUPSOURCE_EXTINT0);
79+
80+
delay(10000);
81+
82+
// After 10 seconds wake the device via the specified pin on your microcontroller and module.
83+
wakeUp();
84+
}
85+
86+
void loop() {
87+
//Do nothing
88+
}

examples/Callbacks/CallbackExample1_NAV_PVT/CallbackExample1_NAV_PVT.ino

+6-5
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,18 @@
33
By: Paul Clark
44
SparkFun Electronics
55
Date: December 30th, 2020
6-
License: MIT. See license file for more information but you can
7-
basically do whatever you want with this code.
6+
License: MIT. See license file for more information.
87
98
This example shows how to configure the u-blox GNSS to send navigation reports automatically
109
and access the data via a callback. No more polling!
1110
1211
Feel like supporting open source hardware?
1312
Buy a board from SparkFun!
14-
ZED-F9P RTK2: https://www.sparkfun.com/products/15136
15-
NEO-M8P RTK: https://www.sparkfun.com/products/15005
16-
SAM-M8Q: https://www.sparkfun.com/products/15106
13+
SparkFun GPS-RTK2 - ZED-F9P (GPS-15136) https://www.sparkfun.com/products/15136
14+
SparkFun GPS-RTK-SMA - ZED-F9P (GPS-16481) https://www.sparkfun.com/products/16481
15+
SparkFun MAX-M10S Breakout (GPS-18037) https://www.sparkfun.com/products/18037
16+
SparkFun ZED-F9K Breakout (GPS-18719) https://www.sparkfun.com/products/18719
17+
SparkFun ZED-F9R Breakout (GPS-16344) https://www.sparkfun.com/products/16344
1718
1819
Hardware Connections:
1920
Plug a Qwiic cable into the GPS and a BlackBoard

examples/Callbacks/CallbackExample2_NAV_ODO/CallbackExample2_NAV_ODO.ino

+6-5
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,18 @@
33
By: Paul Clark
44
SparkFun Electronics
55
Date: December 30th, 2020
6-
License: MIT. See license file for more information but you can
7-
basically do whatever you want with this code.
6+
License: MIT. See license file for more information.
87
98
This example shows how to configure the u-blox GNSS to send odometer reports automatically
109
and display the data via a callback. No more polling!
1110
1211
Feel like supporting open source hardware?
1312
Buy a board from SparkFun!
14-
ZED-F9P RTK2: https://www.sparkfun.com/products/15136
15-
NEO-M8P RTK: https://www.sparkfun.com/products/15005
16-
SAM-M8Q: https://www.sparkfun.com/products/15106
13+
SparkFun GPS-RTK2 - ZED-F9P (GPS-15136) https://www.sparkfun.com/products/15136
14+
SparkFun GPS-RTK-SMA - ZED-F9P (GPS-16481) https://www.sparkfun.com/products/16481
15+
SparkFun MAX-M10S Breakout (GPS-18037) https://www.sparkfun.com/products/18037
16+
SparkFun ZED-F9K Breakout (GPS-18719) https://www.sparkfun.com/products/18719
17+
SparkFun ZED-F9R Breakout (GPS-16344) https://www.sparkfun.com/products/16344
1718
1819
Hardware Connections:
1920
Plug a Qwiic cable into the GPS and a BlackBoard

examples/Callbacks/CallbackExample3_TIM_TM2/CallbackExample3_TIM_TM2.ino

+1-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33
By: Paul Clark
44
SparkFun Electronics
55
Date: December 30th, 2020
6-
License: MIT. See license file for more information but you can
7-
basically do whatever you want with this code.
6+
License: MIT. See license file for more information.
87
98
This example shows how to configure the u-blox GNSS to send TIM TM2 reports automatically
109
and display the data via a callback. No more polling!

examples/Callbacks/CallbackExample4_RAWX/CallbackExample4_RAWX.ino

+1-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33
By: Paul Clark
44
SparkFun Electronics
55
Date: March 11th, 2021
6-
License: MIT. See license file for more information but you can
7-
basically do whatever you want with this code.
6+
License: MIT. See license file for more information.
87
98
This example shows how to configure the u-blox GNSS to send RXM RAWX reports automatically
109
and access the data via a callback. No more polling!

examples/Callbacks/CallbackExample5_NAV_SAT/CallbackExample5_NAV_SAT.ino

+1-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33
By: Paul Clark
44
SparkFun Electronics
55
Date: December 1st, 2021
6-
License: MIT. See license file for more information but you can
7-
basically do whatever you want with this code.
6+
License: MIT. See license file for more information.
87
98
This example shows how to configure the u-blox GNSS to send NAV SAT reports automatically
109
and access the data via a callback. No more polling!

examples/Callbacks/CallbackExample6_UseCallbackDataInLoop/CallbackExample6_UseCallbackDataInLoop.ino

+6-5
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33
By: Paul Clark
44
SparkFun Electronics
55
Date: April 15th, 2022
6-
License: MIT. See license file for more information but you can
7-
basically do whatever you want with this code.
6+
License: MIT. See license file for more information.
87
98
This example shows how to access the callback data from the main loop.
109
The simple way to check if new data is available is to use a global flag: set it in the callback, check it and clear it in the main loop.
@@ -13,9 +12,11 @@
1312
1413
Feel like supporting open source hardware?
1514
Buy a board from SparkFun!
16-
ZED-F9P RTK2: https://www.sparkfun.com/products/15136
17-
NEO-M8P RTK: https://www.sparkfun.com/products/15005
18-
SAM-M8Q: https://www.sparkfun.com/products/15106
15+
SparkFun GPS-RTK2 - ZED-F9P (GPS-15136) https://www.sparkfun.com/products/15136
16+
SparkFun GPS-RTK-SMA - ZED-F9P (GPS-16481) https://www.sparkfun.com/products/16481
17+
SparkFun MAX-M10S Breakout (GPS-18037) https://www.sparkfun.com/products/18037
18+
SparkFun ZED-F9K Breakout (GPS-18719) https://www.sparkfun.com/products/18719
19+
SparkFun ZED-F9R Breakout (GPS-16344) https://www.sparkfun.com/products/16344
1920
2021
Hardware Connections:
2122
Plug a Qwiic cable into the GPS and a BlackBoard

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

+1-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33
By: SparkFun Electronics / Paul Clark
44
Based on original code by: u-blox AG / Michael Ammann
55
Date: September 23rd, 2022
6-
License: MIT. See license file for more information but you can
7-
basically do whatever you want with this code.
6+
License: MIT. See license file for more information.
87
98
This example shows how to configure a NEO-D9C QZSS-L6 receiver and have it send coorection data to a ZED-F9x via Serial (UART).
109

examples/VALGET_and_VALSET/Example1_GetVal/Example1_GetVal.ino

+24-8
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,9 @@ void setup()
105105
// The next line creates and initialises the packet information which wraps around the payload
106106
ubxPacket customCfg = {0, 0, 0, 0, 0, customPayload, 0, 0, SFE_UBLOX_PACKET_VALIDITY_NOT_DEFINED, SFE_UBLOX_PACKET_VALIDITY_NOT_DEFINED};
107107

108-
myGNSS.newCfgValget(&customCfg, VAL_LAYER_RAM); // Create a new VALGET construct. Read the data from the RAM layer.
108+
myGNSS.newCfgValget(&customCfg, 9, VAL_LAYER_RAM); // Create a new VALGET construct. Read the data from the RAM layer.
109109

110-
myGNSS.addCfgValget8(&customCfg, UBLOX_CFG_I2C_ADDRESS); // Get the I2C address (see u-blox_config_keys.h for details)
110+
myGNSS.addCfgValget(&customCfg, UBLOX_CFG_I2C_ADDRESS); // Get the I2C address (see u-blox_config_keys.h for details)
111111

112112
if (myGNSS.sendCfgValget(&customCfg) == true) // Send the VALGET
113113
{
@@ -121,17 +121,33 @@ void setup()
121121

122122
// We can also use the "extract" helper functions to read the data - useful for 16, 32 and 64-bit values
123123
// The full list is:
124-
// uint64_t extractLongLong(ubxPacket *msg, uint16_t spotToStart); // Combine eight bytes from payload into uint64_t
125-
// uint32_t extractLong(ubxPacket *msg, uint16_t spotToStart); // Combine four bytes from payload into long
126-
// int32_t extractSignedLong(ubxPacket *msg, uint16_t spotToStart); // Combine four bytes from payload into signed long (avoiding any ambiguity caused by casting)
127-
// uint16_t extractInt(ubxPacket *msg, uint16_t spotToStart); // Combine two bytes from payload into int
124+
// uint64_t extractLongLong(ubxPacket *msg, uint16_t spotToStart); // Combine eight bytes from payload into uint64_t
125+
// uint64_t extractSignedLongLong(ubxPacket *msg, uint16_t spotToStart); // Combine eight bytes from payload into int64_t
126+
// uint32_t extractLong(ubxPacket *msg, uint16_t spotToStart); // Combine four bytes from payload into long
127+
// int32_t extractSignedLong(ubxPacket *msg, uint16_t spotToStart); // Combine four bytes from payload into signed long (avoiding any ambiguity caused by casting)
128+
// uint16_t extractInt(ubxPacket *msg, uint16_t spotToStart); // Combine two bytes from payload into int
128129
// int16_t extractSignedInt(ubxPacket *msg, uint16_t spotToStart);
129-
// uint8_t extractByte(ubxPacket *msg, uint16_t spotToStart); // Get byte from payload
130-
// int8_t extractSignedChar(ubxPacket *msg, uint16_t spotToStart); // Get signed 8-bit value from payload
130+
// uint8_t extractByte(ubxPacket *msg, uint16_t spotToStart); // Get byte from payload
131+
// int8_t extractSignedChar(ubxPacket *msg, uint16_t spotToStart); // Get signed 8-bit value from payload
132+
// float extractFloat(ubxPacket *msg, uint16_t spotToStart); // Get 32-bit float from payload
133+
// double extractDouble(ubxPacket *msg, uint16_t spotToStart); // Get 64-bit double from payload
131134

132135
Serial.print("6: Current I2C address (should be 0x42): 0x");
133136
currentI2Caddress = myGNSS.extractByte(&customCfg, 8);
134137
Serial.println(currentI2Caddress >> 1, HEX); //u-blox module returns a shifted 8-bit address. Make it 7-bit unshifted.
138+
139+
// New in v3: we can use a template method to extract the value for us
140+
141+
uint8_t i2cAddress; // We still need to know the type...
142+
if (myGNSS.extractConfigValueByKey(&customCfg, UBLOX_CFG_I2C_ADDRESS, &i2cAddress, sizeof(i2cAddress))) // Get the I2C address - using the key
143+
{
144+
Serial.print(F("7: Current I2C address (should be 0x42): 0x"));
145+
Serial.println(i2cAddress >> 1, HEX); //We have to shift by 1 to get the common '7-bit' I2C address format
146+
}
147+
else
148+
{
149+
Serial.println(F("extractConfigValueByKey failed!"));
150+
}
135151
}
136152
else
137153
{

examples/VALGET_and_VALSET/Example2_SetVal/Example2_SetVal.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ void setup()
5757
//You can obtain them from the ZED-F9P interface description doc
5858
//or from u-center's Messages->CFG->VALSET window. Keys must be 32-bit.
5959

60-
setValueSuccess &= myGNSS.setVal8(UBLOX_CFG_NMEA_HIGHPREC, 0); //Enable high precision NMEA. UBLOX_CFG_NMEA_HIGHPREC is L (bool) but we use 8-bits (uint8_t)
60+
setValueSuccess &= myGNSS.setVal8(UBLOX_CFG_NMEA_HIGHPREC, 1); //Enable high precision NMEA. UBLOX_CFG_NMEA_HIGHPREC is L (bool) but we use 8-bits (uint8_t)
6161

6262
//setValueSuccess &= myGNSS.setVal16(UBLOX_CFG_RATE_MEAS, 100); //Set measurement rate to 100ms (10Hz update rate). UBLOX_CFG_RATE_MEAS is 16-bit U2 (uint16_t)
6363
setValueSuccess &= myGNSS.setVal16(UBLOX_CFG_RATE_MEAS, 1000); //Set measurement rate to 1000ms (1Hz update rate). UBLOX_CFG_RATE_MEAS is 16-bit U2 (uint16_t)

examples/VALGET_and_VALSET/Example4_multiSetVal/Example4_multiSetVal.ino

+29-2
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@ void setup()
7272
myGNSS.autoSendCfgValsetAtSpaceRemaining(16); // Trigger an auto-send when packetCfg has less than 16 bytes are remaining
7373

7474
//Begin with newCfgValset
75-
setValueSuccess &= myGNSS.newCfgValset(); // Defaults to configuring the setting in Flash, RAM and BBR
76-
//setValueSuccess &= myGNSS.newCfgValset(VAL_LAYER_RAM); //Set this and the following settings in RAM only instead of Flash/RAM/BBR
75+
setValueSuccess &= myGNSS.newCfgValset(); // Defaults to configuring the setting in RAM and BBR
76+
//setValueSuccess &= myGNSS.newCfgValset(VAL_LAYER_RAM); //Set this and the following settings in RAM only
7777

7878
// Add KeyIDs and Values
7979
setValueSuccess &= myGNSS.addCfgValset8(UBLOX_CFG_MSGOUT_RTCM_3X_TYPE1005_I2C, 1); //Set output rate of msg 1005 over the I2C port to once per measurement (value is 8-bit (U1))
@@ -92,6 +92,33 @@ void setup()
9292
}
9393
else
9494
Serial.println("Value set failed");
95+
96+
delay(1000);
97+
98+
// New in v3 : we can use the template method addCfgValset to deduce the data size automatically
99+
100+
//Begin with newCfgValset
101+
setValueSuccess = myGNSS.newCfgValset(); // Defaults to configuring the setting in RAM and BBR
102+
//setValueSuccess &= myGNSS.newCfgValset(VAL_LAYER_RAM); //Set this and the following settings in RAM only
103+
104+
// Add KeyIDs and Values
105+
setValueSuccess &= myGNSS.addCfgValset(UBLOX_CFG_MSGOUT_RTCM_3X_TYPE1005_I2C, 1); //Set output rate of msg 1005 over the I2C port to once per measurement (value is 8-bit (U1))
106+
setValueSuccess &= myGNSS.addCfgValset(UBLOX_CFG_MSGOUT_RTCM_3X_TYPE1077_I2C, 1); //Set output rate of msg 1077 over the I2C port to once per measurement (value is 8-bit (U1))
107+
setValueSuccess &= myGNSS.addCfgValset(UBLOX_CFG_MSGOUT_RTCM_3X_TYPE1087_I2C, 1); //Set output rate of msg 1087 over the I2C port to once per measurement (value is 8-bit (U1))
108+
setValueSuccess &= myGNSS.addCfgValset(UBLOX_CFG_MSGOUT_RTCM_3X_TYPE1127_I2C, 1); //Set output rate of msg 1127 over the I2C port to once per measurement (value is 8-bit (U1))
109+
setValueSuccess &= myGNSS.addCfgValset(UBLOX_CFG_MSGOUT_RTCM_3X_TYPE1097_I2C, 1); //Set output rate of msg 1097 over the I2C port to once per measurement (value is 8-bit (U1))
110+
setValueSuccess &= myGNSS.addCfgValset(UBLOX_CFG_MSGOUT_RTCM_3X_TYPE1230_I2C, 10); //Set output rate of msg 1230 over the I2C port to once every 10 measurements (value is 8-bit (U1))
111+
112+
// Send the packet using sendCfgValset
113+
setValueSuccess &= myGNSS.sendCfgValset();
114+
115+
if (setValueSuccess == true)
116+
{
117+
Serial.println("Values were successfully set");
118+
}
119+
else
120+
Serial.println("Value set failed");
121+
95122
}
96123

97124
void loop()

0 commit comments

Comments
 (0)