File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed
Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff 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 {
You can’t perform that action at this time.
0 commit comments