File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -39,6 +39,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
39
39
### Fixed
40
40
- Fixed non-concurrent data fetch for SDI-12 when * NOT* using debugging.
41
41
- Fixed internet connection when in "testing mode"
42
+ - Allow a non-zero wait time for SDI-12 sensors
42
43
43
44
***
44
45
Original file line number Diff line number Diff line change @@ -268,7 +268,7 @@ int8_t SDI12Sensors::startSDI12Measurement(bool isConcurrent) {
268
268
// Try up to 3 times to start a measurement
269
269
uint8_t numVariables = 0 ;
270
270
uint8_t ntries = 0 ;
271
- int8_t wait = 0 ;
271
+ int8_t wait = - 1 ; // NOTE: The wait time can be 0!
272
272
while (numVariables != (_numReturnedValues - _incCalcValues) &&
273
273
ntries < 5 ) {
274
274
if (isConcurrent) {
@@ -358,7 +358,7 @@ bool SDI12Sensors::startSingleMeasurement(void) {
358
358
if (!wasActive) _SDI12Internal.end ();
359
359
360
360
// Set the times we've activated the sensor and asked for a measurement
361
- if (wait > 0 ) {
361
+ if (wait >= 0 ) {
362
362
MS_DBG (F (" Concurrent measurement started." ));
363
363
// Update the time that a measurement was requested
364
364
_millisMeasurementRequested = millis ();
@@ -537,7 +537,7 @@ bool SDI12Sensors::addSingleMeasurementResult(void) {
537
537
int8_t wait = startSDI12Measurement (false );
538
538
539
539
// Set the times we've activated the sensor and asked for a measurement
540
- if (wait > 0 ) {
540
+ if (wait >= 0 ) {
541
541
MS_DBG (F (" NON-concurrent measurement started." ));
542
542
// Update the time that a measurement was requested
543
543
_millisMeasurementRequested = millis ();
You can’t perform that action at this time.
0 commit comments