Skip to content

Commit ec7d453

Browse files
committed
minor update
1 parent 94843d5 commit ec7d453

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

main/main.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -178,14 +178,13 @@ extern "C" void app_main(void) {
178178
.channel = ADC_CHANNEL_2,
179179
.attenuation = ADC_ATTEN_DB_12
180180
};
181-
std::vector<espp::AdcConfig> channels{battery_channel};
182181

183182
// we use oneshot adc here to that we could add other channels if need be for
184183
// other components, but it has no in-built filtering. NOTE: for some reason,
185184
// I cannot use Continuous ADC in combination with esp32-camera...
186185
espp::OneshotAdc adc({
187-
.unit = ADC_UNIT_1,
188-
.channels = std::move(channels),
186+
.unit = battery_channel.unit,
187+
.channels = {battery_channel},
189188
.log_level = espp::Logger::Verbosity::WARN
190189
});
191190
auto read_battery_voltage = [&adc, &battery_channel]() -> float {

0 commit comments

Comments
 (0)