12/16用テスト

Dependencies:   ATP3012 mbed a HMC US015_2 getGPS

Files at this revision

API Documentation at this revision

Comitter:
ushiroji
Date:
Thu Dec 16 06:10:06 2021 +0000
Parent:
18:bd0b2394fa48
Commit message:
add catchGPS to AngleGet; change direction < 10 || direction > 350

Changed in this revision

Function.h Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r bd0b2394fa48 -r 52f8f01a29c5 Function.h
--- a/Function.h	Wed Dec 15 06:17:48 2021 +0000
+++ b/Function.h	Thu Dec 16 06:10:06 2021 +0000
@@ -106,6 +106,7 @@
     double theta;
     double delta;
 
+    catchGPS();
     xbee.printf("gps.latitude=%f, gps.longitude=%f\r\n", gps.latitude, gps.longitude);
     theta = atan2(next_CP_y - gps.longitude , next_CP_x - gps.latitude) * 180 / 3.14159265359;
     printf("theta=%f\r\n", theta);
diff -r bd0b2394fa48 -r 52f8f01a29c5 main.cpp
--- a/main.cpp	Wed Dec 15 06:17:48 2021 +0000
+++ b/main.cpp	Thu Dec 16 06:10:06 2021 +0000
@@ -67,7 +67,7 @@
                 direction = AngleGet();
                 xbee.printf("direction=%f\r\nrotation_start", direction);
                 while(1) {
-                    if(direction < 20 || direction > 340) {
+                    if(direction < 10 || direction > 350) {
                         xbee.printf("rotation finish\r\n");
                         Move('1', 0);   //停止
                         Move('2', 0.39);