qDebug()<<QString("Received mission count message, but was wrong system id. Expected %1, received %2").arg(mavlink->getSystemId()).arg(mc.target_system);
qDebug()<<QString("Received mission count message, but was wrong system id. Expected %1, received %2").arg(mavlink->getSystemId()).arg(mc.target_system);
}
}
}
break;
caseMAVLINK_MSG_ID_MISSION_ITEM:
{
mavlink_mission_item_tmi;
mavlink_msg_mission_item_decode(&message,&mi);
if(!qgcApp()->useNewMissionEditor()){
mavlink_mission_item_tmi;
mavlink_msg_mission_item_decode(&message,&mi);
// Special case a 0 for the target system or component, it means that anyone is the target, so we should process this.
if(mi.target_system==0){
mi.target_system=mavlink->getSystemId();
}
if(mi.target_component==0){
mi.target_component=mavlink->getComponentId();
}
// Special case a 0 for the target system or component, it means that anyone is the target, so we should process this.
qDebug()<<QString("Received mission item message, but was wrong system id. Expected %1, received %2").arg(mavlink->getSystemId()).arg(mi.target_system);
qDebug()<<QString("Received mission item message, but was wrong system id. Expected %1, received %2").arg(mavlink->getSystemId()).arg(mi.target_system);
}
}
}
break;
caseMAVLINK_MSG_ID_MISSION_ACK:
{
mavlink_mission_ack_tma;
mavlink_msg_mission_ack_decode(&message,&ma);
if(!qgcApp()->useNewMissionEditor()){
mavlink_mission_ack_tma;
mavlink_msg_mission_ack_decode(&message,&ma);
// Special case a 0 for the target system or component, it means that anyone is the target, so we should process this.
if(ma.target_system==0){
ma.target_system=mavlink->getSystemId();
}
if(ma.target_component==0){
ma.target_component=mavlink->getComponentId();
}
// Special case a 0 for the target system or component, it means that anyone is the target, so we should process this.
qDebug()<<QString("Received mission ack message, but was wrong system id. Expected %1, received %2").arg(mavlink->getSystemId()).arg(ma.target_system);
qDebug()<<QString("Received mission ack message, but was wrong system id. Expected %1, received %2").arg(mavlink->getSystemId()).arg(ma.target_system);
}
}
}
break;
caseMAVLINK_MSG_ID_MISSION_REQUEST:
{
mavlink_mission_request_tmr;
mavlink_msg_mission_request_decode(&message,&mr);
if(!qgcApp()->useNewMissionEditor()){
mavlink_mission_request_tmr;
mavlink_msg_mission_request_decode(&message,&mr);
// Special case a 0 for the target system or component, it means that anyone is the target, so we should process this.
if(mr.target_system==0){
mr.target_system=mavlink->getSystemId();
}
if(mr.target_component==0){
mr.target_component=mavlink->getComponentId();
}
// Special case a 0 for the target system or component, it means that anyone is the target, so we should process this.
qDebug()<<QString("Received mission request message, but was wrong system id. Expected %1, received %2").arg(mavlink->getSystemId()).arg(mr.target_system);
qDebug()<<QString("Received mission request message, but was wrong system id. Expected %1, received %2").arg(mavlink->getSystemId()).arg(mr.target_system);
m_ui->displayBar->setText(QString("Go to <b>(</b>lat <b>%1<sup>o</sup></b>, lon <b>%2<sup>o</sup></b>, alt <b>%3)</b> and wait there for %4 sec; yaw: %5; rad: %6").arg(wp->x(),0,'f',7).arg(wp->y(),0,'f',7).arg(wp->z(),0,'f',2).arg(wp->getParam1()).arg(wp->getParam4()).arg(wp->getParam2()));
m_ui->displayBar->setText(QString("Go to <b>(</b>lat <b>%1<sup>o</sup></b>, lon <b>%2<sup>o</sup></b>, alt <b>%3)</b> and wait there for %4 sec; yaw: %5; rad: %6").arg(wp->x(),0,'f',7).arg(wp->y(),0,'f',7).arg(wp->z(),0,'f',2).arg(wp->param1()).arg(wp->param4()).arg(wp->param2()));
}
else
{
m_ui->displayBar->setText(QString("Go to <b>(</b>lat <b>%1<sup>o</sup></b>,lon <b>%2<sup>o</sup></b>,alt <b>%3)</b>; yaw: %4; rad: %5").arg(wp->x(),0,'f',7).arg(wp->y(),0,'f',7).arg(wp->z(),0,'f',2).arg(wp->getParam4()).arg(wp->getParam2()));
m_ui->displayBar->setText(QString("Go to <b>(</b>lat <b>%1<sup>o</sup></b>,lon <b>%2<sup>o</sup></b>,alt <b>%3)</b>; yaw: %4; rad: %5").arg(wp->x(),0,'f',7).arg(wp->y(),0,'f',7).arg(wp->z(),0,'f',2).arg(wp->param4()).arg(wp->param2()));
}
break;
}
caseMAV_FRAME_LOCAL_NED:
default:
{
if(wp->getParam1()>0)
if(wp->param1()>0)
{
m_ui->displayBar->setText(QString("Go to <b>(%1, %2, %3)</b> and wait there for %4 sec; yaw: %5; rad: %6").arg(wp->x(),0,'f',2).arg(wp->y(),0,'f',2).arg(wp->z(),0,'f',2).arg(wp->getParam1()).arg(wp->getParam4()).arg(wp->getParam2()));
m_ui->displayBar->setText(QString("Go to <b>(%1, %2, %3)</b> and wait there for %4 sec; yaw: %5; rad: %6").arg(wp->x(),0,'f',2).arg(wp->y(),0,'f',2).arg(wp->z(),0,'f',2).arg(wp->param1()).arg(wp->param4()).arg(wp->param2()));
}
else
{
m_ui->displayBar->setText(QString("Go to <b>(%1, %2, %3)</b>; yaw: %4; rad: %5").arg(wp->x(),0,'f',2).arg(wp->y(),0,'f',2).arg(wp->z(),0,'f',2).arg(wp->getParam4()).arg(wp->getParam2()));
m_ui->displayBar->setText(QString("Go to <b>(%1, %2, %3)</b>; yaw: %4; rad: %5").arg(wp->x(),0,'f',2).arg(wp->y(),0,'f',2).arg(wp->z(),0,'f',2).arg(wp->param4()).arg(wp->param2()));
m_ui->displayBar->setText(QString("Go to <b>(</b>lat <b>%1<sup>o</sup></b>, lon <b>%2<sup>o</sup></b>, alt <b>%3)</b> and loiter there indefinitely (clockwise); rad: %4").arg(wp->x(),0,'f',7).arg(wp->y(),0,'f',7).arg(wp->z(),0,'f',2).arg(wp->getParam3()));
m_ui->displayBar->setText(QString("Go to <b>(</b>lat <b>%1<sup>o</sup></b>, lon <b>%2<sup>o</sup></b>, alt <b>%3)</b> and loiter there indefinitely (clockwise); rad: %4").arg(wp->x(),0,'f',7).arg(wp->y(),0,'f',7).arg(wp->z(),0,'f',2).arg(wp->param3()));
}
else
{
m_ui->displayBar->setText(QString("Go to <b>(</b>lat <b>%1<sup>o</sup></b>, lon <b>%2<sup>o</sup></b>, alt <b>%3)</b> and loiter there indefinitely (counter-clockwise); rad: %4").arg(wp->x(),0,'f',7).arg(wp->y(),0,'f',7).arg(wp->z(),0,'f',2).arg(-wp->getParam3()));
m_ui->displayBar->setText(QString("Go to <b>(</b>lat <b>%1<sup>o</sup></b>, lon <b>%2<sup>o</sup></b>, alt <b>%3)</b> and loiter there indefinitely (counter-clockwise); rad: %4").arg(wp->x(),0,'f',7).arg(wp->y(),0,'f',7).arg(wp->z(),0,'f',2).arg(-wp->param3()));
}
break;
}
caseMAV_FRAME_LOCAL_NED:
default:
{
if(wp->getParam3()>=0)
if(wp->param3()>=0)
{
m_ui->displayBar->setText(QString("Go to <b>(%1, %2, %3)</b> and loiter there indefinitely (clockwise); rad: %4").arg(wp->x(),0,'f',2).arg(wp->y(),0,'f',2).arg(wp->z(),0,'f',2).arg(wp->getParam3()));
m_ui->displayBar->setText(QString("Go to <b>(%1, %2, %3)</b> and loiter there indefinitely (clockwise); rad: %4").arg(wp->x(),0,'f',2).arg(wp->y(),0,'f',2).arg(wp->z(),0,'f',2).arg(wp->param3()));
}
else
{
m_ui->displayBar->setText(QString("Go to <b>(%1, %2, %3)</b> and loiter there indefinitely (counter-clockwise); rad: %4").arg(wp->x(),0,'f',2).arg(wp->y(),0,'f',2).arg(wp->z(),0,'f',2).arg(-wp->getParam3()));
m_ui->displayBar->setText(QString("Go to <b>(%1, %2, %3)</b> and loiter there indefinitely (counter-clockwise); rad: %4").arg(wp->x(),0,'f',2).arg(wp->y(),0,'f',2).arg(wp->z(),0,'f',2).arg(-wp->param3()));
m_ui->displayBar->setText(QString("Go to <b>(</b>lat <b>%1<sup>o</sup></b>, lon <b>%2<sup>o</sup></b>, alt <b>%3)</b> and loiter there for %5 turns (clockwise); rad: %4").arg(wp->x(),0,'f',7).arg(wp->y(),0,'f',7).arg(wp->z(),0,'f',2).arg(wp->getParam3()).arg(wp->getParam1()));
m_ui->displayBar->setText(QString("Go to <b>(</b>lat <b>%1<sup>o</sup></b>, lon <b>%2<sup>o</sup></b>, alt <b>%3)</b> and loiter there for %5 turns (clockwise); rad: %4").arg(wp->x(),0,'f',7).arg(wp->y(),0,'f',7).arg(wp->z(),0,'f',2).arg(wp->param3()).arg(wp->param1()));
}
else
{
m_ui->displayBar->setText(QString("Go to <b>(</b>lat <b>%1<sup>o</sup></b>, lon <b>%2<sup>o</sup></b>, alt <b>%3)</b> and loiter there for %5 turns (counter-clockwise); rad: %4").arg(wp->x(),0,'f',7).arg(wp->y(),0,'f',7).arg(wp->z(),0,'f',2).arg(-wp->getParam3()).arg(wp->getParam1()));
m_ui->displayBar->setText(QString("Go to <b>(</b>lat <b>%1<sup>o</sup></b>, lon <b>%2<sup>o</sup></b>, alt <b>%3)</b> and loiter there for %5 turns (counter-clockwise); rad: %4").arg(wp->x(),0,'f',7).arg(wp->y(),0,'f',7).arg(wp->z(),0,'f',2).arg(-wp->param3()).arg(wp->param1()));
}
break;
}
caseMAV_FRAME_LOCAL_NED:
default:
{
if(wp->getParam3()>=0)
if(wp->param3()>=0)
{
m_ui->displayBar->setText(QString("Go to <b>(%1, %2, %3)</b> and loiter there for %5 turns (clockwise); rad: %4").arg(wp->x(),0,'f',2).arg(wp->y(),0,'f',2).arg(wp->z(),0,'f',2).arg(wp->getParam3()).arg(wp->getParam1()));
m_ui->displayBar->setText(QString("Go to <b>(%1, %2, %3)</b> and loiter there for %5 turns (clockwise); rad: %4").arg(wp->x(),0,'f',2).arg(wp->y(),0,'f',2).arg(wp->z(),0,'f',2).arg(wp->param3()).arg(wp->param1()));
}
else
{
m_ui->displayBar->setText(QString("Go to <b>(%1, %2, %3)</b> and loiter there for %5 turns (counter-clockwise); rad: %4").arg(wp->x(),0,'f',2).arg(wp->y(),0,'f',2).arg(wp->z(),0,'f',2).arg(-wp->getParam3()).arg(wp->getParam1()));
m_ui->displayBar->setText(QString("Go to <b>(%1, %2, %3)</b> and loiter there for %5 turns (counter-clockwise); rad: %4").arg(wp->x(),0,'f',2).arg(wp->y(),0,'f',2).arg(wp->z(),0,'f',2).arg(-wp->param3()).arg(wp->param1()));
m_ui->displayBar->setText(QString("Go to <b>(</b>lat <b>%1<sup>o</sup></b>, lon <b>%2<sup>o</sup></b>, alt <b>%3)</b> and loiter there for %5s (clockwise); rad: %4").arg(wp->x(),0,'f',7).arg(wp->y(),0,'f',7).arg(wp->z(),0,'f',2).arg(wp->getParam3()).arg(wp->getParam1()));
m_ui->displayBar->setText(QString("Go to <b>(</b>lat <b>%1<sup>o</sup></b>, lon <b>%2<sup>o</sup></b>, alt <b>%3)</b> and loiter there for %5s (clockwise); rad: %4").arg(wp->x(),0,'f',7).arg(wp->y(),0,'f',7).arg(wp->z(),0,'f',2).arg(wp->param3()).arg(wp->param1()));
}
else
{
m_ui->displayBar->setText(QString("Go to <b>(</b>lat <b>%1<sup>o</sup></b>, lon <b>%2<sup>o</sup></b>, alt <b>%3)</b> and loiter there for %5s (counter-clockwise); rad: %4").arg(wp->x(),0,'f',7).arg(wp->y(),0,'f',7).arg(wp->z(),0,'f',2).arg(-wp->getParam3()).arg(wp->getParam1()));
m_ui->displayBar->setText(QString("Go to <b>(</b>lat <b>%1<sup>o</sup></b>, lon <b>%2<sup>o</sup></b>, alt <b>%3)</b> and loiter there for %5s (counter-clockwise); rad: %4").arg(wp->x(),0,'f',7).arg(wp->y(),0,'f',7).arg(wp->z(),0,'f',2).arg(-wp->param3()).arg(wp->param1()));
}
break;
}
caseMAV_FRAME_LOCAL_NED:
default:
{
if(wp->getParam3()>=0)
if(wp->param3()>=0)
{
m_ui->displayBar->setText(QString("Go to <b>(%1, %2, %3)</b> and loiter there for %5s (clockwise); rad: %4").arg(wp->x(),0,'f',2).arg(wp->y(),0,'f',2).arg(wp->z(),0,'f',2).arg(wp->getParam3()).arg(wp->getParam1()));
m_ui->displayBar->setText(QString("Go to <b>(%1, %2, %3)</b> and loiter there for %5s (clockwise); rad: %4").arg(wp->x(),0,'f',2).arg(wp->y(),0,'f',2).arg(wp->z(),0,'f',2).arg(wp->param3()).arg(wp->param1()));
}
else
{
m_ui->displayBar->setText(QString("Go to <b>(%1, %2, %3)</b> and loiter there for %5s (counter-clockwise); rad: %4").arg(wp->x(),0,'f',2).arg(wp->y(),0,'f',2).arg(wp->z(),0,'f',2).arg(-wp->getParam3()).arg(wp->getParam1()));
m_ui->displayBar->setText(QString("Go to <b>(%1, %2, %3)</b> and loiter there for %5s (counter-clockwise); rad: %4").arg(wp->x(),0,'f',2).arg(wp->y(),0,'f',2).arg(wp->z(),0,'f',2).arg(-wp->param3()).arg(wp->param1()));
m_ui->displayBar->setText(QString("LAND. Go to <b>(</b>lat <b>%1<sup>o</sup></b>, lon <b>%2<sup>o</sup></b>, alt <b>%3)</b> and descent; yaw: %4").arg(wp->x(),0,'f',7).arg(wp->y(),0,'f',7).arg(wp->z(),0,'f',2).arg(wp->getParam4()));
m_ui->displayBar->setText(QString("LAND. Go to <b>(</b>lat <b>%1<sup>o</sup></b>, lon <b>%2<sup>o</sup></b>, alt <b>%3)</b> and descent; yaw: %4").arg(wp->x(),0,'f',7).arg(wp->y(),0,'f',7).arg(wp->z(),0,'f',2).arg(wp->param4()));
break;
}
caseMAV_FRAME_LOCAL_NED:
default:
{
m_ui->displayBar->setText(QString("LAND. Go to <b>(%1, %2, %3)</b> and descent; yaw: %4").arg(wp->x(),0,'f',2).arg(wp->y(),0,'f',2).arg(wp->z(),0,'f',2).arg(wp->getParam4()));
m_ui->displayBar->setText(QString("LAND. Go to <b>(%1, %2, %3)</b> and descent; yaw: %4").arg(wp->x(),0,'f',2).arg(wp->y(),0,'f',2).arg(wp->z(),0,'f',2).arg(wp->param4()));
m_ui->displayBar->setText(QString("TAKEOFF. Go to <b>(</b>lat <b>%1<sup>o</sup></b>, lon <b>%2<sup>o</sup></b>, alt <b>%3)</b>; yaw: %4").arg(wp->x(),0,'f',7).arg(wp->y(),0,'f',7).arg(wp->z(),0,'f',2).arg(wp->getParam4()));
m_ui->displayBar->setText(QString("TAKEOFF. Go to <b>(</b>lat <b>%1<sup>o</sup></b>, lon <b>%2<sup>o</sup></b>, alt <b>%3)</b>; yaw: %4").arg(wp->x(),0,'f',7).arg(wp->y(),0,'f',7).arg(wp->z(),0,'f',2).arg(wp->param4()));
break;
}
caseMAV_FRAME_LOCAL_NED:
default:
{
m_ui->displayBar->setText(QString("TAKEOFF. Go to <b>(%1, %2, %3)</b>; yaw: %4").arg(wp->x(),0,'f',2).arg(wp->y(),0,'f',2).arg(wp->z(),0,'f',2).arg(wp->getParam4()));
m_ui->displayBar->setText(QString("TAKEOFF. Go to <b>(%1, %2, %3)</b>; yaw: %4").arg(wp->x(),0,'f',2).arg(wp->y(),0,'f',2).arg(wp->z(),0,'f',2).arg(wp->param4()));