Migrated to littlefs on esp32 + fix A0 pin

This commit is contained in:
Magnus Persson
2022-03-10 11:11:39 +01:00
parent 21fba0481c
commit 2d1317af0d
3 changed files with 7 additions and 10 deletions

View File

@ -92,7 +92,7 @@ void ErrorFileLog::addEntry(String err) {
_errors[i] = _errors[i - 1];
}
_errors[0] = err;
Log.errorln(err.c_str());
Log.error(err.c_str());
save();
}
@ -232,7 +232,7 @@ void BatteryVoltage::read() {
// The analog pin can only handle 3.3V maximum voltage so we need to reduce
// the voltage (from max 5V)
float factor = myConfig.getVoltageFactor(); // Default value is 1.63
int v = analogRead(A0);
int v = analogRead(PIN_A0);
// An ESP8266 has a ADC range of 0-1023 and a maximum voltage of 3.3V
// An ESP32 has an ADC range of 0-4095 and a maximum voltage of 3.3V