Bitwise AND or Boolean???
jaggzh opened this issue · 1 comments
jaggzh commented
https://github.com/sparkfun/SparkFun_MAX3010x_Sensor_Library/blob/master/src/heartRate.cpp#L108
In multiple places, this strange use of bitwise AND is used:
src/heartRate.cpp:108:33: warning: suggest parentheses around comparison in operand of '&' [-Wparentheses]
if ((IR_AC_Max - IR_AC_Min) > 20 & (IR_AC_Max - IR_AC_Min) < 1000)
nseidle commented
Strange indeed. I believe it's a hold over from Maxim's PBA implementation. If you think it's worth fixing, a PR would be much appreciated.