mirror of
https://github.com/meshcore-dev/MeshCore.git
synced 2026-04-20 22:13:47 +00:00
* fix: compilation error for T1000e
This commit is contained in:
parent
69d1d920bb
commit
fbfa8bbe57
1 changed files with 4 additions and 0 deletions
|
|
@ -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);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue