mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-26 18:55:38 +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:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user