prc 1 year ago
parent
commit
86b77dda6a
1 changed files with 4 additions and 5 deletions
  1. 4 5
      server/serial_device_controller.py

+ 4 - 5
server/serial_device_controller.py

@@ -558,9 +558,10 @@ class TestService(object):
             self.__test_circle(if_print=False)
         self.task_add_reset_error_rate()
         while True:
-            flag = self.__test_circle(if_print=True)
-            if flag == "break":
-                break
+            if self.__pause_tester_signal is False:
+                self.__test_circle(if_print=True)
+            else:
+                time.sleep(0.1)
 
     @staticmethod
     def __tester_output(message: str, if_print: bool):
@@ -573,8 +574,6 @@ class TestService(object):
             rev_flag_2 = False
         else:
             rev_flag_2 = self.__receiver2.pull_up_signal_when_receiving
-        if self.__pause_tester_signal is True:
-            return "break"
         if (self.__receiver2 is None) and (rev_flag_1 is True):
             count_all, pkg_lose_bytes, count_error = self.update_error_rate(1)
             self.__tester_output("====================================================", if_print)