diff --git a/interface/resources/qml/hifi/tablet/OpenVrConfiguration.qml b/interface/resources/qml/hifi/tablet/OpenVrConfiguration.qml index 26ca0c644f..3679ffe919 100644 --- a/interface/resources/qml/hifi/tablet/OpenVrConfiguration.qml +++ b/interface/resources/qml/hifi/tablet/OpenVrConfiguration.qml @@ -393,6 +393,51 @@ Rectangle { Component.onCompleted: { var settings = InputConfiguration.configurationSettings(pluginName); + + var configurationType = settings["trackerConfiguration"]; + displayTrackerConfiguration(configurationType); + + + var HmdHead = settings["HMDHead"]; + var viveController = settings["handController"]; + + console.log(HmdHead); + console.log(viveController); + if (HmdHead) { + headBox.checked = true; + } else { + headPuckBox.checked = true; + } + + if (viveController) { + handBox.checked = true; + } else { + handPuckBox.checked = true; + } + } + + + function displayTrackerConfiguration(type) { + + if (type === "Feet") { + feetBox.checked = true; + } else if (type === "FeetAndHips") { + feetBox.checked = true; + hipBox.checked = true; + } else if (type === "FeetHipsChest") { + feetBox.checked = true; + hipBox.checked = true; + chestBox.checked = true; + } else if (type === "FeetHipsAndShoulders") { + feetBox.checked = true; + hipBox.checked = true; + shoulderBox.checked = true; + } else if (type === "FeetHipsChestAndShoulders") { + feetBox.checked = true; + hipBox.checked = true; + chestBox.checked = true; + shoulderBox.checked = true; + } } diff --git a/libraries/plugins/src/plugins/InputConfiguration.cpp b/libraries/plugins/src/plugins/InputConfiguration.cpp index 515033bf7b..78a20653f4 100644 --- a/libraries/plugins/src/plugins/InputConfiguration.cpp +++ b/libraries/plugins/src/plugins/InputConfiguration.cpp @@ -54,6 +54,11 @@ void InputConfiguration::setConfigurationSettings(QJsonObject configurationSetti } QJsonObject InputConfiguration::configurationSettings(QString pluginName) { + for (auto plugin : PluginManager::getInstance()->getInputPlugins()) { + if (plugin->getName() == pluginName) { + return plugin->configurationSettings(); + } + } return QJsonObject(); } diff --git a/plugins/openvr/src/ViveControllerManager.cpp b/plugins/openvr/src/ViveControllerManager.cpp index 87bd8ac1a5..d1087c5cc0 100644 --- a/plugins/openvr/src/ViveControllerManager.cpp +++ b/plugins/openvr/src/ViveControllerManager.cpp @@ -123,6 +123,7 @@ bool ViveControllerManager::isSupported() const { void ViveControllerManager::setConfigurationSettings(const QJsonObject configurationSettings) { if (isSupported()) { _inputDevice->configureCalibrationSettings(configurationSettings); + qDebug() << "sending back information"; } }