소스 검색

Added buffer index reset.

Volodymyr Shylov 11 달 전
부모
커밋
111e5f5933
1개의 변경된 파일4개의 추가작업 그리고 1개의 파일을 삭제
  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();
   }