mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-30 11:55:35 +08:00
Ref T773, log.categories for XSwiftBusProxy
This commit is contained in:
committed by
Mat Sutcliffe
parent
08ef16e1a9
commit
08186e6559
@@ -7,12 +7,15 @@
|
||||
*/
|
||||
|
||||
#include "xswiftbustrafficproxy.h"
|
||||
#include "blackmisc/logmessage.h"
|
||||
|
||||
#include <QLatin1String>
|
||||
#include <QDBusConnection>
|
||||
#include <cmath>
|
||||
|
||||
#define XSWIFTBUS_SERVICENAME "org.swift-project.xswiftbus"
|
||||
|
||||
using namespace BlackMisc;
|
||||
using namespace BlackMisc::Aviation;
|
||||
using namespace BlackMisc::Geo;
|
||||
using namespace BlackMisc::PhysicalQuantities;
|
||||
@@ -21,6 +24,12 @@ namespace BlackSimPlugin
|
||||
{
|
||||
namespace XPlane
|
||||
{
|
||||
const CLogCategoryList &CXSwiftBusTrafficProxy::getLogCategories()
|
||||
{
|
||||
static const CLogCategoryList cats { CLogCategory::driver(), CLogCategory::dbus() };
|
||||
return cats;
|
||||
}
|
||||
|
||||
CXSwiftBusTrafficProxy::CXSwiftBusTrafficProxy(QDBusConnection &connection, QObject *parent, bool dummy) : QObject(parent)
|
||||
{
|
||||
m_dbusInterface = new BlackMisc::CGenericDBusInterface(XSWIFTBUS_SERVICENAME, ObjectPath(), InterfaceName(), connection, this);
|
||||
@@ -178,10 +187,13 @@ namespace BlackSimPlugin
|
||||
CLongitude(longitudeDegrees, CAngleUnit::deg()),
|
||||
elevationAlt, CElevationPlane::singlePointRadius());
|
||||
setter(elevation, cs);
|
||||
// CLogMessage(this).debug(u"XPlane elv. response: '%1' %2 %3 %4") << cs.asString() << latitudeDeg << longitudeDeg << elevationMeters;
|
||||
}
|
||||
watcher->deleteLater();
|
||||
};
|
||||
|
||||
m_dbusInterface->callDBusAsync(QLatin1String("getElevationAtPosition"), callback, callsign.asString(), latitudeDeg, longitudeDeg, altitudeMeters);
|
||||
// CLogMessage(this).debug(u"XPlane elv. request: '%1' %2 %3 %4") << callsign.asString() << latitudeDeg << longitudeDeg << altitudeMeters;
|
||||
}
|
||||
|
||||
void CXSwiftBusTrafficProxy::setFollowedAircraft(const QString &callsign)
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
#include "blackmisc/aviation/aircraftparts.h"
|
||||
#include "blackmisc/aviation/callsign.h"
|
||||
#include "blackmisc/geo/elevationplane.h"
|
||||
#include "blackmisc/logcategorylist.h"
|
||||
|
||||
#include <QObject>
|
||||
#include <QString>
|
||||
@@ -173,6 +174,9 @@ namespace BlackSimPlugin
|
||||
return s;
|
||||
}
|
||||
|
||||
//! Log. categories
|
||||
static const BlackMisc::CLogCategoryList &getLogCategories();
|
||||
|
||||
//! Constructor
|
||||
CXSwiftBusTrafficProxy(QDBusConnection &connection, QObject *parent = nullptr, bool dummy = false);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user