Skip to content
This repository has been archived by the owner on Jan 28, 2021. It is now read-only.

I2C_BUFFER_LENGTH warning #5

Closed
trycoon opened this issue Mar 25, 2019 · 2 comments
Closed

I2C_BUFFER_LENGTH warning #5

trycoon opened this issue Mar 25, 2019 · 2 comments

Comments

@trycoon
Copy link

trycoon commented Mar 25, 2019

Hi!

I get this warning when running the latest SparkFun Ublox Arduino Library in Platform.io on a ESP32:

In file included from src/gps.h:5:0, from src/gps.cpp:2: .piolibdeps/SparkFun Ublox Arduino Library_ID5746/src/SparkFun_Ublox_Arduino_Library.h:71:0: warning: "I2C_BUFFER_LENGTH" redefined #define I2C_BUFFER_LENGTH 32 ^ In file included from .piolibdeps/SparkFun Ublox Arduino Library_ID5746/src/SparkFun_Ublox_Arduino_Library.h:38:0, from src/gps.h:5, from src/gps.cpp:2: /home/trycoon/.platformio/packages/framework-arduinoespressif32/libraries/Wire/src/Wire.h:34:0: note: this is the location of the previous definition #define I2C_BUFFER_LENGTH 128

Would it be possible to set this value ONLY when it has not already been set?
I2C_BUFFER_LENGTH 32

Thanks!

@nseidle
Copy link
Member

nseidle commented Mar 25, 2019

Yep. Probably all that is needed is to change this line to an #ifndef. If you can try it and do a PR I would be very grateful (I don't often do testing on ESP32).

trycoon added a commit to trycoon/SparkFun_Ublox_Arduino_Library that referenced this issue Apr 7, 2019
@trycoon
Copy link
Author

trycoon commented Apr 7, 2019

@nseidle Sorry for the delay, but now there is a pull-request available: #7

nseidle added a commit that referenced this issue Apr 8, 2019
#5 only set I2C_BUFFER_LENGTH if not already defined
@nseidle nseidle closed this as completed Apr 17, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants