加了一个成员属性questVoiceStr 记录喊话内容;

写入航点判断存在喊话内容字段时  把字段内容赋予 questVoiceStr
This commit is contained in:
AIR 2023-07-04 17:20:11 +08:00
parent 8e8ee21a5f
commit 748d892146
2 changed files with 6 additions and 0 deletions

View File

@ -244,6 +244,10 @@ void writeRoute(String topicStr) {
double x = obj["tasks"][fc.writeSeq]["x"];
double y = obj["tasks"][fc.writeSeq]["y"];
double z = obj["tasks"][fc.writeSeq]["z"];
String str = obj["tasks"][fc.writeSeq]["sound"];
if(str != "" ){
fc.questVoiceStr = str;
}
fc.logln("frame--");
fc.logln(frame);
//写入航点

View File

@ -21,6 +21,8 @@ public:
int8_t writeSeq = -1; //飞控反馈 需写入航点序列号
int8_t futureSeq = 0; //记录将来要写入 航点序列号
int8_t missionArkType = -1; //航点写入是否成功
/*航点任务 送餐信息喊话*/
String questVoiceStr;
/*前端模拟遥控的油门通道*/
uint16_t channels[4] = { 1500, 1500, 1500, 1500 };
/*初始化*/