This commit is contained in:
szdot 2023-09-17 22:04:37 +08:00
parent 07f70cc473
commit 1600eab2ea

View File

@ -142,7 +142,8 @@ void mqtt_receiveCallback(char* topic, byte* payload, unsigned int length) {
} else if (key == "getPlaneState") { //获取飞机状态 } else if (key == "getPlaneState") { //获取飞机状态
fc.pubMQTTmsg("planeState", "{\"state\":" + topicPubMsg[10] + "}"); //终端主动get飞机状态 fc.pubMQTTmsg("planeState", "{\"state\":" + topicPubMsg[10] + "}"); //终端主动get飞机状态
} else if (key == "resetState") { //恢复飞机为初始状态 } else if (key == "resetState") { //恢复飞机为初始状态
topicPubMsg[10] = "1"; //恢复初始状态 String todo = value; //转换值
topicPubMsg[10] = todo; //恢复初始状态
} else if (key == "chan1") { } else if (key == "chan1") {
uint16_t todo = value; //转换值 uint16_t todo = value; //转换值
fc.channels[0] = todo; //恢复初始状态 fc.channels[0] = todo; //恢复初始状态