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.
Dependencies: mbed SpeedController Encoder CruizCore_R1370P
Diff: main.cpp
- Revision:
- 14:4bdb572bf464
- Parent:
- 13:f834d5e83e11
- Child:
- 15:e26bad257626
--- a/main.cpp Thu Mar 05 07:58:59 2020 +0000
+++ b/main.cpp Thu Mar 05 08:02:27 2020 +0000
@@ -214,7 +214,9 @@
if(dx<300 &&dx>-300) {
if(dy<300 && dy>-300) {
- a=a-0.1;
+ if(a>5) {
+ a=a-0.1;
+ }
if(dx<50 && dx>-50) {
if(dy<50 && dy>-50) {
n++;
@@ -229,6 +231,10 @@
}
}
+ } else {
+ if(a<10) {
+ a=a+0.01;
+ }
}
if(n>4) {
for(int j=0; j<4; j++) {