Quellcode durchsuchen

!2 reduce many logs

pcacc vor 1 Monat
Ursprung
Commit
743477713c
2 geänderte Dateien mit 4 neuen und 5 gelöschten Zeilen
  1. 4 1
      scriptBase/comon.py
  2. 0 4
      scriptBase/imgFind.py

+ 4 - 1
scriptBase/comon.py

@@ -63,7 +63,7 @@ def waitFindImg(imgPath, waitTime, preWaitTime, isCV=False):
         else:
             myTimeSleep(0.2)
             curTime = curTime + 0.2
-    
+    print("waitFindImg failed", imgPath)
     return False, None
 
 def waitFindImg_withBool(imgPath, waitTime, preWaitTime, isCV=False):
@@ -85,6 +85,7 @@ def waitClickImg_noWait(imgPath, waitTime, preWaitTime, isCV=False):
         else:
             myTimeSleep(0.2)
             curTime = curTime + 0.2
+    print("waitClickImg_noWait failed", imgPath)
     return False, (-1, -1)
 
 def waitClickImg_noWait_withBool(imgPath, waitTime, preWaitTime, isCV=False):
@@ -115,6 +116,7 @@ def waitclickMultiImg(imgArr, waitTime, preWaitTime):
         else:
             myTimeSleep(0.2)
             curTime = curTime + 0.2
+    print("waitclickMultiImg failed", imgArr)
     return False, (-1, -1)
 
 
@@ -153,6 +155,7 @@ def waitClickImg(imgPath, waitTime, preWaitTime, isCV=False):
         else:
             myTimeSleep(0.2)
             curTime = curTime + 0.2
+    print("waitClickImg failed", imgPath)
     return False, (-1, -1)
 
 def waitClickImg_withBool(imgPath, waitTime, preWaitTime, isCV=False):

+ 0 - 4
scriptBase/imgFind.py

@@ -172,7 +172,6 @@ class pcacc_img:
         matches = list(zip(*loc[::-1]))  # 转换为(x,y)坐标列表
         
         if len(matches) == 0:
-            print(f"{image_path} cv图片未找到")
             return False, (-1, -1)
         
         # 根据搜索顺序排序匹配结果[7](@ref)
@@ -219,7 +218,6 @@ class pcacc_img:
             print(f"{image_path} origin:({dst_x}, {dst_y})")
             return True, (dst_x, dst_y)
         else:
-            print(f"{image_path} origin:图片未找到")
             return False, (-1, -1)
         
     def find_img_down(image_path):
@@ -256,7 +254,6 @@ class pcacc_img:
             print(f"down {image_path}:({dst_x}, {dst_y})")
             return True, (dst_x, dst_y)
         else:
-            print(f"{image_path} down图片未找到")
             return False, (-1, -1)
 
 
@@ -291,7 +288,6 @@ class pcacc_img:
             print(f"{image_path}:({dst_x}, {dst_y})")
             return True, (dst_x, dst_y)
         else:
-            print(f"{image_path}图片未找到")
             return False, (-1, -1)
 
     @staticmethod