diff options
author | Wolfgang (Wolle) Ewald <wolfgang.ewald@wolles-elektronikkiste.de> | 2021-04-21 20:21:42 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-21 20:21:42 +0200 |
commit | 49ac1ce37bfaf3095d18138763bb536aa46d2087 (patch) | |
tree | d92e5a73e21ea7dc63c0912e9f48ad857a89d54c /src/ADS1115_WE.h | |
parent | Update library.properties (diff) | |
download | ADS1115_WE-49ac1ce37bfaf3095d18138763bb536aa46d2087.tar ADS1115_WE-49ac1ce37bfaf3095d18138763bb536aa46d2087.tar.gz ADS1115_WE-49ac1ce37bfaf3095d18138763bb536aa46d2087.tar.bz2 ADS1115_WE-49ac1ce37bfaf3095d18138763bb536aa46d2087.tar.lz ADS1115_WE-49ac1ce37bfaf3095d18138763bb536aa46d2087.tar.xz ADS1115_WE-49ac1ce37bfaf3095d18138763bb536aa46d2087.tar.zst ADS1115_WE-49ac1ce37bfaf3095d18138763bb536aa46d2087.zip |
Diffstat (limited to 'src/ADS1115_WE.h')
-rw-r--r-- | src/ADS1115_WE.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/ADS1115_WE.h b/src/ADS1115_WE.h index 395d4d0..3af248b 100644 --- a/src/ADS1115_WE.h +++ b/src/ADS1115_WE.h @@ -200,6 +200,12 @@ public: * You should ony use it in case you expect stable or slowly changing voltages. */ void setAutoRange(); + + /* Set the automatic voltage range permanantly, but the range will only be changed if the + * measured value is outside 30 - 80% of the maximum value of the current range. + * Therefore this method is faster than setAutoRange(). + */ + void setPermanentAutoRangeMode(bool autoMode); /* Set the inputs to be compared * @@ -263,6 +269,7 @@ private: uint16_t voltageRange; ADS1115_MEASURE_MODE deviceMeasureMode; int i2cAddress; + bool autoRangeMode; void delayAccToRate(convRate cr); int16_t calcLimit(float rawLimit); uint8_t writeRegister(uint8_t reg, uint16_t val); |