소스 검색

Updated module slave commands

xnecas 1 주 전
부모
커밋
852d96e9f4
1개의 변경된 파일과 9개의 추가작업 그리고 4개의 파일을 삭제
  1. 9 4
      nbus_api/nbus_module_slave.py

+ 9 - 4
nbus_api/nbus_module_slave.py

@@ -367,11 +367,14 @@ class NBusSlaveModule:
     ================================================================================================================
     """
 
-    def start_streaming(self) -> None:
+    def start_streaming(self, send_start: bool) -> None:
         """
         Start data streaming (e.g. auto-cast).
+        :param send_start: flag to determine whether to send start cmd
         """
-        self.cmd_set_module_start()
+        if send_start:
+            self.cmd_set_module_start()
+
         self.__acquire_thread = Thread(target=self.__acquire_callback)
         self.__in_acquisition = True
 
@@ -381,11 +384,13 @@ class NBusSlaveModule:
 
         self.__acquire_thread.start()
 
-    def stop_streaming(self):
+    def stop_streaming(self, send_stop: bool) -> None:
         """
         Stop data streaming (e.g. auto-cast).
+        :param send_stop: flag to determine whether to send start cmd
         """
-        self.cmd_set_module_stop()
+        if send_stop:
+            self.cmd_set_module_stop()
 
         self.__in_acquisition = False