Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: main.cpp
- Revision:
- 23:a141ca857b8f
- Parent:
- 22:539311b65796
- Child:
- 25:806e67a1218f
--- a/main.cpp Fri Mar 27 18:53:23 2015 +0000
+++ b/main.cpp Fri Mar 27 19:17:53 2015 +0000
@@ -297,10 +297,10 @@
num_of_left++;
turn_right = false;
- if (left_counter + bullshit_offset > -.33)
+ if (left_counter + bullshit_offset > -.30)
TFC_SetServo(0,left_counter + bullshit_offset ); // set turning servo
else
- TFC_SetServo(0, -.33);
+ TFC_SetServo(0, -.30);
// normalize to center each frame
// left turning is - servo
@@ -319,7 +319,7 @@
need_decel = false;
}
else // turning speeds
- TFC_SetMotorPWM(current_left_motor_speed+(.25*left_counter), current_right_motor_speed+(.35*left_counter)+(.0001*num_of_left)); // ++left is slowed, ++right is faster
+ TFC_SetMotorPWM(current_left_motor_speed+(.26*left_counter), current_right_motor_speed+(.36*left_counter)+(.0001*num_of_left)); // ++left is slowed, ++right is faster
}// end of turn left
// set servo and motors according to how much right we need to turn