mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-22 23:05:36 +08:00
Ref T372, Ref T370 testing with emulated driver fixes
* added ground speed * changed altitude parsing to CPqString::SeparatorsBestGuess * signal when parts form is set
This commit is contained in:
@@ -52,7 +52,7 @@ namespace BlackGui
|
||||
{
|
||||
CCockpitComComponent::CCockpitComComponent(QWidget *parent) :
|
||||
QFrame(parent),
|
||||
BlackMisc::CIdentifiable(this),
|
||||
CIdentifiable(this),
|
||||
ui(new Ui::CCockpitComComponent)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
@@ -36,6 +36,7 @@ namespace BlackGui
|
||||
connect(ui->pb_AircraftPartsEnginesOn, &QPushButton::pressed, this, &CAircraftPartsForm::setAllEngines);
|
||||
connect(ui->pb_AircraftPartsEnginesOff, &QPushButton::pressed, this, &CAircraftPartsForm::setAllEngines);
|
||||
connect(ui->pb_AircraftPartsUiToJson, &QPushButton::pressed, this, &CAircraftPartsForm::guiToJson);
|
||||
connect(ui->pb_Set, &QPushButton::pressed, this, &CAircraftPartsForm::changeAircraftParts); // force change signal
|
||||
}
|
||||
|
||||
CAircraftPartsForm::~CAircraftPartsForm()
|
||||
@@ -162,7 +163,7 @@ namespace BlackGui
|
||||
return parts;
|
||||
}
|
||||
|
||||
void CAircraftPartsForm::partsToGui(const Aviation::CAircraftParts &parts)
|
||||
void CAircraftPartsForm::partsToGui(const CAircraftParts &parts)
|
||||
{
|
||||
ui->cb_AircraftPartsGearDown->setChecked(parts.isGearDown());
|
||||
ui->cb_AircraftPartsIsOnGround->setChecked(parts.isOnGround());
|
||||
|
||||
@@ -17,8 +17,6 @@
|
||||
#include "blackmisc/geo/coordinategeodetic.h"
|
||||
#include "blackmisc/statusmessagelist.h"
|
||||
|
||||
class QWidget;
|
||||
|
||||
namespace Ui { class CCoordinateForm; }
|
||||
namespace BlackGui
|
||||
{
|
||||
|
||||
@@ -64,7 +64,12 @@ namespace BlackGui
|
||||
CAircraftSituation s(position);
|
||||
s.setBank(this->getBankAngle());
|
||||
s.setPitch(this->getPitchAngle());
|
||||
s.setPressureAltitude(pressureAltitude);
|
||||
s.setGroundSpeed(this->getGroundSpeed());
|
||||
|
||||
if (!pressureAltitude.isNull() && pressureAltitude.getAltitudeType() == CAltitude::PressureAltitude)
|
||||
{
|
||||
s.setPressureAltitude(pressureAltitude);
|
||||
}
|
||||
return s;
|
||||
}
|
||||
|
||||
@@ -110,6 +115,11 @@ namespace BlackGui
|
||||
return CPressure(getBarometricPressureMslMillibar(), CPressureUnit::mbar());
|
||||
}
|
||||
|
||||
CSpeed CSituationForm::getGroundSpeed() const
|
||||
{
|
||||
return CSpeed(0, CSpeedUnit::kts());
|
||||
}
|
||||
|
||||
void CSituationForm::setReadOnly(bool readonly)
|
||||
{
|
||||
ui->comp_Coordinate->setReadOnly(readonly);
|
||||
|
||||
@@ -77,6 +77,9 @@ namespace BlackGui
|
||||
//! Get barometric pressure at MSL (mean sea level)
|
||||
BlackMisc::PhysicalQuantities::CPressure getBarometricPressureMsl() const;
|
||||
|
||||
//! Get ground speed
|
||||
BlackMisc::PhysicalQuantities::CSpeed getGroundSpeed() const;
|
||||
|
||||
//! Get pressure at mean sea level
|
||||
double getBarometricPressureMslMillibar() const;
|
||||
|
||||
|
||||
@@ -152,6 +152,23 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="lbl_GsKts">
|
||||
<property name="text">
|
||||
<string>Ground speed (kts):</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QSpinBox" name="sb_GsKts">
|
||||
<property name="suffix">
|
||||
<string>kts</string>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>300</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
|
||||
@@ -123,7 +123,7 @@ namespace BlackMisc
|
||||
|
||||
void CAltitude::parseFromString(const QString &value)
|
||||
{
|
||||
this->parseFromString(value, CPqString::SeparatorsCLocale);
|
||||
this->parseFromString(value, CPqString::SeparatorsBestGuess);
|
||||
}
|
||||
|
||||
void CAltitude::parseFromString(const QString &value, CPqString::SeparatorMode mode)
|
||||
|
||||
@@ -125,8 +125,6 @@ namespace BlackSimPlugin
|
||||
protected:
|
||||
virtual bool physicallyAddRemoteAircraft(const BlackMisc::Simulation::CSimulatedAircraft &remoteAircraft) override;
|
||||
virtual bool physicallyRemoveRemoteAircraft(const BlackMisc::Aviation::CCallsign &callsign) override;
|
||||
|
||||
// just logged
|
||||
virtual int physicallyRemoveAllRemoteAircraft() override;
|
||||
|
||||
//! \copydoc BlackCore::ISimulator::parseDetails
|
||||
|
||||
@@ -43,7 +43,7 @@ namespace BlackSimPlugin
|
||||
|
||||
m_simulator = simulator;
|
||||
m_uiUpdateTimer.setObjectName(this->objectName() + ":uiUpdateTimer");
|
||||
m_uiUpdateTimer.start(2.5 * 1000);
|
||||
m_uiUpdateTimer.start(2500);
|
||||
|
||||
connect(m_simulator, &CSimulatorEmulated::internalAircraftChanged, this, &CSimulatorEmulatedMonitorDialog::setInternalAircraftUiValues, Qt::QueuedConnection);
|
||||
connect(&m_uiUpdateTimer, &QTimer::timeout, this, &CSimulatorEmulatedMonitorDialog::timerBasedUiUpdates);
|
||||
|
||||
@@ -68,7 +68,7 @@
|
||||
<item>
|
||||
<widget class="QTabWidget" name="tw_SwiftMonitorDialog">
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
<number>1</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="tb_AircraftSituation">
|
||||
<attribute name="title">
|
||||
|
||||
Reference in New Issue
Block a user