]> mj.ucw.cz Git - home-hw.git/blobdiff - test-opencm3/ds18b20.c
Protab: More PWM
[home-hw.git] / test-opencm3 / ds18b20.c
index 53df2a674609dde16017e3a65067fb253a5c396d..434af43f9ac8ce7965b6e3cd7b65dbedc694e6bf 100644 (file)
@@ -18,7 +18,7 @@ static volatile u32 ds_dma_buffer;
 #define DS_DMA DMA1
 #define DS_DMA_CH 6
 
-#define DS_DEBUG
+#undef DS_DEBUG
 #undef DS_DEBUG2
 
 #ifdef DS_DEBUG
@@ -379,8 +379,9 @@ void ds_step(void)
                        if (!maxn--)
                                return;
                        ds_current_id++;
-                       if (ds_current_id >= DS_NUM_SENSORS)
+                       if (ds_current_id >= DS_NUM_SENSORS) {
                                ds_current_id = 0;
+                       }
                } while (!ds_sensors[ds_current_id].address[0]);
 #endif
                if (!ds_activate()) {