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
{{ message }}
This repository was archived by the owner on Jan 28, 2021. It is now read-only.
Copy file name to clipboardExpand all lines: examples/Example20_SendCustomCommand/Example20_SendCustomCommand.ino
+16-16Lines changed: 16 additions & 16 deletions
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
/*
2
-
sendCustomCommand
2
+
Send Custom Command
3
3
By: Paul Clark (PaulZC)
4
4
Date: April 18th, 2020
5
5
@@ -13,12 +13,12 @@
13
13
through the library but it would always appear to timeout as
14
14
some of the internal functions referred to the internal private
15
15
struct packetCfg.
16
-
The most recent version of the library allows sendCustomCommand to
16
+
The most recent version of the library allows sendCommand to
17
17
use a custom packet as if it were packetCfg and so:
18
-
- sendCustomCommand will return a sfe_ublox_status_e enum as if
19
-
sendCommand had been called from within the library
18
+
- sendCommand will return a sfe_ublox_status_e enum as if
19
+
it had been called from within the library
20
20
- the custom packet will be updated with data returned by the module
21
-
(previously this was not possible)
21
+
(previously this was not possible from outside the library)
22
22
23
23
Feel like supporting open source hardware?
24
24
Buy a board from SparkFun!
@@ -81,7 +81,7 @@ void setup()
81
81
// sfe_ublox_packet_validity_e valid : Goes from NOT_DEFINED to VALID or NOT_VALID when checksum is checked
82
82
// 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
83
83
84
-
//sendCustomCommand will return:
84
+
//sendCommand will return:
85
85
// SFE_UBLOX_STATUS_DATA_RECEIVED if the data we requested was read / polled successfully
86
86
// SFE_UBLOX_STATUS_DATA_SENT if the data we sent was writted successfully (ACK'd)
87
87
// Other values indicate errors. Please see the sfe_ublox_status_e enum for further details.
@@ -96,21 +96,21 @@ void setup()
96
96
customCfg.len = 0; // Setting the len (length) to zero let's us poll the current settings
97
97
customCfg.startingSpot = 0; // Always set the startingSpot to zero (unless you really know what you are doing)
98
98
99
-
// We also need to tell sendCustomCommand how long it should wait for a reply
99
+
// We also need to tell sendCommand how long it should wait for a reply
100
100
uint16_t maxWait = 250; // Wait for up to 250ms (Serial may need a lot longer e.g. 1100)
101
101
102
102
// Now let's read the current navigation model settings. The results will be loaded into customCfg.
103
-
if (myGPS.sendCustomCommand(&customCfg, maxWait) != SFE_UBLOX_STATUS_DATA_RECEIVED) // We are expecting data and an ACK
103
+
if (myGPS.sendCommand(&customCfg, maxWait) != SFE_UBLOX_STATUS_DATA_RECEIVED) // We are expecting data and an ACK
0 commit comments