From 01848881d5b0a47fc083f5e39e6774359b1b925b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=8D=E6=B1=82=E5=9C=A3=E5=89=91?= Date: Tue, 14 Oct 2025 15:12:02 +0800 Subject: [PATCH] Refactor data transmission example: comment out sleep and data sending, extend simulation duration to 1000 seconds for improved testing. --- data_transmission_example.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/data_transmission_example.py b/data_transmission_example.py index 6472287..e61e444 100644 --- a/data_transmission_example.py +++ b/data_transmission_example.py @@ -39,9 +39,9 @@ class DataTransmissionExample: if msg.topic == "device/data-get": print(f"📨 收到数据请求: {msg.payload.decode()}") # 模拟处理时间 - time.sleep(0.1) + # time.sleep(0.1) # 发送模拟数据 - self.send_device_data() + # self.send_device_data() def generate_sample_data(self): """生成模拟的设备数据""" @@ -166,7 +166,7 @@ def main(): example.setup_mqtt() # 启动模拟(运行60秒) - example.start_simulation(duration=60) + example.start_simulation(duration=1000) if __name__ == "__main__": main()