summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Luka Šijanec <anton@sijanec.eu>2023-05-01 17:47:15 +0200
committerAnton Luka Šijanec <anton@sijanec.eu>2023-05-01 17:47:15 +0200
commit3b845f1ad7a8d2d5374314fe8d7e6adb9ef6fb3a (patch)
tree9820b46ae83c5e394e68ad697e1552c4536d7d57
parentUpdate library.properties (diff)
downloadADS1115_WE-3b845f1ad7a8d2d5374314fe8d7e6adb9ef6fb3a.tar
ADS1115_WE-3b845f1ad7a8d2d5374314fe8d7e6adb9ef6fb3a.tar.gz
ADS1115_WE-3b845f1ad7a8d2d5374314fe8d7e6adb9ef6fb3a.tar.bz2
ADS1115_WE-3b845f1ad7a8d2d5374314fe8d7e6adb9ef6fb3a.tar.lz
ADS1115_WE-3b845f1ad7a8d2d5374314fe8d7e6adb9ef6fb3a.tar.xz
ADS1115_WE-3b845f1ad7a8d2d5374314fe8d7e6adb9ef6fb3a.tar.zst
ADS1115_WE-3b845f1ad7a8d2d5374314fe8d7e6adb9ef6fb3a.zip
-rw-r--r--src/ADS1115_WE.cpp4
-rw-r--r--src/ADS1115_WE.h1
2 files changed, 4 insertions, 1 deletions
diff --git a/src/ADS1115_WE.cpp b/src/ADS1115_WE.cpp
index 0716372..b7652e8 100644
--- a/src/ADS1115_WE.cpp
+++ b/src/ADS1115_WE.cpp
@@ -190,6 +190,8 @@ void ADS1115_WE::setPermanentAutoRangeMode(bool autoMode){
}
void ADS1115_WE::delayAccToRate(convRate cr){
+ if (skip_delays)
+ return;
switch(cr){
case ADS1115_8_SPS:
delay(130);
@@ -351,4 +353,4 @@ uint16_t ADS1115_WE::readRegister(uint8_t reg){
#endif
regValue = (MSByte<<8) + LSByte;
return regValue;
-} \ No newline at end of file
+}
diff --git a/src/ADS1115_WE.h b/src/ADS1115_WE.h
index 5cb3eb2..6f1626c 100644
--- a/src/ADS1115_WE.h
+++ b/src/ADS1115_WE.h
@@ -274,6 +274,7 @@ class ADS1115_WE
void setAlertPinToConversionReady();
void clearAlert();
+ bool skip_delays;
protected:
#ifndef USE_TINY_WIRE_M_