diff --git a/src/commser.cpp b/src/commser.cpp index 9006fc5..23128cc 100644 --- a/src/commser.cpp +++ b/src/commser.cpp @@ -102,10 +102,10 @@ void mqtt_receiveCallback(char *topic, byte *payload, unsigned int length) uint8_t state = obj["state"]; // 标记飞机状态 0 or 1 // 标记飞机状态 topicPubMsg[10] = fc.setNBit(topicPubMsg[10], n, state); - if (n = 5 && state == 1) // 执行任务 ps:且自动 + if (n = 5 && state == 1) // 执行任务 ps:切自动 { // 切模式 - set_mode(AUTO); // 设置飞控为定高模式 + set_mode(AUTO); // 设置飞控为自动模式 // 油门 delay(500); uint16_t chan[] = {1500, 1500, 1500, 1500}; // 加解锁 油门到底