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; //恢复初始状态