summaryrefslogtreecommitdiffstats
path: root/src/ADS1115_WE.h
diff options
context:
space:
mode:
authorWolfgang (Wolle) Ewald <wolfgang.ewald@wolles-elektronikkiste.de>2021-04-21 20:21:42 +0200
committerGitHub <noreply@github.com>2021-04-21 20:21:42 +0200
commit49ac1ce37bfaf3095d18138763bb536aa46d2087 (patch)
treed92e5a73e21ea7dc63c0912e9f48ad857a89d54c /src/ADS1115_WE.h
parentUpdate library.properties (diff)
downloadADS1115_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 '')
-rw-r--r--src/ADS1115_WE.h7
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);