Dependents:   NHK2020-main NHK2020-main1 NHK2020_main_ros1_2_25

Revision:
10:c5ad8660c8fd
Parent:
7:9380ae04df1b
--- 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();