![](/media/cache/group/9e3cc099b3b04bca937a1cca1da81b19.jpg.50x50_q85.jpg)
De hele robot in 1 keer bam
Dependencies: mbed QEI Servo HIDScope biquadFilter MODSERIAL FastPWM
Diff: main.cpp
- Revision:
- 60:762b5c925e13
- Parent:
- 59:57b9d3076930
- Child:
- 61:07035c03cf29
--- a/main.cpp Fri Nov 01 00:22:16 2019 +0000 +++ b/main.cpp Fri Nov 01 00:25:45 2019 +0000 @@ -97,7 +97,7 @@ bool exit_operation = false; // Demo Substate variables -enum Demo_States { demo_wait, demo_motor_cal, demo_XY }; // Define demo substates +enum Demo_States { demo_wait, demo_motor_cal, demo_positioning, demo_XY }; // Define demo substates Demo_States demo_curr_state; // Initialize demo substate variable bool demo_state_changed = true; // Enable entry functions bool exit_demo = false; @@ -978,7 +978,7 @@ // State transition guard if ( button1_pressed == true ) { // demo_XY button1_pressed = false; - demo_curr_state = do_demo_positioning; + demo_curr_state = demo_positioning; demo_state_changed = true; // More functions } else if ( switch2_pressed == true ) { // Return to global wait @@ -1017,7 +1017,7 @@ timerStateChange.reset(); timerStateChange.start(); } - + Vx = 10.0; Vy = 10.0; @@ -1099,6 +1099,9 @@ case demo_motor_cal: do_demo_motor_cal(); break; + case demo_positioning: + do_demo_positioning(); + break; case demo_XY: do_demo_XY(); break;