diff options
-rw-r--r-- | compat/qhash.hpp | 2 | ||||
-rw-r--r-- | dinput/win32-joystick.hpp | 1 | ||||
-rw-r--r-- | options/bundle.hpp | 2 | ||||
-rw-r--r-- | options/connector.hpp | 3 | ||||
-rw-r--r-- | options/group.hpp | 1 | ||||
-rw-r--r-- | tracker-hatire/ftnoir_tracker_hat_dialog.cpp | 4 | ||||
-rw-r--r-- | tracker-hatire/ftnoir_tracker_hat_dialog.h | 4 | ||||
-rw-r--r-- | x-plane-plugin/plugin.c | 15 |
8 files changed, 17 insertions, 15 deletions
diff --git a/compat/qhash.hpp b/compat/qhash.hpp index 478f0d7d..28b2ca51 100644 --- a/compat/qhash.hpp +++ b/compat/qhash.hpp @@ -2,4 +2,4 @@ #include <functional> #include <QString> -#include <QHashFunctions>
\ No newline at end of file +#include <QHashFunctions> diff --git a/dinput/win32-joystick.hpp b/dinput/win32-joystick.hpp index 3aa6f315..82590db6 100644 --- a/dinput/win32-joystick.hpp +++ b/dinput/win32-joystick.hpp @@ -9,7 +9,6 @@ #include "dinput.hpp" #include "compat/timer.hpp" -#include "compat/qhash.hpp" #include "export.hpp" #include <memory> diff --git a/options/bundle.hpp b/options/bundle.hpp index d99ef06d..ce859bb1 100644 --- a/options/bundle.hpp +++ b/options/bundle.hpp @@ -24,8 +24,6 @@ #include <QDebug> -#include "compat/qhash.hpp" - #include "export.hpp" namespace options::detail { diff --git a/options/connector.hpp b/options/connector.hpp index e22cb20f..ffef2a3d 100644 --- a/options/connector.hpp +++ b/options/connector.hpp @@ -13,8 +13,7 @@ #include <QString> #include <QMutex> - -#include "compat/qhash.hpp" +#include <QHashFunctions> #include "export.hpp" diff --git a/options/group.hpp b/options/group.hpp index 93299b6e..751eee34 100644 --- a/options/group.hpp +++ b/options/group.hpp @@ -5,7 +5,6 @@ #include "compat/base-path.hpp" #include "compat/library-path.hpp" #include "compat/macros.hpp" -#include "compat/qhash.hpp" #include "export.hpp" #include <optional> diff --git a/tracker-hatire/ftnoir_tracker_hat_dialog.cpp b/tracker-hatire/ftnoir_tracker_hat_dialog.cpp index 491d1214..7cb25d18 100644 --- a/tracker-hatire/ftnoir_tracker_hat_dialog.cpp +++ b/tracker-hatire/ftnoir_tracker_hat_dialog.cpp @@ -177,8 +177,8 @@ void dialog_hatire::poll_tracker_info() int frame_cnt; theTracker->get_info(&frame_cnt); - ui.lab_vtps->setText(QString::number(frame_cnt*(1000/last_time.elapsed()))); - last_time.restart(); + ui.lab_vtps->setText(QString::number(frame_cnt*(1000/last_time.elapsed_ms()))); + last_time.start(); } } diff --git a/tracker-hatire/ftnoir_tracker_hat_dialog.h b/tracker-hatire/ftnoir_tracker_hat_dialog.h index 7577445c..c578f22f 100644 --- a/tracker-hatire/ftnoir_tracker_hat_dialog.h +++ b/tracker-hatire/ftnoir_tracker_hat_dialog.h @@ -1,12 +1,12 @@ #pragma once #include "api/plugin-api.hpp" +#include "compat/timer.hpp" #include "ftnoir_tracker_hat_settings.h" #include "ftnoir_tracker_hat.h" #include "ui_ftnoir_hatcontrols.h" #include <QObject> #include <QWidget> -#include <QTime> #include <QTimer> #include <QMessageBox> #include <QMetaType> @@ -25,7 +25,7 @@ public: private: Ui::UIHATControls ui; hatire *theTracker; - QTime last_time; + Timer last_time; public slots: void WriteMsgInfo(const QByteArray &MsgInfo); diff --git a/x-plane-plugin/plugin.c b/x-plane-plugin/plugin.c index e988313b..ed72e50e 100644 --- a/x-plane-plugin/plugin.c +++ b/x-plane-plugin/plugin.c @@ -176,12 +176,19 @@ void volatile_explicit_bzero(void volatile* restrict ptr, size_t len) PLUGIN_API OTR_GENERIC_EXPORT int XPluginStart (char* outName, char* outSignature, char* outDescription) { - view_x = XPLMFindDataRef("sim/aircraft/view/acf_peX"); - view_y = XPLMFindDataRef("sim/aircraft/view/acf_peY"); - view_z = XPLMFindDataRef("sim/aircraft/view/acf_peZ"); + // view_x = XPLMFindDataRef("sim/aircraft/view/acf_peX"); + // view_y = XPLMFindDataRef("sim/aircraft/view/acf_peY"); + // view_z = XPLMFindDataRef("sim/aircraft/view/acf_peZ"); + // view_heading = XPLMFindDataRef("sim/graphics/view/pilots_head_psi"); + // view_pitch = XPLMFindDataRef("sim/graphics/view/pilots_head_the"); + // view_roll = XPLMFindDataRef("sim/graphics/view/field_of_view_roll_deg"); + + view_x = XPLMFindDataRef("sim/graphics/view/pilots_head_x"); + view_y = XPLMFindDataRef("sim/graphics/view/pilots_head_y"); + view_z = XPLMFindDataRef("sim/graphics/view/pilots_head_z"); view_heading = XPLMFindDataRef("sim/graphics/view/pilots_head_psi"); view_pitch = XPLMFindDataRef("sim/graphics/view/pilots_head_the"); - view_roll = XPLMFindDataRef("sim/graphics/view/field_of_view_roll_deg"); + view_roll = XPLMFindDataRef("sim/graphics/view/pilots_head_phi"); track_toggle = XPLMCreateCommand("opentrack/toggle", "Disable/Enable head tracking"); translation_disable_toggle = XPLMCreateCommand("opentrack/toggle_translation", "Disable/Enable input translation from opentrack"); |