mirror of
https://github.com/espressif/esp-idf.git
synced 2025-07-31 19:24:33 +02:00
adc_test: fix the failure caused by low expected middle value
This commit is contained in:
@@ -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)
|
||||
#endif // !DISABLED_FOR_TARGETS(ESP8266, ESP32S2)
|
||||
|
Reference in New Issue
Block a user