Closed beegee-tokyo closed 5 years ago
When using 2 (or more) sensors on the same device the sensor values read from the sensors can get mixed up. The struct sense is defined as a global and is reused from multiple instances of the MAX30105 class.
Solution: Declare sense as class private
Good find and excellent fix. Thank you for the PR.
Pulled into v1.1.0. Thanks!
Glad I could help.
When using 2 (or more) sensors on the same device the sensor values read from the sensors can get mixed up. The struct sense is defined as a global and is reused from multiple instances of the MAX30105 class.
Solution: Declare sense as class private