Ver código fonte

Added buffer index reset.

Volodymyr Shylov 11 meses atrás
pai
commit
111e5f5933
1 arquivos alterados com 4 adições e 1 exclusões
  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();
   }