Error in PDMIn filter loop.

This commit is contained in:
Dan Halbert 2017-12-21 16:43:03 -05:00 committed by Scott Shawcroft
parent e671fa2f7a
commit 2d2735c9d4

View File

@ -273,8 +273,9 @@ static uint16_t filter_sample(uint32_t pdm_samples[4]) {
uint32_t pdm_sample = pdm_samples[i];
REPEAT_16_TIMES( {
if (pdm_sample & 0x8000) {
running_sum += *filter_ptr++;
running_sum += *filter_ptr;
}
filter_ptr++;
pdm_sample <<= 1;
}
)