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: 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))
Copy file name to clipboardExpand all lines: examples/VALGET_and_VALSET/Example5_multiGetVal/Example5_multiGetVal.ino
+36-9
Original file line number
Diff line number
Diff line change
@@ -91,9 +91,9 @@ void setup()
91
91
// sfe_ublox_packet_validity_e valid : Goes from NOT_DEFINED to VALID or NOT_VALID when checksum is checked
92
92
// sfe_ublox_packet_validity_e classAndIDmatch : Goes from NOT_DEFINED to VALID or NOT_VALID when the Class and ID match the requestedClass and requestedID
93
93
94
-
myGNSS.newCfgValget(&customCfg, VAL_LAYER_RAM); // Create a new VALGET construct
95
-
myGNSS.addCfgValget8(&customCfg, UBLOX_CFG_I2C_ADDRESS); // Get the I2C address (see u-blox_config_keys.h for details)
96
-
myGNSS.addCfgValget8(&customCfg, UBLOX_CFG_I2COUTPROT_NMEA); // Get the flag indicating is NMEA should be output on I2C
94
+
myGNSS.newCfgValget(&customCfg, MAX_PAYLOAD_SIZE, VAL_LAYER_RAM); // Create a new VALGET construct
95
+
myGNSS.addCfgValget(&customCfg, UBLOX_CFG_I2C_ADDRESS); // Get the I2C address (see u-blox_config_keys.h for details)
96
+
myGNSS.addCfgValget(&customCfg, UBLOX_CFG_I2COUTPROT_NMEA); // Get the flag indicating is NMEA should be output on I2C
97
97
if (myGNSS.sendCfgValget(&customCfg)) // Send the VALGET
98
98
{
99
99
Serial.print(F("2 : I2C Address: 0x"));
@@ -111,18 +111,45 @@ void setup()
111
111
112
112
// We can also use the "extract" helper functions to read the data - useful for 16, 32 and 64-bit values
113
113
// The full list is:
114
-
// uint64_t extractLongLong(ubxPacket *msg, uint16_t spotToStart); // Combine eight bytes from payload into uint64_t
115
-
// uint32_t extractLong(ubxPacket *msg, uint16_t spotToStart); // Combine four bytes from payload into long
116
-
// int32_t extractSignedLong(ubxPacket *msg, uint16_t spotToStart); // Combine four bytes from payload into signed long (avoiding any ambiguity caused by casting)
117
-
// uint16_t extractInt(ubxPacket *msg, uint16_t spotToStart); // Combine two bytes from payload into int
114
+
// uint64_t extractLongLong(ubxPacket *msg, uint16_t spotToStart); // Combine eight bytes from payload into uint64_t
115
+
// uint64_t extractSignedLongLong(ubxPacket *msg, uint16_t spotToStart); // Combine eight bytes from payload into int64_t
116
+
// uint32_t extractLong(ubxPacket *msg, uint16_t spotToStart); // Combine four bytes from payload into long
117
+
// int32_t extractSignedLong(ubxPacket *msg, uint16_t spotToStart); // Combine four bytes from payload into signed long (avoiding any ambiguity caused by casting)
118
+
// 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/Example6_multiSetVal_and_GetVal_Templates/Example6_multiSetVal_and_GetVal_Templates.ino
+2-2
Original file line number
Diff line number
Diff line change
@@ -42,7 +42,7 @@ void setup()
42
42
43
43
Wire.begin();
44
44
45
-
myGNSS.enableDebugging(); // Uncomment this line to enable debug messages on Serial
45
+
//myGNSS.enableDebugging(); // Uncomment this line to enable debug messages on Serial
46
46
47
47
if (myGNSS.begin() == false) //Connect to the u-blox module using Wire port
48
48
{
@@ -70,7 +70,7 @@ void setup()
70
70
// The next line creates and initialises the packet information which wraps around the payload
0 commit comments