mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-22 23:05:36 +08:00
Avionics classes for Transponder, ADF, changed namespace to 2ndlevel
This commit is contained in:
@@ -16,11 +16,33 @@ int CSamplesAviation::samples()
|
||||
CAviationVerticalPositions vp2 = vp1;
|
||||
qDebug() << vp1 << (vp1 == vp2) << (vp1 != vp2);
|
||||
|
||||
CComSystem c1 = CComSystem::getCom1Unit(125.3);
|
||||
CComSystem c1 = CComSystem::getCom1System(125.3);
|
||||
qDebug() << c1;
|
||||
c1.setActiveUnicom();
|
||||
qDebug() << c1;
|
||||
|
||||
if(!CComSystem::tryGetComSystem(c1, "Test", -1.0))
|
||||
qDebug() << c1 << "is reset to default as expected";
|
||||
else
|
||||
qDebug() << "Something is utterly wrong here";
|
||||
|
||||
try{
|
||||
// uncomment to test assert
|
||||
// CFrequency f1(-1.0, CFrequencyUnit::MHz());
|
||||
// c1 = CComSystem("ups", f1, f1);
|
||||
// qDebug() << "Why do I get here??";
|
||||
} catch(std::range_error &ex) {
|
||||
qDebug() << "As expected" << ex.what();
|
||||
}
|
||||
|
||||
CNavSystem nav1;
|
||||
CNavSystem::tryGetNav1System(nav1, 110.0);
|
||||
qDebug() << nav1;
|
||||
|
||||
CTransponder tr1("T1", 7000, CTransponder::StateStandby);
|
||||
CTransponder tr2("T2", "4532", CTransponder::ModeMil3);
|
||||
qDebug() << tr1 << tr2;
|
||||
|
||||
// bye
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -5,8 +5,11 @@
|
||||
#include "blackmisc/avverticalpositions.h"
|
||||
#include "blackmisc/pqconstants.h"
|
||||
#include "blackmisc/aviocomsystem.h"
|
||||
#include "blackmisc/avionavsystem.h"
|
||||
#include "blackmisc/aviotransponder.h"
|
||||
|
||||
using namespace BlackMisc;
|
||||
using namespace BlackMisc::Aviation;
|
||||
using namespace BlackMisc::PhysicalQuantities;
|
||||
|
||||
namespace BlackMiscTest {
|
||||
|
||||
@@ -21,6 +24,6 @@ public:
|
||||
*/
|
||||
static int samples();
|
||||
};
|
||||
}
|
||||
} // namespace
|
||||
|
||||
#endif
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#include "blackmisc/pqconstants.h"
|
||||
#include "blackmisc/debug.h"
|
||||
|
||||
using namespace BlackMisc;
|
||||
using namespace BlackMisc::PhysicalQuantities;
|
||||
|
||||
namespace BlackMiscTest {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user