mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-17 02:45:33 +08:00
Ref T275, display elevation cache hits in log display
This commit is contained in:
@@ -133,6 +133,10 @@ namespace BlackGui
|
|||||||
const CClient client = m_airspaceMonitor->getClientOrDefaultForCallsign(m_callsign);
|
const CClient client = m_airspaceMonitor->getClientOrDefaultForCallsign(m_callsign);
|
||||||
ui->le_GndFlag->setText(boolToYesNo(client.hasGndFlagCapability()));
|
ui->le_GndFlag->setText(boolToYesNo(client.hasGndFlagCapability()));
|
||||||
|
|
||||||
|
static const QString hits("%1/%2");
|
||||||
|
const QPair<int, int> foundMissed = m_airspaceMonitor->getElevationsFoundMissed();
|
||||||
|
ui->le_ElevationHits->setText(hits.arg(foundMissed.first).arg(foundMissed.second));
|
||||||
|
|
||||||
this->displayLastInterpolation();
|
this->displayLastInterpolation();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -281,7 +285,7 @@ namespace BlackGui
|
|||||||
if (!this->logCallsign(callsign)) { return; }
|
if (!this->logCallsign(callsign)) { return; }
|
||||||
m_elvReceived++;
|
m_elvReceived++;
|
||||||
ui->le_Elevation->setText(plane.toQString());
|
ui->le_Elevation->setText(plane.toQString());
|
||||||
ui->le_ElevationRec->setText(QString::number(m_elvReceived));
|
this->displayElevationRequestReceive();
|
||||||
ui->led_Elevation->blink();
|
ui->led_Elevation->blink();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -289,7 +293,7 @@ namespace BlackGui
|
|||||||
{
|
{
|
||||||
if (!this->logCallsign(callsign)) { return; }
|
if (!this->logCallsign(callsign)) { return; }
|
||||||
m_elvRequested++;
|
m_elvRequested++;
|
||||||
ui->le_ElevationReq->setText(QString::number(m_elvRequested));
|
this->displayElevationRequestReceive();
|
||||||
ui->led_Elevation->blink();
|
ui->led_Elevation->blink();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -305,8 +309,8 @@ namespace BlackGui
|
|||||||
ui->te_TextLog->clear();
|
ui->te_TextLog->clear();
|
||||||
ui->le_CG->clear();
|
ui->le_CG->clear();
|
||||||
ui->le_Elevation->clear();
|
ui->le_Elevation->clear();
|
||||||
ui->le_ElevationRec->clear();
|
ui->le_ElevationReqRec->clear();
|
||||||
ui->le_ElevationReq->clear();
|
ui->le_ElevationHits->clear();
|
||||||
ui->le_Parts->clear();
|
ui->le_Parts->clear();
|
||||||
ui->le_UpdateTimes->clear();
|
ui->le_UpdateTimes->clear();
|
||||||
ui->le_UpdateTimes->clear();
|
ui->le_UpdateTimes->clear();
|
||||||
@@ -363,6 +367,12 @@ namespace BlackGui
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CInterpolationLogDisplay::displayElevationRequestReceive()
|
||||||
|
{
|
||||||
|
static const QString rr("%1/%2");
|
||||||
|
ui->le_ElevationReqRec->setText(rr.arg(m_elvRequested).arg(m_elvReceived));
|
||||||
|
}
|
||||||
|
|
||||||
void CInterpolationLogDisplay::linkWithAirspaceMonitor()
|
void CInterpolationLogDisplay::linkWithAirspaceMonitor()
|
||||||
{
|
{
|
||||||
if (!sGui || sGui->isShuttingDown() || !sGui->supportsContexts()) { return; }
|
if (!sGui || sGui->isShuttingDown() || !sGui->supportsContexts()) { return; }
|
||||||
|
|||||||
@@ -42,6 +42,7 @@ namespace BlackGui
|
|||||||
enum Tab
|
enum Tab
|
||||||
{
|
{
|
||||||
TabFlow,
|
TabFlow,
|
||||||
|
TabFlow2,
|
||||||
TabInterpolation,
|
TabInterpolation,
|
||||||
TabTextLog
|
TabTextLog
|
||||||
};
|
};
|
||||||
@@ -122,6 +123,9 @@ namespace BlackGui
|
|||||||
//! Init the parts view
|
//! Init the parts view
|
||||||
void initPartsView();
|
void initPartsView();
|
||||||
|
|
||||||
|
//! Display elevation requested/receive
|
||||||
|
void displayElevationRequestReceive();
|
||||||
|
|
||||||
QScopedPointer<Ui::CInterpolationLogDisplay> ui;
|
QScopedPointer<Ui::CInterpolationLogDisplay> ui;
|
||||||
QTimer m_updateTimer;
|
QTimer m_updateTimer;
|
||||||
QPointer<BlackCore::CSimulatorCommon> m_simulatorCommon; //!< related simulator
|
QPointer<BlackCore::CSimulatorCommon> m_simulatorCommon; //!< related simulator
|
||||||
|
|||||||
@@ -290,7 +290,7 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="3">
|
<item row="2" column="3">
|
||||||
<widget class="QLineEdit" name="le_ElevationRec">
|
<widget class="QLineEdit" name="le_ElevationHits">
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string>elevation received</string>
|
<string>elevation received</string>
|
||||||
</property>
|
</property>
|
||||||
@@ -298,7 +298,7 @@
|
|||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
<property name="placeholderText">
|
<property name="placeholderText">
|
||||||
<string>rec.</string>
|
<string>hits/missed</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@@ -334,16 +334,16 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="0">
|
<item row="2" column="0">
|
||||||
<widget class="QLabel" name="lbl_ElevationRequested">
|
<widget class="QLabel" name="lbl_ElevationReqRec">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Req.:</string>
|
<string>Req/rec:</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="2">
|
<item row="2" column="2">
|
||||||
<widget class="QLabel" name="lbl_ElevationReceived">
|
<widget class="QLabel" name="lbl_ElevationHits">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Rec.:</string>
|
<string>Hits:</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@@ -426,7 +426,7 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="1">
|
<item row="2" column="1">
|
||||||
<widget class="QLineEdit" name="le_ElevationReq">
|
<widget class="QLineEdit" name="le_ElevationReqRec">
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string>elevation requested</string>
|
<string>elevation requested</string>
|
||||||
</property>
|
</property>
|
||||||
@@ -434,7 +434,7 @@
|
|||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
<property name="placeholderText">
|
<property name="placeholderText">
|
||||||
<string>req.</string>
|
<string>req./rec.</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@@ -743,8 +743,8 @@
|
|||||||
<tabstop>le_UpdateCount</tabstop>
|
<tabstop>le_UpdateCount</tabstop>
|
||||||
<tabstop>le_UpdateTimes</tabstop>
|
<tabstop>le_UpdateTimes</tabstop>
|
||||||
<tabstop>le_Limited</tabstop>
|
<tabstop>le_Limited</tabstop>
|
||||||
<tabstop>le_ElevationReq</tabstop>
|
<tabstop>le_ElevationReqRec</tabstop>
|
||||||
<tabstop>le_ElevationRec</tabstop>
|
<tabstop>le_ElevationHits</tabstop>
|
||||||
<tabstop>le_Elevation</tabstop>
|
<tabstop>le_Elevation</tabstop>
|
||||||
<tabstop>le_SimulatorSpecific</tabstop>
|
<tabstop>le_SimulatorSpecific</tabstop>
|
||||||
<tabstop>tvp_AircraftSituations</tabstop>
|
<tabstop>tvp_AircraftSituations</tabstop>
|
||||||
|
|||||||
Reference in New Issue
Block a user