SparkFun_MAX3010x_Sensor_Library icon indicating copy to clipboard operation
SparkFun_MAX3010x_Sensor_Library copied to clipboard

compiling with full warnings generate an error in heartRate.cpp

Open pabloandresm opened this issue 4 years ago • 0 comments

When using full warnings, this error breaks compilation:

SparkFun_MAX3010x_Pulse_and_Proximity_Sensor_Library\src\heartRate.cpp:108:33: error: suggest parentheses around comparison in operand of '&' [-Werror=parentheses] if ((IR_AC_Max - IR_AC_Min) > 20 & (IR_AC_Max - IR_AC_Min) < 1000)

Also....I do not understand the usage of "&" in every single if comparison.

Are you sure you want to use the bitwise & and not the logical && ?

pabloandresm avatar Jul 01 '20 15:07 pabloandresm