add homotopy

Fork of YNU_MPUd2h by hige dura

Revision:
1:ca296cfa603b
Parent:
0:9aa9be24636a
Child:
2:30f96c159d9c
--- a/main.cpp	Sun Jan 06 06:37:09 2013 +0000
+++ b/main.cpp	Sun Jan 06 07:11:34 2013 +0000
@@ -15,8 +15,9 @@
 DigitalIn stop_sd(p11);
 
 int main() {
-    
-    pc.baud(921600);
+        
+    // ******************** TORATANI ********************
+    //pc.baud(921600);
     mavc.baud(115200);
     
     char  buf_char;
@@ -39,21 +40,14 @@
     D[0]    =   0xff;   D[1]    =   0xff;       // p_com
     D[2]    =   0x7f;   D[3]    =   0xff;       // q_com
     D[4]    =   0x00;   D[5]    =   0x00;       // r_com
-    test[0] =   0x10;   test[1] =   0x20;      test[2] =   0x30;
-    test[3] =   0x40;   test[4] =   0x50;      test[5] =   0x60;
-    test[6] =   0x70;   test[7] =   0x80;      test[8] =   0x90;
-    
-    //mkdir("/sd/mydir", 0777);
+    // ******************** TORATANI ********************
     
     FILE *fp = fopen("/sd/sdtest.txt", "w");
     if(fp == NULL) {
         error("Could not open file for write\n");
     }
-        
-    //pc.printf("\r\n\r\nYNU MPU\r\n\r\n");
     
-    //while(1){
-    while(stop_sd==0){
+    while(1){
     //for(int j=0;j<1800;j++){      flag tukuru     // for 2 minuts
         
         // ******************** sequence No.1 ********************
@@ -91,11 +85,9 @@
             //com
             // ******************** control law ********************
             
-            pc.printf("%7.4f %7.4f %7.4f %7.3f %7.3f %7.3f %8.5f %8.1f %8.1f %8.1f\r\n", acc[0], acc[1], acc[2], gyro[0], gyro[1], gyro[2], azi, alt, GPS[0], GPS[1]);
-            fprintf(fp, "%7.4f %7.4f %7.4f %7.3f %7.3f %7.3f %8.5f %8.1f %8.1f %8.1f\r\n", acc[0], acc[1], acc[2], gyro[0], gyro[1], gyro[2], azi, alt, GPS[0], GPS[1]);
+            //pc.printf("%7.4f %7.4f %7.4f %7.3f %7.3f %7.3f %8.5f %8.1f %8.1f %8.1f\r\n", acc[0], acc[1], acc[2], gyro[0], gyro[1], gyro[2], azi, alt, GPS[0], GPS[1]);
+            //fprintf(fp, "%7.4f %7.4f %7.4f %7.3f %7.3f %7.3f %8.5f %8.1f %8.1f %8.1f\r\n", acc[0], acc[1], acc[2], gyro[0], gyro[1], gyro[2], azi, alt, GPS[0], GPS[1]);
                         
-            // !!! fclose(fp); 
-            
         }
              
     }