wang tang / watersenor_and_temp_code

Dependencies:   OneWire

Dependents:   IDW01M1-MQTT3 DS1820_IDW01M1 DS1820_IDW01M1_finish Dissolved_oxygen_sensor_online ... more

Fork of DS1820 by Zoltan Hudak

Files at this revision

API Documentation at this revision

Comitter:
hudakz
Date:
Mon Mar 16 08:52:33 2015 +0000
Parent:
1:e4689408d617
Child:
3:a250babd0a9f
Commit message:
Bug fix

Changed in this revision

DS1820.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/DS1820.cpp	Mon Mar 16 08:35:03 2015 +0000
+++ b/DS1820.cpp	Mon Mar 16 08:52:33 2015 +0000
@@ -96,17 +96,17 @@
             present = 0;
 #if DEBUG
             serial.printf("Device doesn't belong to the DS1820 family\r\n");
+#endif            
             return false;
-#endif            
         }
         return true;
     }
+    else {
 #if DEBUG    
-    else {
         serial.printf("Invalid CRC!\r\n");
+#endif    
         return false;
     }
-#endif    
 }
 
 /**