Fork of encoder2 by Rikuto Fukunaga

Files at this revision

API Documentation at this revision

Comitter:
kenken0721
Date:
Sun Apr 08 09:55:21 2018 +0000
Parent:
2:82a12d9f0bca
Commit message:

Changed in this revision

encoder2.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r 82a12d9f0bca -r 03bca13f0bf6 encoder2.cpp
--- a/encoder2.cpp	Tue Mar 27 03:45:26 2018 +0000
+++ b/encoder2.cpp	Sun Apr 08 09:55:21 2018 +0000
@@ -15,15 +15,15 @@
   if(B == true){
     count++;
     if(Z == true){
-        zcount++;
+        zcount = 1;
         count=0;
-    }
+    }else zcount = 0;
   }else{
     count--;
     if(Z == true){
-        zcount--;
+        zcount = 1;
         count=0;
-    }
+    }else zcount = 0;
   }
 }