Dependents:   NHK2020-main NHK2020-main1 NHK2020_main_ros1_2_25

Files at this revision

API Documentation at this revision

Comitter:
yuki0701
Date:
Wed Dec 11 04:57:08 2019 +0000
Parent:
9:bf432b07f874
Commit message:
m

Changed in this revision

uw.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r bf432b07f874 -r c5ad8660c8fd uw.cpp
--- a/uw.cpp	Sun Jul 31 09:38:37 2016 +0000
+++ b/uw.cpp	Wed Dec 11 04:57:08 2019 +0000
@@ -17,9 +17,16 @@
     
     uw_.input();    
     t.start();
+    int flag = 0;
     while(!uw_){
         t.reset();
         t.start();
+        //printf("uw fail\n\r");
+        flag++;
+        if(flag>2000){
+            flag = 0;
+            return -1;   
+        }
         }
     do{
         res=t.read_us();