diff --git a/src/comm/MAVLinkProtocol.cc b/src/comm/MAVLinkProtocol.cc index ef2e0d790619a34ba4e1491c1a1123a4ef84e518..835064194b6da2915a199ef8680681721de5e06e 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 5c906feb9a367c70529a3a077189f7f42ecd2a3c..dee05898d9eb5aaa05ffaa8dad06e5f3697d6b97 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"));