refactor: Remove "connected" LED from COM panel

The LED is a leftover from the pre-AFV voicerooms. The LED does not
light up when connected to UNICOM or CTAF frequencies which still can be
used to transmit & receive voice. This also removes the functionality
that the currently tuned station was displayed when hovering over the
"COMx" label. This feature was not documented and not known by many
users.
By removing these features, one context method is no longer required,
which further decouples the network context from the OwnAircraft context.
This commit is contained in:
Lars Toenning
2024-03-26 16:33:10 +01:00
parent 7875c5a18f
commit 021de43e71
10 changed files with 0 additions and 81 deletions

View File

@@ -263,9 +263,6 @@ namespace BlackCore::Context
//! Load flight plan (from network)
virtual BlackMisc::Aviation::CFlightPlan loadFlightPlanFromNetwork(const BlackMisc::Aviation::CCallsign &callsign) const = 0;
//! Use the selected COM1/2 frequencies, and get the corresponding ATC stations for it
virtual BlackMisc::Aviation::CAtcStationList getSelectedAtcStations() const = 0;
//! Request data updates (pilot's frequencies, ATIS, ..)
virtual void requestAircraftDataUpdates() = 0;

View File

@@ -187,14 +187,6 @@ namespace BlackCore::Context
return {};
}
//! \copydoc IContextNetwork::getSelectedAtcStations
virtual BlackMisc::Aviation::CAtcStationList getSelectedAtcStations() const override
{
logEmptyContextWarning(Q_FUNC_INFO);
// normally 2 entries
return BlackMisc::Aviation::CAtcStationList({ BlackMisc::Aviation::CAtcStation(), BlackMisc::Aviation::CAtcStation() });
}
//! \copydoc IContextNetwork::getUsers()
virtual BlackMisc::Network::CUserList getUsers() const override
{

View File

@@ -1331,18 +1331,6 @@ namespace BlackCore::Context
return sApp->getWebDataServices()->getMetarForAirport(airportIcaoCode);
}
CAtcStationList CContextNetwork::getSelectedAtcStations() const
{
if (this->isDebugEnabled()) { CLogMessage(this, CLogCategories::contextSlot()).debug() << Q_FUNC_INFO; }
CAtcStation com1Station = m_airspace->getAtcStationForComUnit(this->ownAircraft().getCom1System());
CAtcStation com2Station = m_airspace->getAtcStationForComUnit(this->ownAircraft().getCom2System());
CAtcStationList selectedStations;
selectedStations.push_back(com1Station);
selectedStations.push_back(com2Station);
return selectedStations;
}
QMetaObject::Connection CContextNetwork::connectRawFsdMessageSignal(QObject *receiver, RawFsdMessageReceivedSlot rawFsdMessageReceivedSlot)
{
Q_ASSERT_X(receiver, Q_FUNC_INFO, "Missing receiver");

View File

@@ -350,9 +350,6 @@ namespace BlackCore
//! \copydoc BlackCore::Context::IContextNetwork::getMetarForAirport
BlackMisc::Weather::CMetar getMetarForAirport(const BlackMisc::Aviation::CAirportIcaoCode &airportIcaoCode) const override;
//! \copydoc BlackCore::Context::IContextNetwork::getSelectedAtcStations
virtual BlackMisc::Aviation::CAtcStationList getSelectedAtcStations() const override;
//! \copydoc BlackCore::Context::IContextNetwork::getUsers
virtual BlackMisc::Network::CUserList getUsers() const override;

View File

@@ -173,11 +173,6 @@ namespace BlackCore::Context
return m_dBusInterface->callDBusRet<bool>(QLatin1String("setOtherClient"), client);
}
CAtcStationList CContextNetworkProxy::getSelectedAtcStations() const
{
return m_dBusInterface->callDBusRet<BlackMisc::Aviation::CAtcStationList>(QLatin1String("getSelectedAtcStations"));
}
void CContextNetworkProxy::requestAircraftDataUpdates()
{
m_dBusInterface->callDBus(QLatin1String("requestAircraftDataUpdates"));

View File

@@ -133,9 +133,6 @@ namespace BlackCore
//! \copydoc BlackCore::Context::IContextNetwork::getMetarForAirport
BlackMisc::Weather::CMetar getMetarForAirport(const BlackMisc::Aviation::CAirportIcaoCode &airportIcaoCode) const override;
//! \copydoc BlackCore::Context::IContextNetwork::getSelectedAtcStations
virtual BlackMisc::Aviation::CAtcStationList getSelectedAtcStations() const override;
//! \copydoc BlackCore::Context::IContextNetwork::getUsers
virtual BlackMisc::Network::CUserList getUsers() const override;

View File

@@ -112,16 +112,6 @@ namespace BlackGui::Components
// update transponder
ui->editor_Com->setTransponder(transponder);
// selected stations
if (sGui)
{
if (sGui->getIContextNetwork())
{
const CAtcStationList selectedStations = sGui->getIContextNetwork()->getSelectedAtcStations();
ui->editor_Com->setSelectedAtcStations(selectedStations);
}
}
}
void CCockpitComComponent::testSelcal()

