From b038e4b7e7b10e82b23a4b9f0b29a08ad174ed42 Mon Sep 17 00:00:00 2001 From: Philip Rosedale Date: Mon, 1 Feb 2016 16:48:00 -0800 Subject: [PATCH] calibrate using either the 1 or 2 button on each hand --- plugins/hifiSixense/src/SixenseManager.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/plugins/hifiSixense/src/SixenseManager.cpp b/plugins/hifiSixense/src/SixenseManager.cpp index 3377aac14c..b23982f948 100644 --- a/plugins/hifiSixense/src/SixenseManager.cpp +++ b/plugins/hifiSixense/src/SixenseManager.cpp @@ -282,8 +282,8 @@ void SixenseManager::InputDevice::setDebugDrawCalibrated(bool flag) { // the calibration sequence is: // (1) reach arm straight out to the sides (xAxis is to the left) -// (2) press BUTTON_FWD on both hands and hold for one second -// (3) release both BUTTON_FWDs +// (2) press either BUTTON_1 or BUTTON_2 on both hands and hold for one second +// (3) release both buttons // // The code will: // (4) assume that the orb is on a flat surface (yAxis is UP) @@ -294,7 +294,8 @@ static const float MAXIMUM_NOISE_LEVEL = 0.05f; // meters static const quint64 LOCK_DURATION = USECS_PER_SECOND / 4; // time for lock to be acquired static bool calibrationRequested(SixenseControllerData* controllers) { - return (controllers[0].buttons == BUTTON_FWD && controllers[1].buttons == BUTTON_FWD); + return (((controllers[0].buttons == BUTTON_1) || (controllers[0].buttons == BUTTON_2)) && + ((controllers[1].buttons == BUTTON_1) || (controllers[1].buttons == BUTTON_2))); } void SixenseManager::InputDevice::updateCalibration(SixenseControllerData* controllers) {