Skip to content

Commit

Permalink
Fix spelling of 'resolution'
Browse files Browse the repository at this point in the history
  • Loading branch information
kounocom committed Jan 14, 2024
1 parent 2c68a7f commit 787d87f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/batterymonitor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ void BatteryMonitor::Loop()
}
#endif
#if ESP8266 && BATTERY_MONITOR == BAT_EXTERNAL
voltage = ((float)analogRead(PIN_BATTERY_LEVEL)) * ADCVoltageMax / ADCResulution * ADCMultiplier;
voltage = ((float)analogRead(PIN_BATTERY_LEVEL)) * ADCVoltageMax / ADCResolution * ADCMultiplier;
#endif
#if ESP32 && BATTERY_MONITOR == BAT_EXTERNAL
voltage = ((float)analogReadMilliVolts(PIN_BATTERY_LEVEL)) / 1000 * ADCMultiplier;
Expand Down
6 changes: 3 additions & 3 deletions src/batterymonitor.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@
#include "logging/Logger.h"

#if ESP8266
#define ADCResulution 1023.0 // ESP8266 has 10bit ADC
#define ADCResolution 1023.0 // ESP8266 has 10bit ADC
#define ADCVoltageMax 1.0 // ESP8266 input is 1.0 V = 1023.0
#endif
#ifndef ADCResulution
#define ADCResulution 1023.0
#ifndef ADCResolution
#define ADCResolution 1023.0
#endif
#ifndef ADCVoltageMax
#define ADCVoltageMax 1.0
Expand Down

0 comments on commit 787d87f

Please sign in to comment.