Skip to content

Commit 060db6e

Browse files
committed
Add extra pushRawData comments to Example5_RelativePositioningInformation
1 parent eb8bc0a commit 060db6e

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

Diff for: examples/ZED-F9P/Example5_RelativePositioningInformation/Example5_RelativePositioningInformation.ino

+11-1
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,17 @@ void loop()
156156
//Serial.print("Pushing ");
157157
//Serial.print(numBytes);
158158
//Serial.println(" bytes via I2C");
159-
myGNSS.pushRawData(((uint8_t *)&store), numBytes); // Push the RTCM data via I2C
159+
160+
//On processors which have large I2C buffers, like the ESP32, we can make the push more efficient by
161+
//calling setI2CTransactionSize first to increase the maximum I2C transmission size
162+
//(setI2CTransactionSize only needs to be called once, so it should be in setup, not loop)
163+
//myGNSS.setI2CTransactionSize(128); // Send up to 128 bytes in one I2C transmission
164+
165+
//The ESP32 seems to have an issue when using a restarts to break up long RTCM pushes
166+
//You may need to call pushRawData and set the optional 'stop' argument to true:
167+
//myGNSS.pushRawData(((uint8_t *)&store), numBytes, true); // Push the RTCM data via I2C - always use stops on long RTCM pushes
168+
169+
myGNSS.pushRawData(((uint8_t *)&store), numBytes); // Push the RTCM data via I2C - using restarts to break up long I2C pushes
160170
numBytes = 0; // Reset numBytes
161171
}
162172
#endif

0 commit comments

Comments
 (0)