mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-30 20:15:35 +08:00
Minor interpolator improvements, display 2nd invalid version instead of first
This commit is contained in:
@@ -11,10 +11,9 @@
|
|||||||
#ifndef BLACKGUI_COMPONENTS_INTERPOLATIONCOMPONENT_H
|
#ifndef BLACKGUI_COMPONENTS_INTERPOLATIONCOMPONENT_H
|
||||||
#define BLACKGUI_COMPONENTS_INTERPOLATIONCOMPONENT_H
|
#define BLACKGUI_COMPONENTS_INTERPOLATIONCOMPONENT_H
|
||||||
|
|
||||||
#include "blackmisc/aviation/callsign.h"
|
#include "blackgui/blackguiexport.h"
|
||||||
#include <QFrame>
|
#include <QFrame>
|
||||||
#include <QScopedPointer>
|
#include <QScopedPointer>
|
||||||
#include "blackgui/blackguiexport.h"
|
|
||||||
|
|
||||||
namespace Ui { class CInterpolationComponent; }
|
namespace Ui { class CInterpolationComponent; }
|
||||||
namespace BlackGui
|
namespace BlackGui
|
||||||
@@ -31,7 +30,7 @@ namespace BlackGui
|
|||||||
explicit CInterpolationComponent(QWidget *parent = nullptr);
|
explicit CInterpolationComponent(QWidget *parent = nullptr);
|
||||||
|
|
||||||
//! Destructor
|
//! Destructor
|
||||||
virtual ~CInterpolationComponent();
|
virtual ~CInterpolationComponent() override;
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
//! Request redering restrictions widget
|
//! Request redering restrictions widget
|
||||||
|
|||||||
@@ -275,9 +275,11 @@ namespace BlackMisc
|
|||||||
}
|
}
|
||||||
if (!m.isEmpty())
|
if (!m.isEmpty())
|
||||||
{
|
{
|
||||||
if (m_interpolationMessages.isEmpty())
|
if (m_interpolationMessages.sizeInt() == 2)
|
||||||
{
|
{
|
||||||
// display first message as a hint in the general log
|
// display second message as a hint in the general log
|
||||||
|
// we DO NOT display the first message, as this can happen due to pilot logging off
|
||||||
|
// if it happens twice we consider it worth displaying
|
||||||
CLogMessage::preformatted(m);
|
CLogMessage::preformatted(m);
|
||||||
}
|
}
|
||||||
m_interpolationMessages.push_back(m);
|
m_interpolationMessages.push_back(m);
|
||||||
|
|||||||
@@ -1914,6 +1914,7 @@ namespace BlackSimPlugin
|
|||||||
const bool sendGround = setup.isSendingGndFlagToSimulator();
|
const bool sendGround = setup.isSendingGndFlagToSimulator();
|
||||||
|
|
||||||
// Interpolated situation
|
// Interpolated situation
|
||||||
|
// simObjectNumber is passed to equally distributed steps like guessing parts
|
||||||
const CInterpolationResult result = simObject.getInterpolation(currentTimestamp, setup, simObjectNumber++);
|
const CInterpolationResult result = simObject.getInterpolation(currentTimestamp, setup, simObjectNumber++);
|
||||||
if (result.getInterpolationStatus().hasValidSituation())
|
if (result.getInterpolationStatus().hasValidSituation())
|
||||||
{
|
{
|
||||||
@@ -1936,13 +1937,6 @@ namespace BlackSimPlugin
|
|||||||
{
|
{
|
||||||
// already logged in interpolator
|
// already logged in interpolator
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
/** KB removed 2018-11 as already logged in interpolator
|
|
||||||
static const QString so("SimObject id: %1");
|
|
||||||
const QString msg = this->getInvalidSituationLogMessage(callsign, result.getInterpolationStatus(), so.arg(objectId));
|
|
||||||
const CStatusMessage sm(this, CStatusMessage::SeverityWarning, msg);
|
|
||||||
this->clampedLog(callsign, sm);
|
|
||||||
**/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Interpolated parts
|
// Interpolated parts
|
||||||
|
|||||||
Reference in New Issue
Block a user