sparkfun / SparkFun_MAX3010x_Sensor_Library

An Arduino Library for the MAX3015 particle sensor and MAX30102 Pulse Ox sensor
Other
221 stars 148 forks source link

max30102.h warning #58

Open gxx-boy opened 9 months ago

gxx-boy commented 9 months ago

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