Tbeams have no ADC (#4871)

This commit is contained in:
Thomas Göttgens
2024-09-25 20:51:11 +02:00
committed by GitHub
parent 4128d75ad4
commit d4e8452c60

View File

@@ -147,6 +147,8 @@ using namespace meshtastic;
*/
static HasBatteryLevel *batteryLevel; // Default to NULL for no battery level sensor
#ifdef BATTERY_PIN
static void adcEnable()
{
#ifdef ADC_CTRL // enable adc voltage divider when we need to read
@@ -171,6 +173,8 @@ static void adcDisable()
#endif
}
#endif
/**
* A simple battery level sensor that assumes the battery voltage is attached via a voltage-divider to an analog input
*/