added voltage multiplier to gui and set defaults

This commit is contained in:
Erwin Repolust
2023-03-14 01:44:41 +01:00
parent 8b61b9ebfe
commit ec08432f92
2 changed files with 36 additions and 8 deletions

View File

@@ -26,6 +26,15 @@
#endif
#endif
//the default ratio for the voltage divider
#ifndef USERMOD_BATTERY_VOLTAGE_MULTIPLIER
#ifdef ARDUINO_ARCH_ESP32
#define USERMOD_BATTERY_VOLTAGE_MULTIPLIER 2.0f
#else //ESP8266 boards
#define USERMOD_BATTERY_VOLTAGE_MULTIPLIER 4.2f
#endif
#endif
#ifndef USERMOD_BATTERY_MAX_VOLTAGE
#define USERMOD_BATTERY_MAX_VOLTAGE 4.2f
#endif