No.9 Robotics / Mbed 2 deprecated Robotics_DCMotor

Dependencies:   mbed

Fork of Robotics_Lab_DCMotor by LDSC_Robotics

Files at this revision

API Documentation at this revision

Comitter:
ChangYuHsuan
Date:
Thu Apr 14 08:51:41 2016 +0000
Parent:
4:04702de80697
Child:
6:da43b63ffb24
Commit message:
Yu Hsuan;

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Thu Apr 14 08:47:12 2016 +0000
+++ b/main.cpp	Thu Apr 14 08:51:41 2016 +0000
@@ -187,9 +187,9 @@
     //Forward: v2Count +1
     //Inverse: v2Count -1
     if ( (state_2 == (state_2_old + 1)) || (state_2 == (state_2_old - 3)) )
-        v1Count++;
+        v2Count++;
     else if ( (state_2 == (state_2_old - 1)) || (state_2  == (state_2_old + 3)))
-        v1Count--;
+        v2Count--;
 }
 
 void init_TIMER(void)