]> the.earth.li Git - temper-clone.git/blobdiff - main.c
Add w1_read_bit() to improve waiting for result
[temper-clone.git] / main.c
diff --git a/main.c b/main.c
index 61064a084cbcc45ddf358d7437676c26a2db0155..a75a4fcd53bd0caccf8ddbe36bdc6be45fbde988 100644 (file)
--- a/main.c
+++ b/main.c
@@ -426,7 +426,7 @@ int main(void)
                        w1_write(0x44);         /* Convert T */
                        temp_state = 4;
                } else if (temp_state == 4) {
-                       if (w1_read_byte() == 0xFF)
+                       if (w1_read_bit())
                                temp_state = 5;
                } else if (temp_state == 5) {
                        if (w1_reset()) {