robot
Dependencies: Encoder HIDScope MODSERIAL TouchButton mbed-dsp mbed
Fork of Robot2false by
Diff: main.cpp
- Revision:
- 46:8b30338f3f9b
- Parent:
- 45:d359aad22a8a
- Child:
- 47:8cef7b0badea
--- a/main.cpp Sun Nov 02 13:28:10 2014 +0000 +++ b/main.cpp Sun Nov 02 13:34:56 2014 +0000 @@ -79,7 +79,7 @@ float highpass_const[] = {0.6389437261127494, -1.2778874522254988, 0.6389437261127494, 1.1429772843080923, -0.41279762014290533};//{a0 a1 a2 -b1 -b2} float highpass_states[4]; -bool stop; +/*bool stop;*/ float pwm; float new_pos; float new_pwm; @@ -425,7 +425,7 @@ Ticker looptimer1; //pwm_motor1.write(0.3); motordir1 = 1; - stop = 0; + //stop = 0; looptimer1.attach(motor1aansturing,TSAMP1); wait(2); ////is aan te passen (tijd die nodig is om balletje te slaan looptimer1.detach(); @@ -709,7 +709,7 @@ toestand = TERUGKEREN; pwm_motor1.write(0);//arvid had hier 0,0 gezet?! pc.printf("toestand = terugkeren, wacht tot 2e ticker\n\r"); - stop = 1; + //stop = 1; } break; @@ -718,7 +718,7 @@ //?? motor1.getPosition(nieuwe positie); pwm_motor1.write(0); pc.printf("ifwachten\n"); - if (snelheidsstand != 0 && stop == 0) { + if (snelheidsstand != 0 /*&& stop == 0*/) { toestand = SLAAN; pc.printf("slaan \n"); switch(snelheidsstand) {