mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-27 11:05:44 +08:00
Ref T275, Ref T280, fix parts guessing: do not return after initial guessing, also do 2nd step
This commit is contained in:
@@ -99,6 +99,8 @@ namespace BlackMisc
|
|||||||
model.getAircraftIcaoCode().guessModelParameters(guessedCG, guessedVRotate);
|
model.getAircraftIcaoCode().guessModelParameters(guessedCG, guessedVRotate);
|
||||||
|
|
||||||
if (situation.getOnGroundDetails() != CAircraftSituation::NotSetGroundDetails)
|
if (situation.getOnGroundDetails() != CAircraftSituation::NotSetGroundDetails)
|
||||||
|
{
|
||||||
|
do
|
||||||
{
|
{
|
||||||
// set some reasonable values
|
// set some reasonable values
|
||||||
const bool isOnGround = situation.isOnGround();
|
const bool isOnGround = situation.isOnGround();
|
||||||
@@ -113,7 +115,7 @@ namespace BlackMisc
|
|||||||
{
|
{
|
||||||
parts.setSpoilersOut(true);
|
parts.setSpoilersOut(true);
|
||||||
parts.setFlapsPercent(10);
|
parts.setFlapsPercent(10);
|
||||||
return parts;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -122,15 +124,17 @@ namespace BlackMisc
|
|||||||
{
|
{
|
||||||
if (details) { *details += QStringLiteral("slow speed <") % slowSpeed.valueRoundedWithUnit(1) % QStringLiteral(" on ground"); }
|
if (details) { *details += QStringLiteral("slow speed <") % slowSpeed.valueRoundedWithUnit(1) % QStringLiteral(" on ground"); }
|
||||||
parts.setFlapsPercent(0);
|
parts.setFlapsPercent(0);
|
||||||
return parts;
|
break;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (details) { *details += QStringLiteral("faster speed >") % slowSpeed.valueRoundedWithUnit(1) % QStringLiteral(" on ground"); }
|
if (details) { *details += QStringLiteral("faster speed >") % slowSpeed.valueRoundedWithUnit(1) % QStringLiteral(" on ground"); }
|
||||||
parts.setFlapsPercent(0);
|
parts.setFlapsPercent(0);
|
||||||
return parts;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
while (false);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (details) { *details = QStringLiteral("no ground info"); }
|
if (details) { *details = QStringLiteral("no ground info"); }
|
||||||
|
|||||||
Reference in New Issue
Block a user