View File

@@ -83,32 +83,6 @@ namespace BlackGui::Editors
return msgs;
}
void CCockpitComForm::setSelectedAtcStations(const CAtcStationList &selectedStations)
{
const CAtcStation com1Ttation = selectedStations.size() > 0 ? selectedStations[0] : CAtcStation();
const CAtcStation com2Station = selectedStations.size() > 1 ? selectedStations[1] : CAtcStation();
if (com1Ttation.getCallsign().isEmpty())
{
ui->lbl_ComPanelCom1Active->setToolTip("");
ui->led_ComPanelCom1->setOn(false);
}
else
{
ui->lbl_ComPanelCom1Active->setToolTip(com1Ttation.getCallsign().getStringAsSet());
ui->led_ComPanelCom1->setOn(true);
}
if (com2Station.getCallsign().isEmpty())
{
ui->lbl_ComPanelCom2Active->setToolTip("");
ui->led_ComPanelCom2->setOn(false);
}
else
{
ui->lbl_ComPanelCom2Active->setToolTip(com2Station.getCallsign().getStringAsSet());
ui->led_ComPanelCom2->setOn(true);
}
}
void CCockpitComForm::setTransponderModeStateIdent()
{
ui->cbp_ComPanelTransponderMode->setSelectedTransponderModeStateIdent();
@@ -136,8 +110,6 @@ namespace BlackGui::Editors
void CCockpitComForm::initLeds()
{
const CLedWidget::LedShape shape = CLedWidget::Rounded;
ui->led_ComPanelCom1->setValues(CLedWidget::Yellow, CLedWidget::Black, shape, "COM1 connected to station", "COM1 disconnected", 14);
ui->led_ComPanelCom2->setValues(CLedWidget::Yellow, CLedWidget::Black, shape, "COM2 connected to station", "COM2 disconnected", 14);
ui->led_ComPanelCom1R->setValues(CLedWidget::Yellow, CLedWidget::Black, shape, "COM1 receive (sim)", "COM1 not receiving", 14);
ui->led_ComPanelCom1T->setValues(CLedWidget::Yellow, CLedWidget::Black, shape, "COM1 transmit (sim)", "COM1 not transmitting", 14);

View File

@@ -39,9 +39,6 @@ namespace BlackGui::Editors
//! Set the XPDR values
void setTransponder(const BlackMisc::Aviation::CTransponder &transponder);
//! Set selected stations
void setSelectedAtcStations(const BlackMisc::Aviation::CAtcStationList &selectedStations);
//! Set to BlackMisc::Aviation::CTransponder::StateIdent
void setTransponderModeStateIdent();

View File

@@ -132,9 +132,6 @@
</property>
</widget>
</item>
<item>
<widget class="BlackGui::CLedWidget" name="led_ComPanelCom2" native="true"/>
</item>
<item>
<widget class="BlackGui::CLedWidget" name="led_ComPanelCom2T" native="true"/>
</item>
@@ -259,9 +256,6 @@
</property>
</widget>
</item>
<item>
<widget class="BlackGui::CLedWidget" name="led_ComPanelCom1" native="true"/>
</item>
<item>
<widget class="BlackGui::CLedWidget" name="led_ComPanelCom1T" native="true"/>
</item>