From 53f3a057d03f2269b5132c1e21b520f332c26549 Mon Sep 17 00:00:00 2001 From: polygraphene Date: Tue, 21 Aug 2018 23:19:18 +0900 Subject: [PATCH] v0.1 Fix some strings. Fix scripts. --- .../Properties/AssemblyInfo.cs | 4 +- .../VRControllerFreePIEPlugin.cs | 8 +- samples/test.py | 91 ++++++++++--------- samples/withalvr.py | 6 +- 4 files changed, 55 insertions(+), 54 deletions(-) diff --git a/FreePIEVRController/Properties/AssemblyInfo.cs b/FreePIEVRController/Properties/AssemblyInfo.cs index fa20bee..6d12f5d 100644 --- a/FreePIEVRController/Properties/AssemblyInfo.cs +++ b/FreePIEVRController/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: AssemblyVersion("0.1.0.0")] +[assembly: AssemblyFileVersion("0.1.0.0")] diff --git a/FreePIEVRController/VRControllerFreePIEPlugin.cs b/FreePIEVRController/VRControllerFreePIEPlugin.cs index 1f620c1..2be5bfa 100644 --- a/FreePIEVRController/VRControllerFreePIEPlugin.cs +++ b/FreePIEVRController/VRControllerFreePIEPlugin.cs @@ -83,7 +83,7 @@ public void Stop() public string FriendlyName { - get { return "VR Controller FreePIE Plugin"; } + get { return "VR Controller"; } } public bool GetProperty(int index, IPluginProperty property) @@ -91,10 +91,10 @@ public bool GetProperty(int index, IPluginProperty property) if (index == 0) { property.Name = "SomeProperty"; - property.Caption = "VR Controller FreePIE plugin is installed"; - property.HelpText = "VR Controller FreePIE plugin is installed"; + property.Caption = "VR Controller is installed"; + property.HelpText = "VR Controller is installed"; - property.Choices.Add("VR Controller FreePIE plugin is installed", 1); + property.Choices.Add("VR Controller is installed", 1); property.DefaultValue = 1; return true; diff --git a/samples/test.py b/samples/test.py index d0c1fbe..b092713 100644 --- a/samples/test.py +++ b/samples/test.py @@ -50,48 +50,49 @@ diagnostics.watch(vrcontroller[0].deviceId) diagnostics.watch(vrcontroller[0].temperature) -# only Daydream -diagnostics.watch(vrcontroller[1].orientation[0]) -diagnostics.watch(vrcontroller[1].orientation[1]) -diagnostics.watch(vrcontroller[1].orientation[2]) - -diagnostics.watch(vrcontroller[1].quaternion[0]) -diagnostics.watch(vrcontroller[1].quaternion[1]) -diagnostics.watch(vrcontroller[1].quaternion[2]) -diagnostics.watch(vrcontroller[1].quaternion[3]) - -diagnostics.watch(vrcontroller[1].position[0]) -diagnostics.watch(vrcontroller[1].position[1]) -diagnostics.watch(vrcontroller[1].position[2]) - -diagnostics.watch(vrcontroller[1].touch) -diagnostics.watch(vrcontroller[1].click) -diagnostics.watch(vrcontroller[1].home) -diagnostics.watch(vrcontroller[1].app) -diagnostics.watch(vrcontroller[1].volup) -diagnostics.watch(vrcontroller[1].voldown) -# only GearVR -diagnostics.watch(vrcontroller[1].trigger) -diagnostics.watch(vrcontroller[1].button[0]) - -diagnostics.watch(vrcontroller[1].acceleration[0]) -diagnostics.watch(vrcontroller[1].acceleration[1]) -diagnostics.watch(vrcontroller[1].acceleration[2]) - -diagnostics.watch(vrcontroller[1].gyroscope[0]) -diagnostics.watch(vrcontroller[1].gyroscope[1]) -diagnostics.watch(vrcontroller[1].gyroscope[2]) - -# only GearVR -diagnostics.watch(vrcontroller[1].magnetometer[0]) -diagnostics.watch(vrcontroller[1].magnetometer[1]) -diagnostics.watch(vrcontroller[1].magnetometer[2]) - -diagnostics.watch(vrcontroller[1].trackpad[0]) -diagnostics.watch(vrcontroller[1].trackpad[1]) - -diagnostics.watch(vrcontroller[1].version) -diagnostics.watch(vrcontroller[1].type) -diagnostics.watch(vrcontroller[1].bdaddr) -diagnostics.watch(vrcontroller[1].deviceId) -diagnostics.watch(vrcontroller[1].temperature) +if vrcontroller[1]: + # only Daydream + diagnostics.watch(vrcontroller[1].orientation[0]) + diagnostics.watch(vrcontroller[1].orientation[1]) + diagnostics.watch(vrcontroller[1].orientation[2]) + + diagnostics.watch(vrcontroller[1].quaternion[0]) + diagnostics.watch(vrcontroller[1].quaternion[1]) + diagnostics.watch(vrcontroller[1].quaternion[2]) + diagnostics.watch(vrcontroller[1].quaternion[3]) + + diagnostics.watch(vrcontroller[1].position[0]) + diagnostics.watch(vrcontroller[1].position[1]) + diagnostics.watch(vrcontroller[1].position[2]) + + diagnostics.watch(vrcontroller[1].touch) + diagnostics.watch(vrcontroller[1].click) + diagnostics.watch(vrcontroller[1].home) + diagnostics.watch(vrcontroller[1].app) + diagnostics.watch(vrcontroller[1].volup) + diagnostics.watch(vrcontroller[1].voldown) + # only GearVR + diagnostics.watch(vrcontroller[1].trigger) + diagnostics.watch(vrcontroller[1].button[0]) + + diagnostics.watch(vrcontroller[1].acceleration[0]) + diagnostics.watch(vrcontroller[1].acceleration[1]) + diagnostics.watch(vrcontroller[1].acceleration[2]) + + diagnostics.watch(vrcontroller[1].gyroscope[0]) + diagnostics.watch(vrcontroller[1].gyroscope[1]) + diagnostics.watch(vrcontroller[1].gyroscope[2]) + + # only GearVR + diagnostics.watch(vrcontroller[1].magnetometer[0]) + diagnostics.watch(vrcontroller[1].magnetometer[1]) + diagnostics.watch(vrcontroller[1].magnetometer[2]) + + diagnostics.watch(vrcontroller[1].trackpad[0]) + diagnostics.watch(vrcontroller[1].trackpad[1]) + + diagnostics.watch(vrcontroller[1].version) + diagnostics.watch(vrcontroller[1].type) + diagnostics.watch(vrcontroller[1].bdaddr) + diagnostics.watch(vrcontroller[1].deviceId) + diagnostics.watch(vrcontroller[1].temperature) diff --git a/samples/withalvr.py b/samples/withalvr.py index a6673a3..03ad5d4 100644 --- a/samples/withalvr.py +++ b/samples/withalvr.py @@ -154,9 +154,9 @@ def rotatevec(yaw_pitch_roll, vec): alvr.override_controller_position = True - alvr.controller_position[c][0] = vrcontroller[c].position[0] * 3 + offset[0] - alvr.controller_position[c][1] = vrcontroller[c].position[1] * 3 + offset[1] - alvr.controller_position[c][2] = vrcontroller[c].position[2] * 3 + offset[2] + alvr.controller_position[c][0] = vrcontroller[c].position[0] + offset[0] + alvr.controller_position[c][1] = vrcontroller[c].position[1] + offset[1] + alvr.controller_position[c][2] = vrcontroller[c].position[2] + offset[2] #alvr.controller_position[1-controller][0] = alvr.input_controller_position[0] + offset[0] + 0.1 #alvr.controller_position[1-controller][1] = alvr.input_controller_position[1] + offset[1] + 0.1 #alvr.controller_position[1-controller][2] = alvr.input_controller_position[2] + offset[2] + 0.1