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/Example20_SendCustomCommand/Example20_SendCustomCommand.ino
+7-1
Original file line number
Diff line number
Diff line change
@@ -62,7 +62,13 @@ void setup()
62
62
// Let's configure the module's navigation rate as if we were using setNavigationFrequency
63
63
64
64
// Let's create our custom packet
65
-
uint8_t customPayload[MAX_PAYLOAD_SIZE]; // This array holds the payload data bytes
65
+
uint8_t customPayload[MAX_PAYLOAD_SIZE]; // This array holds the payload data bytes. MAX_PAYLOAD_SIZE defaults to 256. The CFG_RATE payload is only 6 bytes!
66
+
67
+
// setPacketCfgPayloadSize tells the library how many bytes our customPayload can hold.
68
+
// It is more memory-efficient to call setPacketCfgPayloadSize before .begin (to avoid creating a new buffer, copying across
69
+
// the contents of the old buffer and then deleting the old buffer). But let's call it here just to prove that we can.
70
+
myGNSS.setPacketCfgPayloadSize(MAX_PAYLOAD_SIZE);
71
+
66
72
// The next line creates and initialises the packet information which wraps around the payload
0 commit comments