![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
not checked because compiler was down, but this should do everything!!!!
Dependencies: FastPWM HIDScope MODSERIAL QEI biquadFilter mbed
Fork of EMG4 by
Revision 28:fc099a3e37fd, committed 2016-11-04
- Comitter:
- Revave
- Date:
- Fri Nov 04 06:05:32 2016 +0000
- Parent:
- 27:0dbd4fd88593
- Commit message:
- this should be it, but still unchecked :/
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 0dbd4fd88593 -r fc099a3e37fd main.cpp --- a/main.cpp Fri Nov 04 04:32:35 2016 +0000 +++ b/main.cpp Fri Nov 04 06:05:32 2016 +0000 @@ -203,11 +203,13 @@ case 0: { modesw = 1; + wait(1.0); break; } case 1: { modesw = 0; + wait(1.0); break; } @@ -230,9 +232,14 @@ { count = Encoder.getPulses(); m2direction = 1; - if (count<lowerlimit + if (count<lowerlimit) + { motorpwm2.write(totalpwm2); break; + } + else + { + superstop(); } } @@ -254,9 +261,14 @@ } case 1: { - m1direction = 0; - motorpwm2.write(totalpwm1); - break; + If (count>higherlimit) + { + m1direction = 0; + motorpwm2.write(totalpwm1); + break; + } + else + superstop(); } }