Piezo 채널 0 측정 전 warmup delay(3ms) 상수화
This commit is contained in:
@@ -41,6 +41,9 @@
|
||||
/* real capture 전에 같은 채널에서 버스트+ADC capture를 버리는 횟수(dummy) */
|
||||
#define PIEZO_DUMMY_CAPTURE_COUNT 1
|
||||
|
||||
/* 채널 0 시작 전 안정을 위한 추가 딜레이 */
|
||||
#define PIEZO_CH0_WARMUP_TO_REAL_SETTLE_US 3000
|
||||
|
||||
/* 6채널 sweep 결과 (각 채널의 평균 완료 후 최종만 저장) */
|
||||
static uint16_t piezo_channels[PIEZO_NUM_CHANNELS][PIEZO_MEASURE_MAX_SAMPLES];
|
||||
|
||||
@@ -260,12 +263,12 @@ int piezo_measure_sweep(void)
|
||||
err = echo_adc_capture(echo_capture, samples);
|
||||
if (err)
|
||||
{
|
||||
DBG_PRINTF("[ECHO] dummy capture fail ch=%d dummy=%d err=%d\r\n", ch, dummy, err);
|
||||
//DBG_PRINTF("[ECHO] dummy capture fail ch=%d dummy=%d err=%d\r\n", ch, dummy, err);
|
||||
return ECHO_STATUS_CAPTURE;
|
||||
}
|
||||
|
||||
// 마지막 dummy capture와 첫 real capture 사이에도 같은 회복 시간
|
||||
k_busy_wait(PIEZO_AVG_INTER_BURST_GAP_US + 3000);
|
||||
// 마지막 dummy capture와 첫 real capture 사이에도 같은 회복 시간 + 추가 안정화
|
||||
k_busy_wait(PIEZO_AVG_INTER_BURST_GAP_US + PIEZO_CH0_WARMUP_TO_REAL_SETTLE_US);
|
||||
}
|
||||
|
||||
// 여기부터 실제 평균에 들어갈 capture
|
||||
|
||||
Reference in New Issue
Block a user