summaryrefslogtreecommitdiffhomepage
path: root/tracker-rift-042
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2016-09-09 20:01:15 +0200
committerStanislaw Halik <sthalik@misaki.pl>2016-09-09 20:41:52 +0200
commitbc139ef46760fcb9b9b7e5e6bb8e4a914b8eb222 (patch)
tree1f76f923e373e90201bea6b0816c7cecbd88285a /tracker-rift-042
parent3fa5061f47d1c5eb9545f1644cc6bd08f38f0a17 (diff)
tracker/rifts: show descriptive error messages, if any
Diffstat (limited to 'tracker-rift-042')
-rw-r--r--tracker-rift-042/ftnoir_tracker_rift_042.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/tracker-rift-042/ftnoir_tracker_rift_042.cpp b/tracker-rift-042/ftnoir_tracker_rift_042.cpp
index 901e4d1f..6107dc8d 100644
--- a/tracker-rift-042/ftnoir_tracker_rift_042.cpp
+++ b/tracker-rift-042/ftnoir_tracker_rift_042.cpp
@@ -2,6 +2,9 @@
#include "ftnoir_tracker_rift_042.h"
#include "api/plugin-api.hpp"
#include "compat/pi-constant.hpp"
+
+#include <QString>
+
#include <OVR_CAPI.h>
#include <Kernel/OVR_Math.h>
#include <cstdio>
@@ -30,9 +33,11 @@ void Rift_Tracker::start_tracker(QFrame*)
}
else
{
- // XXX need change ITracker et al api to allow for failure reporting
- // this qmessagebox doesn't give any relevant details either -sh 20141012
- QMessageBox::warning(0,"Error", "Unable to start Rift tracker",QMessageBox::Ok,QMessageBox::NoButton);
+ QMessageBox::warning(nullptr,
+ "Error",
+ QStringLiteral("Unable to start Rift tracker: %1").arg(ovrHmd_GetLastError(nullptr)),
+ QMessageBox::Ok,
+ QMessageBox::NoButton);
}
}
@@ -53,7 +58,7 @@ void Rift_Tracker::data(double *data)
Quatf quat = pose.Orientation;
float yaw, pitch, roll;
quat.GetEulerAngles<Axis_Y, Axis_X, Axis_Z>(&yaw, &pitch, &roll);
- double yaw_ = yaw;
+ double yaw_ = double(yaw);
if (s.useYawSpring)
{
yaw_ = old_yaw*s.persistence + (yaw_ - old_yaw);