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: ATP3012 mbed TB6612FNG HMC6352 US015 getGPS
Revision 19:fb9b9795ad9e, committed 2021-10-28
- Comitter:
- ushiroji
- Date:
- Thu Oct 28 10:30:13 2021 +0000
- Parent:
- 18:057b39ca7bd1
- Commit message:
- test
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Thu Oct 28 09:57:35 2021 +0000
+++ b/main.cpp Thu Oct 28 10:30:13 2021 +0000
@@ -86,8 +86,8 @@
pc.printf("\n\rlongititude=");
pc.scanf("%lf",&gps.longitude);
pc.printf("%lf %lf\r\n", gps.latitude, gps.longitude);
- if ((next_CP_x - GPS_x)*(next_CP_x - GPS_x) + (next_CP_y = GPS_y)*(next_CP_y = GPS_y) < 0.01) { // CP到着判定 //試験で調整
- pc.printf("now leach cp[%d]=x_%f,y_%f",i,next_CP_x ,next_CP_y);
+ if ((next_CP_x - gps.latitude)*(next_CP_x - gps.latitude) + (next_CP_y - gps.longitude)*(next_CP_y -gps.longitude) < 0.01) { // CP到着判定 //試験で調整
+ pc.printf("now leach cp[%d]=x_%f,y_%f\r\n",i,next_CP_x ,next_CP_y);
break;
}
@@ -95,6 +95,7 @@
}
// 行動フロー終了
pc.printf("End\r\n");
+ Move('1', 0); //停止
return 0;
}
}