* fix: compilation error for T1000e

This commit is contained in:
Scott Powell 2025-04-15 15:15:06 +10:00
parent 69d1d920bb
commit fbfa8bbe57

View file

@ -29,12 +29,16 @@ public:
uint16_t getBattMilliVolts() override { uint16_t getBattMilliVolts() override {
#ifdef BATTERY_PIN #ifdef BATTERY_PIN
#ifdef PIN_3V3_EN
digitalWrite(PIN_3V3_EN, HIGH); digitalWrite(PIN_3V3_EN, HIGH);
#endif
analogReference(AR_INTERNAL_3_0); analogReference(AR_INTERNAL_3_0);
analogReadResolution(12); analogReadResolution(12);
delay(10); delay(10);
float volts = (analogRead(BATTERY_PIN) * ADC_MULTIPLIER * AREF_VOLTAGE) / 4096; float volts = (analogRead(BATTERY_PIN) * ADC_MULTIPLIER * AREF_VOLTAGE) / 4096;
#ifdef PIN_3V3_EN
digitalWrite(PIN_3V3_EN, LOW); digitalWrite(PIN_3V3_EN, LOW);
#endif
analogReference(AR_DEFAULT); // put back to default analogReference(AR_DEFAULT); // put back to default
analogReadResolution(10); analogReadResolution(10);