From c0887582a205d8994dcb81a13c8b5c4c943ff5e0 Mon Sep 17 00:00:00 2001 From: "Michael (XIAO Xufeng)" Date: Sun, 18 Oct 2020 10:32:04 +0800 Subject: [PATCH] adc_test: fix the failure caused by low expected middle value --- components/driver/test/adc_dma_test/test_esp32.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/driver/test/adc_dma_test/test_esp32.c b/components/driver/test/adc_dma_test/test_esp32.c index 926c54ee62..67211e407e 100644 --- a/components/driver/test/adc_dma_test/test_esp32.c +++ b/components/driver/test/adc_dma_test/test_esp32.c @@ -110,7 +110,7 @@ static esp_err_t adc_dma_data_check(uint8_t *buf, int length, int ideal_level) } else if (ideal_level == 0) { // low level 0v TEST_ASSERT_LESS_THAN( 10, p->type1.data ); } else if (ideal_level == 2) { // middle level 1.4v - TEST_ASSERT_INT_WITHIN( 128, 1666, p->type1.data ); + TEST_ASSERT_INT_WITHIN( 128, 1586, p->type1.data ); } else if (ideal_level == 3) { // normal level } else { // no check } @@ -163,4 +163,4 @@ TEST_CASE("ADC DMA read", "[adc dma]") example_i2s_deinit(); } -#endif // !DISABLED_FOR_TARGETS(ESP8266, ESP32S2) \ No newline at end of file +#endif // !DISABLED_FOR_TARGETS(ESP8266, ESP32S2)