Tobis Programm forked to not destroy your golden files
Fork of Robocode by
Diff: source/movement.cpp
- Revision:
- 31:51f52ffa4b51
- Parent:
- 29:e7d0208bf2af
--- a/source/movement.cpp Mon Mar 13 12:48:21 2017 +0000 +++ b/source/movement.cpp Tue Mar 14 16:24:15 2017 +0000 @@ -2,7 +2,7 @@ * Movement function library * Handels Movement of the Robot **/ - +/* #include "mbed.h" #include "movement.h" @@ -33,7 +33,7 @@ DigitalOut led(LED1); // Board LED -//****************************************************************************** +// ****************************************************************************** void move_init() { @@ -47,7 +47,7 @@ PID_correction_value = 1.0f; } -//****************************************************************************** +// ****************************************************************************** void move_forward_slow(float correction_value) { pwmL.write(power_value_slow); @@ -74,7 +74,7 @@ pwmR = power_value_slow; } -//****************************************************************************** +// ****************************************************************************** void stop_movement() { @@ -111,19 +111,19 @@ // direction 0 = backward, direction 1 = forward // speed 0 = slow, speed 1 = medium - /*if(direction && speed) { + if(direction && speed) { move_forward_medium(PID_correction_value); - }*/ + } if(direction && !speed) { float value = 1.0f-power_value_slow*PID_correction_value; move_forward_slow(value); - }/* + } if(!direction && speed) { move_backward_medium(PID_correction_value); } if(!direction && !speed) { move_backward_slow(PID_correction_value); - }*/ + } } void terminate_movement() @@ -132,4 +132,4 @@ pwmL.write(0.5f); pwmR.write(0.5f); } - +*/