mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01: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.right: parent.right
|
||||
anchors.top: inputConfiguration.bottom
|
||||
anchors.topMargin: 10
|
||||
anchors.bottom: parent.bottom
|
||||
Loader {
|
||||
id: loader
|
||||
|
@ -236,7 +235,7 @@ Item {
|
|||
if (box.currentText === "HTC Vive") {
|
||||
loader.item.pluginName = "OpenVR";
|
||||
} else {
|
||||
loader.item.pluginName = box.currentText;
|
||||
loader.item.pluginName = box.textAt(box.currentIndex);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -22,9 +22,17 @@ Flickable {
|
|||
anchors.fill: parent
|
||||
contentHeight: 550
|
||||
flickableDirection: Flickable.VerticalFlick
|
||||
property string pluginName: ""
|
||||
property var page: null;
|
||||
|
||||
onPluginNameChanged: {
|
||||
if (page !== null) {
|
||||
page.pluginName = flick.pluginName;
|
||||
}
|
||||
}
|
||||
|
||||
Component.onCompleted: {
|
||||
config.createObject(flick.contentItem);
|
||||
page = config.createObject(flick.contentItem);
|
||||
}
|
||||
Component {
|
||||
id: config
|
||||
|
@ -663,7 +671,7 @@ Flickable {
|
|||
onClicked: {
|
||||
if (calibrationButton.enabled) {
|
||||
if (openVrConfiguration.state === buttonState.apply) {
|
||||
InputConfiguration.uncalibratePlugin(pluginName);
|
||||
InputConfiguration.uncalibratePlugin(openVrConfiguration.pluginName);
|
||||
updateCalibrationButton();
|
||||
} else {
|
||||
calibrationTimer.interval = timeToCalibrate.realValue * 1000
|
||||
|
@ -701,7 +709,7 @@ Flickable {
|
|||
repeat: false
|
||||
interval: 20
|
||||
onTriggered: {
|
||||
InputConfiguration.calibratePlugin(pluginName)
|
||||
InputConfiguration.calibratePlugin(openVrConfiguration.pluginName)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -719,7 +727,7 @@ Flickable {
|
|||
}
|
||||
|
||||
Component.onDestruction: {
|
||||
var settings = InputConfiguration.configurationSettings(pluginName);
|
||||
var settings = InputConfiguration.configurationSettings(openVrConfiguration.pluginName);
|
||||
var data = {
|
||||
"num_pucks": settings["puckCount"]
|
||||
}
|
||||
|
@ -836,7 +844,6 @@ Flickable {
|
|||
|
||||
|
||||
function logAction(action, status) {
|
||||
console.log("calibrated from ui");
|
||||
var data = {
|
||||
"num_pucks": status["puckCount"],
|
||||
"puck_configuration": status["configuration"],
|
||||
|
@ -907,7 +914,7 @@ Flickable {
|
|||
}
|
||||
|
||||
function displayConfiguration() {
|
||||
var settings = InputConfiguration.configurationSettings(pluginName);
|
||||
var settings = InputConfiguration.configurationSettings(openVrConfiguration.pluginName);
|
||||
var configurationType = settings["trackerConfiguration"];
|
||||
displayTrackerConfiguration(configurationType);
|
||||
|
||||
|
@ -1107,7 +1114,7 @@ Flickable {
|
|||
|
||||
function sendConfigurationSettings() {
|
||||
var settings = composeConfigurationSettings();
|
||||
InputConfiguration.setConfigurationSettings(settings, pluginName);
|
||||
InputConfiguration.setConfigurationSettings(settings, openVrConfiguration.pluginName);
|
||||
updateCalibrationButton();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue