diff --git a/src/boards_pinout.h b/src/boards_pinout.h index a0256db..374c282 100644 --- a/src/boards_pinout.h +++ b/src/boards_pinout.h @@ -282,6 +282,7 @@ #define GPS_TX 18 #define GPS_VCC 33 //#define LED_PIN 16 #define BUTTON_PIN 0 + #define BATTERY_PIN 1 #define RADIO_VCC_PIN 21 #define RADIO_SCLK_PIN 12 #define RADIO_MISO_PIN 13 diff --git a/src/power_utils.cpp b/src/power_utils.cpp index b4790a6..6ad0d70 100644 --- a/src/power_utils.cpp +++ b/src/power_utils.cpp @@ -74,6 +74,9 @@ namespace POWER_Utils { batteryMeasurmentTime = millis(); #endif double voltage = (adc_value * 3.3 ) / 4095.0; + #ifdef LIGHTTRACKER_PLUS_1_0 + return voltage * 6.783; + #endif #if defined(TTGO_T_Beam_V0_7) || defined(TTGO_T_LORA32_V2_1_GPS) || defined(TTGO_T_LORA32_V2_1_GPS_915) || defined(TTGO_T_LORA32_V2_1_TNC) || defined(TTGO_T_LORA32_V2_1_TNC_915) || defined(ESP32_DIY_LoRa_GPS) || defined(ESP32_DIY_LoRa_GPS_915) || defined(ESP32_DIY_1W_LoRa_GPS) || defined(ESP32_DIY_1W_LoRa_GPS_915) || defined(ESP32_DIY_1W_LoRa_GPS_LLCC68) || defined(OE5HWN_MeshCom) || defined(TTGO_T_DECK_GPS) || defined(TTGO_T_DECK_PLUS) || defined(ESP32S3_DIY_LoRa_GPS) || defined(ESP32S3_DIY_LoRa_GPS_915) return (2 * (voltage + 0.1)) * (1 + (lora32BatReadingCorr/100)); // (2 x 100k voltage divider) 2 x voltage divider/+0.1 because ESP32 nonlinearity ~100mV ADC offset/extra correction #endif