From 4fc5f931acf5bdc582fdad3cb48e6810964198c5 Mon Sep 17 00:00:00 2001 From: jacqueline Date: Wed, 12 Oct 2022 11:59:42 +1100 Subject: WIP use result<> and RAII --- main/battery.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'main/battery.cpp') diff --git a/main/battery.cpp b/main/battery.cpp index 179a6439..d175ab67 100644 --- a/main/battery.cpp +++ b/main/battery.cpp @@ -11,8 +11,8 @@ static esp_adc_cal_characteristics_t calibration; esp_err_t init_adc(void) { // Calibration should already be fused into the chip from the factory, so // we should only need to read it back out again. - esp_adc_cal_characterize( - ADC_UNIT_1, ADC_ATTEN_DB_11, ADC_WIDTH_BIT_12, 0, &calibration); + esp_adc_cal_characterize(ADC_UNIT_1, ADC_ATTEN_DB_11, ADC_WIDTH_BIT_12, 0, + &calibration); // Max battery voltage should be a little over 2V due to our divider, so // we need the max attenuation to properly handle the full range. @@ -28,4 +28,4 @@ uint32_t read_battery_voltage(void) { return esp_adc_cal_raw_to_voltage(raw, &calibration); } -} // namespace gay_ipod +} // namespace gay_ipod -- cgit v1.2.3