Bypass some functions if bps is not 8

This commit is contained in:
wh201906 2023-01-22 15:41:07 +00:00
commit f4879fdc17

View file

@ -370,8 +370,12 @@ uint32_t DoAcquisition(uint8_t decimation, uint8_t bits_per_sample, bool avg, in
} }
// Ensure that DC offset removal and noise check is performed for any device-side processing // Ensure that DC offset removal and noise check is performed for any device-side processing
removeSignalOffset(data.buffer, samples.total_saved); if (bits_per_sample == 8)
computeSignalProperties(data.buffer, samples.total_saved); {
// these functions only consider bps==8
removeSignalOffset(data.buffer, samples.total_saved);
computeSignalProperties(data.buffer, samples.total_saved);
}
return data.numbits; return data.numbits;
} }
/** /**