mirror of
https://github.com/overte-org/overte.git
synced 2025-08-10 03:40:20 +02:00
fixing calibration
This commit is contained in:
parent
f5e2a6834b
commit
5d570f030f
2 changed files with 15 additions and 9 deletions
|
@ -224,7 +224,6 @@ Item {
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.top: inputConfiguration.bottom
|
anchors.top: inputConfiguration.bottom
|
||||||
anchors.topMargin: 10
|
|
||||||
anchors.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
Loader {
|
Loader {
|
||||||
id: loader
|
id: loader
|
||||||
|
@ -236,7 +235,7 @@ Item {
|
||||||
if (box.currentText === "HTC Vive") {
|
if (box.currentText === "HTC Vive") {
|
||||||
loader.item.pluginName = "OpenVR";
|
loader.item.pluginName = "OpenVR";
|
||||||
} else {
|
} else {
|
||||||
loader.item.pluginName = box.currentText;
|
loader.item.pluginName = box.textAt(box.currentIndex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -22,9 +22,17 @@ Flickable {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
contentHeight: 550
|
contentHeight: 550
|
||||||
flickableDirection: Flickable.VerticalFlick
|
flickableDirection: Flickable.VerticalFlick
|
||||||
|
property string pluginName: ""
|
||||||
|
property var page: null;
|
||||||
|
|
||||||
|
onPluginNameChanged: {
|
||||||
|
if (page !== null) {
|
||||||
|
page.pluginName = flick.pluginName;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
config.createObject(flick.contentItem);
|
page = config.createObject(flick.contentItem);
|
||||||
}
|
}
|
||||||
Component {
|
Component {
|
||||||
id: config
|
id: config
|
||||||
|
@ -663,7 +671,7 @@ Flickable {
|
||||||
onClicked: {
|
onClicked: {
|
||||||
if (calibrationButton.enabled) {
|
if (calibrationButton.enabled) {
|
||||||
if (openVrConfiguration.state === buttonState.apply) {
|
if (openVrConfiguration.state === buttonState.apply) {
|
||||||
InputConfiguration.uncalibratePlugin(pluginName);
|
InputConfiguration.uncalibratePlugin(openVrConfiguration.pluginName);
|
||||||
updateCalibrationButton();
|
updateCalibrationButton();
|
||||||
} else {
|
} else {
|
||||||
calibrationTimer.interval = timeToCalibrate.realValue * 1000
|
calibrationTimer.interval = timeToCalibrate.realValue * 1000
|
||||||
|
@ -701,7 +709,7 @@ Flickable {
|
||||||
repeat: false
|
repeat: false
|
||||||
interval: 20
|
interval: 20
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
InputConfiguration.calibratePlugin(pluginName)
|
InputConfiguration.calibratePlugin(openVrConfiguration.pluginName)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -719,7 +727,7 @@ Flickable {
|
||||||
}
|
}
|
||||||
|
|
||||||
Component.onDestruction: {
|
Component.onDestruction: {
|
||||||
var settings = InputConfiguration.configurationSettings(pluginName);
|
var settings = InputConfiguration.configurationSettings(openVrConfiguration.pluginName);
|
||||||
var data = {
|
var data = {
|
||||||
"num_pucks": settings["puckCount"]
|
"num_pucks": settings["puckCount"]
|
||||||
}
|
}
|
||||||
|
@ -836,7 +844,6 @@ Flickable {
|
||||||
|
|
||||||
|
|
||||||
function logAction(action, status) {
|
function logAction(action, status) {
|
||||||
console.log("calibrated from ui");
|
|
||||||
var data = {
|
var data = {
|
||||||
"num_pucks": status["puckCount"],
|
"num_pucks": status["puckCount"],
|
||||||
"puck_configuration": status["configuration"],
|
"puck_configuration": status["configuration"],
|
||||||
|
@ -907,7 +914,7 @@ Flickable {
|
||||||
}
|
}
|
||||||
|
|
||||||
function displayConfiguration() {
|
function displayConfiguration() {
|
||||||
var settings = InputConfiguration.configurationSettings(pluginName);
|
var settings = InputConfiguration.configurationSettings(openVrConfiguration.pluginName);
|
||||||
var configurationType = settings["trackerConfiguration"];
|
var configurationType = settings["trackerConfiguration"];
|
||||||
displayTrackerConfiguration(configurationType);
|
displayTrackerConfiguration(configurationType);
|
||||||
|
|
||||||
|
@ -1107,7 +1114,7 @@ Flickable {
|
||||||
|
|
||||||
function sendConfigurationSettings() {
|
function sendConfigurationSettings() {
|
||||||
var settings = composeConfigurationSettings();
|
var settings = composeConfigurationSettings();
|
||||||
InputConfiguration.setConfigurationSettings(settings, pluginName);
|
InputConfiguration.setConfigurationSettings(settings, openVrConfiguration.pluginName);
|
||||||
updateCalibrationButton();
|
updateCalibrationButton();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue