Created
August 17, 2018 05:11
-
-
Save HamishB/05c042730bee321f07e7f1b3babd6309 to your computer and use it in GitHub Desktop.
patch for adafruit/MAX31850_DallasTemp issue #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- MAX31850_DallasTemp.cpp.ORIG 2015-04-01 08:09:15.000000000 +1300 | |
+++ MAX31850_DallasTemp.cpp 2018-08-17 17:03:54.633771256 +1200 | |
@@ -371,25 +371,29 @@ | |
unsigned long start = millis(); | |
while(!isConversionAvailable(0) && ((millis() - start) < 750)); | |
} | |
- | |
- // Wait a fix number of cycles till conversion is complete (based on IC datasheet) | |
- switch (*bitResolution) | |
+ | |
+ // Wait a fixed number of cycles till conversion is complete (based on IC datasheets) | |
+ if(deviceAddress[0] == MAX31850MODEL) | |
+ delay(100); | |
+ else // DS18B20 | |
{ | |
- case 9: | |
- delay(94); | |
- break; | |
- case 10: | |
- delay(188); | |
- break; | |
- case 11: | |
- delay(375); | |
- break; | |
- case 12: | |
- default: | |
- delay(750); | |
- break; | |
+ switch (*bitResolution) | |
+ { | |
+ case 9: | |
+ delay(94); | |
+ break; | |
+ case 10: | |
+ delay(188); | |
+ break; | |
+ case 11: | |
+ delay(375); | |
+ break; | |
+ case 12: | |
+ default: | |
+ delay(750); | |
+ break; | |
+ } | |
} | |
- | |
} | |
// sends command for one device to perform a temp conversion by index |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment