Pārlūkot izejas kodu

新增哭声检查、手势检测类型

zhangdongming 2 gadi atpakaļ
vecāks
revīzija
7eed0fcb6a
2 mainītis faili ar 8 papildinājumiem un 8 dzēšanām
  1. 3 1
      AnsjerPush/Config/aiConfig.py
  2. 5 7
      Service/DevicePushService.py

+ 3 - 1
AnsjerPush/Config/aiConfig.py

@@ -32,5 +32,7 @@ DEVICE_EVENT_TYPE = {
     128: 63,
     256: 64,
     512: 65,
-    1024: 66
+    1024: 66,
+    2048: 67,
+    4096: 68
 }

+ 5 - 7
Service/DevicePushService.py

@@ -197,21 +197,19 @@ class DevicePushService:
         """
         获取设备算法组合类型
         51:移动侦测,52:传感器报警,53:影像遗失,54:PIR,55:门磁报警,56:外部发报,57:人型报警(提示:有人出现),58:车型,59:宠物,60:人脸,61:异响,
-        62:区域闯入,63:区域闯出,64:长时间无人检测,65:长时间无人检测,66:往来检测
+        62:区域闯入,63:区域闯出,64:长时间无人检测,65:长时间无人检测,66:往来检测,67:哭声检测,68:手势检测
         0:代表空字符,702:摄像头休眠,703:摄像头唤醒,704:电量过低
         AWS AI识别 1:人形,2:车型,3:宠物,4:包裹。云端AI类型
-        @param event_type:
-        @return:
         """
         try:
             types = []
             combo_types = [51, 57, 58, 60, 59, 61,
-                           62, 63, 64, 65, 66]
+                           62, 63, 64, 65, 66, 67, 68]
             event_type = str(event_type)
             len_type = len(event_type)
-            for i in range(0, len_type):
-                e_type = int(event_type[len_type - 1 - i])
-                if e_type == 1:
+            for i in range(len_type):
+                e_type = event_type[len_type - 1 - i]
+                if e_type == '1':
                     types.append(str(combo_types[i]))
             LOGGING.info('算法对照打印:{}'.format(combo_types))
             return types