Sadie has a dataset where the code fails to guessCadence, because two peaks overlap and neither peak is used.
The code looks for five-point peaks in the histogram, where the center must be greater than the four points surrounding it. This can fail when the two peaks are close to one another.
The code now detects this case, and looks for a simple peak where the peak is surrounded by two lower points.
Sadie has a dataset where the code fails to guessCadence, because two peaks overlap and neither peak is used.
The code looks for five-point peaks in the histogram, where the center must be greater than the four points surrounding it. This can fail when the two peaks are close to one another.
The code now detects this case, and looks for a simple peak where the peak is surrounded by two lower points.