Skip to content

Commit fa19507

Browse files
committed
Merge remote-tracking branch 'origin/dev' into dev
2 parents 3e1870b + 1e1ace5 commit fa19507

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/current_sense/hardware_specific/esp32/esp32_adc_driver.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -162,8 +162,8 @@ bool IRAM_ATTR adcInit(uint8_t pin){
162162
analogReadResolution(SIMPLEFOC_ADC_RES);
163163
}
164164
pinMode(pin, ANALOG);
165-
analogSetPinAttenuation(pin, SIMPLEFOC_ADC_ATTEN);
166165
analogRead(pin);
166+
analogSetPinAttenuation(pin, SIMPLEFOC_ADC_ATTEN);
167167

168168
#if CONFIG_IDF_TARGET_ESP32 // if esp32 variant
169169
__configFastADCs();

0 commit comments

Comments
 (0)