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

readPointer == writePointer when samples are lost #21

Open solarjoe opened 5 years ago

solarjoe commented 5 years ago

This line

int8_t numberOfSamples = sense.head - sense.tail;

or this one

numberOfSamples = writePointer - readPointer;

do not seem to work if samples are lost. In this case both pointers seem so point to the same location and the number of samples results to 0. But the FIFO is full.