Browse Source

CTMenu
1、完成__exitUsbSource函数,但无环境验证

scbc.sat2 5 years ago
parent
commit
8fc86dc638
1 changed files with 29 additions and 1 deletions
  1. 29 1
      ssat_sdk/MenuTree3/TMenu.py

+ 29 - 1
ssat_sdk/MenuTree3/TMenu.py

@@ -117,7 +117,35 @@ class CTMenu(CBaseLog):
     返回:
     '''
     def __exitUsbSource(self, opa):
-        pass
+        count = 0
+        while count < 3:
+            count += 1
+            # 因为信源界面消失了,需要再调用一次.
+            opa.callFirstOptionShortCutKey()
+            # 判断是否聚焦成功;
+            if opa.isOnFirstOption()[0] is True:
+                break
+
+            self.tvOperator.sendKey("ok", duration=2)
+            # 因为信源界面消失了,需要再调用一次.
+            opa.callFirstOptionShortCutKey()
+            # 判断是否聚焦成功;
+            if opa.isOnFirstOption()[0] is True:
+                break
+
+            self.tvOperator.sendKey("exit", duration=2)
+            # 因为信源界面消失了,需要再调用一次.
+            opa.callFirstOptionShortCutKey()
+            # 判断是否聚焦成功;
+            if opa.isOnFirstOption()[0] is True:
+                break
+
+            self.tvOperator.sendKey("return", duration=2)
+            # 因为信源界面消失了,需要再调用一次.
+            opa.callFirstOptionShortCutKey()
+            # 判断是否聚焦成功;
+            if opa.isOnFirstOption()[0] is True:
+                break
 
     '''
     函数:移动到目标信源节点上。