From 1600eab2eac2e4e02933a1cca81a9a18178a4918 Mon Sep 17 00:00:00 2001 From: szdot Date: Sun, 17 Sep 2023 22:04:37 +0800 Subject: [PATCH] test --- FoodDelivery.ino | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/FoodDelivery.ino b/FoodDelivery.ino index 420e4e6..84700d1 100644 --- a/FoodDelivery.ino +++ b/FoodDelivery.ino @@ -142,7 +142,8 @@ void mqtt_receiveCallback(char* topic, byte* payload, unsigned int length) { } else if (key == "getPlaneState") { //获取飞机状态 fc.pubMQTTmsg("planeState", "{\"state\":" + topicPubMsg[10] + "}"); //终端主动get飞机状态 } else if (key == "resetState") { //恢复飞机为初始状态 - topicPubMsg[10] = "1"; //恢复初始状态 + String todo = value; //转换值 + topicPubMsg[10] = todo; //恢复初始状态 } else if (key == "chan1") { uint16_t todo = value; //转换值 fc.channels[0] = todo; //恢复初始状态