-
Notifications
You must be signed in to change notification settings - Fork 499
Rob tillaart master #35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
+ collapsed readScratchPad into a loop
+ check return value wire.reset() in readScratchPad
…-Control-Library into pezinek-master Conflicts: DallasTemperature.cpp @milesburton. Merged code and cleaned up code formatting (somewhat)
…up code formatting somewhat
Cleaned up README
Reverting sig
Removed dup
|
@milesburton I found one function with a bug in it. (already existed) void DallasTemperature::blockTillConversionComplete(uint8_t bitResolution, const uint8_t* deviceAddress){
int delms = millisToWaitForConversion(bitResolution);
if (deviceAddress != NULL && checkForConversion && !parasite){
unsigned long timend = millis() + delms;
while(!isConversionAvailable(deviceAddress) && (millis() < timend));
} else {
delay(delms);
}
}should be void DallasTemperature::blockTillConversionComplete(uint8_t bitResolution, const uint8_t* deviceAddress){
int delms = millisToWaitForConversion(bitResolution);
if (deviceAddress != NULL && checkForConversion && !parasite){
unsigned long now = millis();
while(!isConversionAvailable(deviceAddress) && (millis() - delms < now));
} else {
delay(delms);
}
}As times may only be subtracted otherwise the comparison fails when the uint32_t rolls over. for the rest it looks good to me. |
|
Ah that would be useful. I'll take a look at that formatter. I'll make those modifications and merge later today. |
Updated blockTillConversionComplete to fix bug
|
Okay cool, I'm going to merge this change then create a new branch to sort out the style and rollover bug |
Merged with RobTillart