SparkFun_MAX3010x_Sensor_Library icon indicating copy to clipboard operation
SparkFun_MAX3010x_Sensor_Library copied to clipboard

max30102.h warning

Open gxx-boy opened this issue 6 months ago • 0 comments

This warning indicates that in the MAX30105.h header, the definition of the I2C_BUFFER_LENGTH constant conflicts with the definition in the Wire.h library. Specifically, the Wire.h library defines I2C_BUFFER_LENGTH as BUFFER_LENGTH, and the MAX30105.h header redefines it as 32.

In file included from C:\Users\八腹肌\AppData\Local\Temp.arduinoIDE-unsaved20231124-40256-1ia59xn.4dut\sketch_dec24a\sketch_dec24a.ino:24: c:\Users\�˸���\Documents\Arduino\libraries\SparkFun_MAX3010x_Pulse_and_Proximity_Sensor_Library\src/MAX30105.h:42: warning: "I2C_BUFFER_LENGTH" redefined 42 | #define I2C_BUFFER_LENGTH 32 | In file included from C:\Users\aaa\AppData\Local\Temp.arduinoIDE-unsaved20231124-40256-1ia59xn.4dut\sketch_dec24a\sketch_dec24a.ino:23: C:\Users\�˸���\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.2\libraries\Wire/Wire.h:33: note: this is the location of the previous definition 33 | #define I2C_BUFFER_LENGTH BUFFER_LENGTH | In file included from c:\Users\�˸���\Documents\Arduino\libraries\SparkFun_MAX3010x_Pulse_and_Proximity_Sensor_Library\src\MAX30105.cpp:12: c:\Users\�˸���\Documents\Arduino\libraries\SparkFun_MAX3010x_Pulse_and_Proximity_Sensor_Library\src\MAX30105.h:42: warning: "I2C_BUFFER_LENGTH" redefined 42 | #define I2C_BUFFER_LENGTH 32 | In file included from c:\Users\�˸���\Documents\Arduino\libraries\SparkFun_MAX3010x_Pulse_and_Proximity_Sensor_Library\src\MAX30105.h:20, from c:\Users\�˸���\Documents\Arduino\libraries\SparkFun_MAX3010x_Pulse_and_Proximity_Sensor_Library\src\MAX30105.cpp:12: C:\Users\�˸���\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.2\libraries\Wire/Wire.h:33: note: this is the location of the previous definition 33 | #define I2C_BUFFER_LENGTH BUFFER_LENGTH |

gxx-boy avatar Dec 24 '23 12:12 gxx-boy