mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-22 23:05:36 +08:00
Ref T437, samples for FSUIPC
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
#include "samplesfscommon.h"
|
||||
#include "samplesfsx.h"
|
||||
#include "samplesp3d.h"
|
||||
#include "samplesfsuipc.h"
|
||||
#include "samplesmodelmapping.h"
|
||||
#include "samplesvpilotrules.h"
|
||||
#include "blackcore/application.h"
|
||||
@@ -27,6 +28,7 @@
|
||||
#include <QtGlobal>
|
||||
|
||||
using namespace BlackMisc;
|
||||
using namespace BlackSample;
|
||||
|
||||
//! main
|
||||
int main(int argc, char *argv[])
|
||||
@@ -39,40 +41,31 @@ int main(int argc, char *argv[])
|
||||
QTextStream streamIn(stdin);
|
||||
QTextStream streamOut(stdout);
|
||||
|
||||
streamOut << "Run samples:" << endl;
|
||||
streamOut << "1 .. FS common / Simulation (with cfg files reading)" << endl;
|
||||
streamOut << "2 .. FSX" << endl;
|
||||
streamOut << "3 .. Mappings" << endl;
|
||||
streamOut << "4 .. vPilot rules" << endl;
|
||||
streamOut << "5 .. P3D cfg files" << endl;
|
||||
streamOut << "x .. exit" << endl;
|
||||
QString i = streamIn.readLine().toLower().trimmed();
|
||||
|
||||
bool run = true;
|
||||
QTime t;
|
||||
t.start();
|
||||
if (i.startsWith("1"))
|
||||
while (run)
|
||||
{
|
||||
BlackSample::CSamplesFsCommon::samples(streamOut, streamIn);
|
||||
}
|
||||
else if (i.startsWith("2"))
|
||||
{
|
||||
BlackSample::CSamplesFsx::samplesMisc(streamOut);
|
||||
}
|
||||
else if (i.startsWith("3"))
|
||||
{
|
||||
BlackSample::CSamplesModelMapping::samples(streamOut, streamIn);
|
||||
}
|
||||
else if (i.startsWith("4"))
|
||||
{
|
||||
BlackSample::CSamplesVPilotRules::samples(streamOut, streamIn);
|
||||
}
|
||||
else if (i.startsWith("5"))
|
||||
{
|
||||
BlackSample::CSamplesP3D::samplesMisc(streamOut);
|
||||
}
|
||||
else if (i.startsWith("x"))
|
||||
{
|
||||
streamOut << "terminating" << endl;
|
||||
streamOut << "Run samples:" << endl;
|
||||
streamOut << "1 .. FS common / Simulation (with cfg files reading)" << endl;
|
||||
streamOut << "2 .. FSX" << endl;
|
||||
streamOut << "3 .. Mappings" << endl;
|
||||
streamOut << "4 .. vPilot rules" << endl;
|
||||
streamOut << "5 .. P3D cfg files" << endl;
|
||||
streamOut << "6 .. FSUIPC read" << endl;
|
||||
streamOut << "x .. exit" << endl;
|
||||
QString i = streamIn.readLine().toLower().trimmed();
|
||||
|
||||
t.start();
|
||||
if (i.startsWith("1")) { CSamplesFsCommon::samples(streamOut, streamIn); }
|
||||
else if (i.startsWith("2")) { CSamplesFsx::samplesMisc(streamOut); }
|
||||
else if (i.startsWith("3")) { CSamplesModelMapping::samples(streamOut, streamIn); }
|
||||
else if (i.startsWith("4")) { CSamplesVPilotRules::samples(streamOut, streamIn); }
|
||||
else if (i.startsWith("5")) { CSamplesP3D::samplesMisc(streamOut); }
|
||||
else if (i.startsWith("6")) { CSamplesFsuipc::samplesFsuipc(streamOut); }
|
||||
else if (i.startsWith("x")) { run = false; streamOut << "terminating" << endl; }
|
||||
|
||||
streamOut << endl;
|
||||
streamOut << endl;
|
||||
}
|
||||
|
||||
streamOut << endl;
|
||||
|
||||
Reference in New Issue
Block a user