File tree Expand file tree Collapse file tree 2 files changed +13
-10
lines changed Expand file tree Collapse file tree 2 files changed +13
-10
lines changed Original file line number Diff line number Diff line change @@ -423,16 +423,16 @@ bool DallasTemperature::requestTemperaturesByAddress(
423423// Continue to check if the IC has responded with a temperature
424424void DallasTemperature::blockTillConversionComplete (uint8_t bitResolution) {
425425
426- unsigned long delms = millisToWaitForConversion (bitResolution);
427- if (checkForConversion && !parasite) {
428- unsigned long start = millis ();
429- while (! isConversionComplete () && ( millis () - start < delms))
430- yield ();
431- } else {
432- activateExternalPullup ();
433- delay (delms);
434- deactivateExternalPullup ();
435- }
426+ if (checkForConversion && !parasite) {
427+ unsigned long start = millis ();
428+ while (! isConversionComplete () && ( millis () - start < MAX_CONVERSION_TIMEOUT ))
429+ yield ();
430+ } else {
431+ unsigned long delms = millisToWaitForConversion (bitResolution);
432+ activateExternalPullup ();
433+ delay (delms);
434+ deactivateExternalPullup ();
435+ }
436436
437437}
438438
Original file line number Diff line number Diff line change 3737#define DEVICE_DISCONNECTED_F -196.6
3838#define DEVICE_DISCONNECTED_RAW -7040
3939
40+ // Other
41+ #define MAX_CONVERSION_TIMEOUT 750
42+
4043// For readPowerSupply on oneWire bus
4144#ifndef nullptr
4245#define nullptr NULL
You can’t perform that action at this time.
0 commit comments