From bb60e09ff9bcab504893b0cc26b58a5600a18e80 Mon Sep 17 00:00:00 2001 From: zart Date: Fri, 28 Jun 2024 09:45:04 +0800 Subject: [PATCH] msg MQTT message --- smp_coder/extur_smp.py | 3 +-- smp_coder/mqtt_smp.py | 4 ++++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/smp_coder/extur_smp.py b/smp_coder/extur_smp.py index 8a33905..ddb4dee 100644 --- a/smp_coder/extur_smp.py +++ b/smp_coder/extur_smp.py @@ -66,6 +66,5 @@ client.disconnect() print("收到响应,客户端退出。") -os.system("sudo myenv/bin/python3 smp_coder/extur_smp.py > logex.txt 2>&1 &") -print("启动树莓派拍照客户端成功。") + diff --git a/smp_coder/mqtt_smp.py b/smp_coder/mqtt_smp.py index 0a7e4f3..3dbfc5d 100644 --- a/smp_coder/mqtt_smp.py +++ b/smp_coder/mqtt_smp.py @@ -56,4 +56,8 @@ client.publish("response/topic", "Set user.txt success!", qos=2) client.loop_stop() client.disconnect() +os.system("sudo myenv/bin/python3 smp_coder/extur_smp.py > logex.txt 2>&1 &") +print("启动树莓派拍照客户端成功。") + print("收到响应,客户端退出。") +