avg 횟수마다 반복 측정 간 500us 딜레이 추가
- avg 횟수에 따라 신호 위아래 폭이 작아지는 현상 개선을 위함 - 단일 채널 측정(mec)에는 원래 avg 사이 500us 존재, 전체 측정(maa)에는 없었음
This commit is contained in:
@@ -698,12 +698,11 @@ dr_adc_err_t dr_adc_burst_capture_transmit(uint8_t freq_option, uint16_t delay_u
|
||||
|
||||
for (uint16_t avg_iter = 0; avg_iter < averaging; avg_iter++)
|
||||
{
|
||||
/* Wait for previous echo to decay before next measurement
|
||||
* 1ms = ~77cm round-trip decay time (sound speed 1.54mm/us)
|
||||
* Skip delay on first iteration */
|
||||
/* Wait for previous echo and ringing to decay before next measurement.
|
||||
* Skip delay on first iteration. */
|
||||
if (avg_iter > 0)
|
||||
{
|
||||
nrf_delay_us(500); /* 500us between measurements */
|
||||
nrf_delay_us(DR_ADC_AVG_INTER_BURST_GAP_US);
|
||||
}
|
||||
|
||||
/* Re-select piezo channel before each burst
|
||||
@@ -888,6 +887,12 @@ dr_adc_err_t dr_adc_capture_channel_only(uint8_t freq_option, uint16_t delay_us,
|
||||
/* repeat measurement 'averaging' times per channel */
|
||||
for (uint16_t avg_iter = 0; avg_iter < averaging; avg_iter++)
|
||||
{
|
||||
/* Let the previous burst decay before the next averaged shot. */
|
||||
if (avg_iter > 0)
|
||||
{
|
||||
nrf_delay_us(DR_ADC_AVG_INTER_BURST_GAP_US);
|
||||
}
|
||||
|
||||
/* TX burst pulse */
|
||||
switch (freq_option)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user