diff --git a/smp_coder/mqtt_smp.py b/smp_coder/mqtt_smp.py index 3dbfc5d..c9b92a7 100644 --- a/smp_coder/mqtt_smp.py +++ b/smp_coder/mqtt_smp.py @@ -52,12 +52,16 @@ while not response_received: 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("启动树莓派拍照客户端成功。") +client.publish("response/topic", "启动树莓派拍照客户端成功", qos=2) + +# 停止网络循环并断开连接 +client.loop_stop() +client.disconnect() + print("收到响应,客户端退出。")