bugfix battery voltage display

This commit is contained in:
Verkehrsrot 2019-09-20 09:51:13 +02:00
parent d9c6153559
commit 6bf4a287bf

View File

@ -57,7 +57,7 @@ void doHousekeeping() {
// read battery voltage into global variable // read battery voltage into global variable
#if (defined BAT_MEASURE_ADC || defined HAS_PMU) #if (defined BAT_MEASURE_ADC || defined HAS_PMU)
batt_voltage = read_voltage(); batt_voltage = read_voltage();
if (batt_voltage = 0xffff) if (batt_voltage == 0xffff)
ESP_LOGI(TAG, "Battery: external power"); ESP_LOGI(TAG, "Battery: external power");
else else
ESP_LOGI(TAG, "Battery: %dmV", batt_voltage); ESP_LOGI(TAG, "Battery: %dmV", batt_voltage);