Browse Source

Added buffer index reset.

Volodymyr Shylov 11 tháng trước cách đây
mục cha
commit
111e5f5933
1 tập tin đã thay đổi với 4 bổ sung1 xóa
  1. 4 1
      src/main.c

+ 4 - 1
src/main.c

@@ -45,7 +45,10 @@ void main(void)
 
   /* Infinite loop */
   while (1) {
-    Delay(200);
+    Delay(100);
+    if (BufferIndex >= ADC_SMPLS) {
+      BufferIndex = 0;
+    }
     showV();
     showC();
   }