Skip to content

Commit

Permalink
COmpile fix
Browse files Browse the repository at this point in the history
  • Loading branch information
madhephaestus committed Jun 17, 2020
1 parent a77e402 commit d33bf55
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions ESP32AnalogRead.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,9 @@ uint32_t ESP32AnalogRead::readMiliVolts() {

if (myPin > 27) {
adc1_config_width(ADC_WIDTH_12Bit);
adc1_channel_t chan;
adc1_channel_t chan= ADC1_CHANNEL_0;
switch (myPin) {
case 36:
chan = ADC1_CHANNEL_0;
break;

case 36:
chan = ADC1_CHANNEL_0;
break;
Expand Down Expand Up @@ -91,7 +89,7 @@ uint32_t ESP32AnalogRead::readMiliVolts() {
}
adc1_config_channel_atten(chan, ADC_ATTEN_11db);
} else {
adc2_channel_t chan;
adc2_channel_t chan= ADC2_CHANNEL_0;
switch (myPin) {
case 4:
chan = ADC2_CHANNEL_0;
Expand Down

0 comments on commit d33bf55

Please sign in to comment.