テスト用 gps手入力

Dependencies:   ATP3012 mbed a HMC US015_2 getGPS

Files at this revision

API Documentation at this revision

Comitter:
miyajitakenari
Date:
Fri Nov 12 14:57:45 2021 +0000
Parent:
2:023018a67341
Commit message:
finish

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
mbed.bld Show annotated file Show diff for this revision Revisions of this file
diff -r 023018a67341 -r cad76afeff0f Function.h
--- a/Function.h	Thu Nov 11 11:06:39 2021 +0000
+++ b/Function.h	Fri Nov 12 14:57:45 2021 +0000
@@ -157,14 +157,14 @@
     char mess[100];            
         if(talk.IsActive(timeout_ms)==true){
             xbee.printf("Active\n\rspeak flag=");
-            wait(3);
+            wait(5);
             if(xbee.readable()){
                 xbee.printf("\n\rmessage=");
                 int i=0;
                     do{
                         mess[i++]= xbee.getc();
                     }
-                    while(mess[i-1]!= 0x0d && i<99);
+                    while(mess[i-1]!= 0x0d);
                 talk.Synthe(mess);
             }
             else{
diff -r 023018a67341 -r cad76afeff0f main.cpp
--- a/main.cpp	Thu Nov 11 11:06:39 2021 +0000
+++ b/main.cpp	Fri Nov 12 14:57:45 2021 +0000
@@ -44,7 +44,7 @@
         while (1) {
                 speak();
                 direction = AngleGet();
-                xbee.printf("direction=%f\n\rdirection start", direction);
+                xbee.printf("\n\rdirection=%f\n\rdirection start", direction);
                 int df=1;
                 //角度調節
                 while(1) {
@@ -86,13 +86,14 @@
                         as[1]=0.5;
                         }
                 Move('2', as[1]);
-                xbee.printf("mortor mode:2 speed:%f",as[1]);
+                xbee.printf("mortor mode:2 speed:%f\n\r",as[1]);
                 catchGPS();
-                xbee.printf("GPS_x=xbee input");
+                xbee.printf("GPS_x=");
                 xbee.scanf("%lf",&GPS_x);
-                xbee.printf("GPS_y=xbee input");
+                xbee.printf("\n\rGPS_y=");
                 xbee.scanf("%lf",&GPS_y);
-                xbee.printf("now point(lati, long)=%lf , %lf\r\n", gps.latitude, gps.longitude);
+                //xbee.printf("now point(lati, long)=%lf , %lf\r\n", gps.latitude, gps.longitude);
+                xbee.printf("\n\rX=%d\n\rY=%d\n\r",GPS_x,GPS_y);
                 
                 double lati = 111132.8715;    //1度あたりの緯度の距離(m)
                 double longi = 91535.79099;    //1度あたりの経度の距離(m)
@@ -106,7 +107,7 @@
             }//while(1){}
         }//for(){}
     // 行動フロー終了
-    xbee.printf("End\r\n");
+    xbee.printf("\n\rEnd\r\n");
     Move('1', 0);      //停止
     xbee.printf("mortor mode:1 speed:0");
     return 0;
diff -r 023018a67341 -r cad76afeff0f mbed.bld
--- a/mbed.bld	Thu Nov 11 11:06:39 2021 +0000
+++ b/mbed.bld	Fri Nov 12 14:57:45 2021 +0000
@@ -1,1 +1,1 @@
-https://os.mbed.com/users/mbed_official/code/mbed/builds/65be27845400
\ No newline at end of file
+https://os.mbed.com/users/mbed_official/code/mbed/builds/f9eeca106725
\ No newline at end of file