wu

Dependencies:   mbed-rtos mbed

Fork of CCC by kao yi

Files at this revision

API Documentation at this revision

Comitter:
backman
Date:
Mon Jun 30 03:37:05 2014 +0000
Parent:
16:b78dce5c0e98
Commit message:
wu

Changed in this revision

camera_api.cpp 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
--- a/camera_api.cpp	Sun Jun 29 14:32:30 2014 +0000
+++ b/camera_api.cpp	Mon Jun 30 03:37:05 2014 +0000
@@ -84,7 +84,7 @@
     int b_thr_dn=5;
     int b_w=0;
     
-     for(int i=r_care;i>l_care;i--){
+     for(int i=l_care;i<r_care;i++){
          
          
           if(l_f1==false&&sign_line_imageL[i]==' '){
@@ -98,7 +98,7 @@
            }
          
            if(l_f1==true && l_f2== true){
-               b_w=b_start-b_end;
+               b_w=b_end-b_start;
                if( b_thr_up>b_w&&b_w> b_thr_dn){
                    
                    find=true;     
--- a/main.cpp	Sun Jun 29 14:32:30 2014 +0000
+++ b/main.cpp	Mon Jun 30 03:37:05 2014 +0000
@@ -8,8 +8,8 @@
 #include "TSISensor.h"
 
 #define Debug_cam_uart
-//#define L_eye
-#define R_eye
+#define L_eye
+//#define R_eye
 #define motor_on 
 #define Pcontroller
 #define task_ma_time
@@ -93,7 +93,7 @@
     stdio_mutex.lock();    
     #ifdef Debug_cam_uart 
       #ifdef L_eye  
-         pc.printf("R: ");
+         pc.printf("L: ");
         for(int i=128;i>=0;i--){
              if(i==64)
                pc.printf("X");
@@ -119,8 +119,10 @@
              else          
                pc.printf("%c", cam.sign_line_imageR[i]);         
          }
-         pc.printf("\r\n center :%d servo: %f \r\n",cam.black_centerR(),v_servo);
-     #endif
+          #endif
+         
+         pc.printf("\r\n Rcenter :%d Lcenter : %d servo: %f \r\n",cam.black_centerR(),cam.black_centerL(),v_servo);
+    
          
          stdio_mutex.unlock();