From e43e1962009521f2e35c759a91f16dca54d088fe Mon Sep 17 00:00:00 2001 From: lm Date: Tue, 7 Dec 2010 21:10:39 +0100 Subject: [PATCH] Minor cleanups --- src/comm/MAVLinkProtocol.cc | 2 +- src/ui/uas/UASView.cc | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/src/comm/MAVLinkProtocol.cc b/src/comm/MAVLinkProtocol.cc index ef2e0d790..835064194 100644 --- a/src/comm/MAVLinkProtocol.cc +++ b/src/comm/MAVLinkProtocol.cc @@ -347,7 +347,7 @@ void MAVLinkProtocol::sendHeartbeat() if (m_heartbeatsEnabled) { mavlink_message_t beat; - mavlink_msg_heartbeat_pack(MG::SYSTEM::ID, MG::SYSTEM::COMPID,&beat, OCU, MAV_AUTOPILOT_GENERIC); + mavlink_msg_heartbeat_pack(getSystemId(), getComponentId(),&beat, OCU, MAV_AUTOPILOT_GENERIC); sendMessage(beat); } } diff --git a/src/ui/uas/UASView.cc b/src/ui/uas/UASView.cc index 5c906feb9..dee05898d 100644 --- a/src/ui/uas/UASView.cc +++ b/src/ui/uas/UASView.cc @@ -229,7 +229,27 @@ void UASView::setSystemType(UASInterface* uas, unsigned int systemType) m_ui->typeButton->setIcon(QIcon(":/images/mavs/helicopter.svg")); break; case 5: + m_ui->typeButton->setIcon(QIcon(":/images/mavs/unknown.svg")); + break; + case 6: + { + // A groundstation is a special system type, update widget + QString result; + m_ui->nameLabel->setText(tr("OCU ") + result.sprintf("%03d", uas->getUASID())); + m_ui->waypointLabel->setText(""); + m_ui->timeRemainingLabel->setText("Online:"); + m_ui->batteryBar->hide(); + m_ui->thrustBar->hide(); + m_ui->stateLabel->hide(); + m_ui->statusTextLabel->hide(); + m_ui->waypointLabel->hide(); + m_ui->liftoffButton->hide(); + m_ui->haltButton->hide(); + m_ui->landButton->hide(); + m_ui->shutdownButton->hide(); + m_ui->abortButton->hide(); m_ui->typeButton->setIcon(QIcon(":/images/mavs/groundstation.svg")); + } break; default: m_ui->typeButton->setIcon(QIcon(":/images/mavs/unknown.svg")); -- 2.22.0