summaryrefslogtreecommitdiff
path: root/src/main/main.cpp
diff options
context:
space:
mode:
authorjacqueline <me@jacqueline.id.au>2023-01-21 14:10:25 +1100
committerjacqueline <me@jacqueline.id.au>2023-01-21 14:10:25 +1100
commitf013bab7276b8d5e606cee636e31f2157cd6e34d (patch)
treec7ccac33cb17fe2afc4b4d7dd3bcf923121c027d /src/main/main.cpp
parent393b268e159a40b23bc63464f4d04d5be09e070f (diff)
downloadtangara-fw-f013bab7276b8d5e606cee636e31f2157cd6e34d.tar.gz
Migrate to the v5 adc api
Diffstat (limited to 'src/main/main.cpp')
-rw-r--r--src/main/main.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main/main.cpp b/src/main/main.cpp
index deef29e1..ad4b2d01 100644
--- a/src/main/main.cpp
+++ b/src/main/main.cpp
@@ -92,7 +92,6 @@ extern "C" void app_main(void) {
ESP_ERROR_CHECK(gpio_install_isr_service(ESP_INTR_FLAG_LOWMED));
ESP_ERROR_CHECK(drivers::init_i2c());
ESP_ERROR_CHECK(drivers::init_spi());
- ESP_ERROR_CHECK(drivers::init_adc());
ESP_LOGI(TAG, "Init GPIOs");
drivers::GpioExpander* expander = new drivers::GpioExpander();
@@ -105,6 +104,10 @@ extern "C" void app_main(void) {
drivers::GpioExpander::SD_MUX_ESP);
});
+ ESP_LOGI(TAG, "Init battery measurement");
+ drivers::Battery* battery = new drivers::Battery();
+ ESP_LOGI(TAG, "it's reading %dmV!", battery->Millivolts());
+
ESP_LOGI(TAG, "Init SD card");
auto storage_res = drivers::SdStorage::create(expander);
if (storage_res.has_error()) {