Browse Source

* fix: compilation error for T1000e

pull/205/head
Scott Powell 1 year ago
parent
commit
fbfa8bbe57
  1. 4
      src/helpers/nrf52/T1000eBoard.h

4
src/helpers/nrf52/T1000eBoard.h

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

Loading…
Cancel
Save