You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+28-1
Original file line number
Diff line number
Diff line change
@@ -54,9 +54,11 @@ Migrating to v3 is easy. There are two small changes all users will need to make
54
54
v3 is _mostly_ backward-compatible with v2, but there have been some important changes. If in doubt, please look at the updated [examples](./examples).
55
55
They have all been updated and tested with v3.
56
56
57
+
### VAL_LAYER
58
+
57
59
Because all module configuration is performed using the Configuration Interface, you will find that the **VAL_LAYER** has been added as
58
60
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),
60
62
```VAL_LAYER_RAM_BBR``` and ```VAL_LAYER_ALL``` (all three).
61
63
62
64
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
84
86
```
85
87
86
88
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
87
92
88
93
v3 provides a new way of reading (getting) values from the Configuration Interface: ```newCfgValget```, ```addCfgValget``` and ```sendCfgValget```.
89
94
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:
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
Copy file name to clipboardExpand all lines: examples/NEO-D9S_and_NEO-D9C/Example5_QZSSL6_Corrections_with_NEO-D9C/Example5_QZSSL6_Corrections_with_NEO-D9C.ino
+1-2
Original file line number
Diff line number
Diff line change
@@ -3,8 +3,7 @@
3
3
By: SparkFun Electronics / Paul Clark
4
4
Based on original code by: u-blox AG / Michael Ammann
5
5
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.
8
7
9
8
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).
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.
109
109
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)
111
111
112
112
if (myGNSS.sendCfgValget(&customCfg) == true) // Send the VALGET
113
113
{
@@ -121,17 +121,33 @@ void setup()
121
121
122
122
// We can also use the "extract" helper functions to read the data - useful for 16, 32 and 64-bit values
123
123
// 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
Copy file name to clipboardExpand all lines: examples/VALGET_and_VALSET/Example2_SetVal/Example2_SetVal.ino
+1-1
Original file line number
Diff line number
Diff line change
@@ -57,7 +57,7 @@ void setup()
57
57
//You can obtain them from the ZED-F9P interface description doc
58
58
//or from u-center's Messages->CFG->VALSET window. Keys must be 32-bit.
59
59
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)
61
61
62
62
//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)
63
63
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)
Copy file name to clipboardExpand all lines: examples/VALGET_and_VALSET/Example4_multiSetVal/Example4_multiSetVal.ino
+29-2
Original file line number
Diff line number
Diff line change
@@ -72,8 +72,8 @@ void setup()
72
72
myGNSS.autoSendCfgValsetAtSpaceRemaining(16); // Trigger an auto-send when packetCfg has less than 16 bytes are remaining
73
73
74
74
//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
77
77
78
78
// Add KeyIDs and Values
79
79
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()
92
92
}
93
93
else
94
94
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))
0 commit comments