diff --git a/Readme.md b/Readme.md
index 515be43..c42bea7 100644
--- a/Readme.md
+++ b/Readme.md
@@ -43,6 +43,7 @@ Adds an overlay to the OpenVR dashboard that allows access to advanced settings
* [Documentation](#documentation)
* [Top Page](#top-page)
* [- SteamVR Page](#--steamvr-page)
+ * [- SteamVR Pair Page](#--steamvr-pair-page)
* [- Chaperone Page](#--chaperone-page)
* [- Chaperone Proximity Warning Settings Page](#--chaperone-proximity-warning-settings-page)
* [- Space Offset Page](#--space-offset-page)
@@ -150,6 +151,10 @@ Detailed instructions are available [here](docs/building_for_linux.md).
- [Keyboard Input Guide (text)](docs/keyboard_input_guide.md)
+### Pairing Cheat Sheet
+
+- [Pairing Cheat Sheet (text)](docs/pairing_guide.md)
+
## Bindings
For information on how to properly set-up bindings see: [SteamVR Input System Guide](#guides)
@@ -362,6 +367,21 @@ These version are not stable and this should be considered for advanced users on
- **Camera for Room View**: You will have a Tron/Shadow version of the room when double-clicking system button.
- **Restart SteamVR**: Restart SteamVR (May crash the Steam overlay when SteamVR Home is running when you restart. Therefore I advice that you close SteamVR Home before restarting).
+## - SteamVR Pair Page
+
+
+
+ - **Status**: Will display "ready to pair", "pairing...", "success", or "Timeout" based on current status of pairing
+ - **dongles used**: Displays the Number of Lighthouse/Watchman/SteamVR Dongles attached to the system, and amount currently in use.
+ - **Refresh Device List**: Refreshes the list of attached devices
+ - **Device Information**
+ - **Device**: Displays type of device, and roles if any assigned
+ - **Device ID**: Displays a unique ID for the Device this **IS NOT** the serial number, but an identifier of the Transmitter in the device.
+ - **Connected Dongle Type**: Displays whether the dongle is a headset dongle, Tundra Dongle, or a Standard Dongle (htc/flashed steam controller/Unknown)
+ - **Dongle ID**: Unique ID for the radio of the dongle.
+ - **Pair**: Attempts to pair the device to the selected dongle.
+ **Note:** Pairing mode varies per controller see [Pairing Cheat Sheet (text)](docs/pairing_guide.md).
+
## - Chaperone Page
@@ -417,6 +437,7 @@ Allows users to temporarily move and rotate the center of the playspace. This al
- **Left/Right Hand**: Toggles functionality (must be active in addition to binding via input system to work.)
- **Comfort Mode**: Limits the rate at which your movement updates, reducing smoothness so that perceived motion starts to feel more like mini-teleports. Higher values reduce smoothness more.
- **Force Bounds**: Forces the display of the chaperone bounds during Space Drag.
+ - **Drag Multiplier**: Adds a Multiplier to the distance of your drag.
- **Height Toggle**: Toggle between zero and an offset for gravity floor height. If gravity is inactive the user is also moved to this offset. (Example: allows for quick switching between a seated and standing height.) Can be bound via SteamVr Input System.
- **On**: Current toggle state, Binds directly modify this.
- **Height Offset**: The amount of the offset (+ is down.)
@@ -426,7 +447,7 @@ Allows users to temporarily move and rotate the center of the playspace. This al
- **Gravity Strength**: Gravity simulation's downward acceleration in meters per second squared. Planet buttons provide quick settings for well known gravity strengths. Values can also be typed in directly.
- **Friction**: Slows down motion over time.
- **Save Momentum**: whether your momentum is saved between on/off toggles of gravity.
- - **fling Strength**: adjusts the strength at which you "throw" yourself with space drag feature.
+ - **Fling Strength**: adjusts the strength at which you "throw" yourself with space drag feature.
## - Rotation Page
@@ -538,15 +559,12 @@ Allows users to temporarily move and rotate the center of the playspace. This al
- **Allow External App Chaperone Edits:** Incorporates changes to the chaperone and universe center made by other applications. These changes could come from anywhere, including apps with unpredictable interactions with Advanced Settings. Therefore, this option opens the potential for chaperone misalignment or corruption. However it also allows other chaperone tweaking tools to function in tandem with Advanced Settings. **This option should only be checked if required for compatibility with other apps.** *Note: Changes will only take effect when offsets and rotation are all zero.*
- **Old-Style Motion:** Uses the old system of writing the chaperone universe center and bounds to disk every frame. Use this option only if you experience issues with playspace motion such as snapping back to reset position after releasing a space-drag. This old mode is smooth on most systems but is in theory less performant than the normal method.
- **Universe-Centered Rotation:** Causes Rotation to be applied to Universe Center Rather than HMD (Disables offsets automatically compensating to pivot at the HMD).
-- **Enable Motion Features When in Seated Mode:** Uncheck this if Advanced Settings causes strange positioning in a seated application. (Different apps handle seated mode in different ways, some are less compatible with Advanced Settings). Note: if unchecked, all Space Offsets and Motion tab features will be disabled.
-- **Enable Motion Features When in Uncalibrated Mode:** TBA
-- **OpenXR Fix (force standing universe):** TBA
- **Enable Automatic Crash Recovery of Chaperone Config:** This applies the last good autosaved chaperone profile when starting up after not shutting down properly.
- **Disable Notification of Newer Version Availability**: This turns off the on start-up check for a new version. (You can refresh this to do a manual check.)
-- **Force Use SteamVR Chaperone**: This feature is currently experimental, when using third party headsets this will allow you to use SteamVR's chaperone, as if it was a native headset.
+- **Force Use SteamVR Chaperone**: This feature is currently beta, when using third party headsets this will allow you to use SteamVR's chaperone, as if it was a native headset.
+- **Auto Apply Chaperone Profile**: This feature automatically applies a chaperone profile on launch, this pairs well with the "Force Use SteamVR Chaperone" option.
- **Force Use SteamVR (Disable Oculus API)**: This feature is currently experimental, it should disable Oculus API preventing games with both SteamVR and Oculus API to only run as SteamVR
- **Exclusive Input Toggle**: This feature Enables Exclusive Input Mode, while in this mode you will only send OVRAS keybinds or App keybinds (OVRAS system keybinds will always work)
-- **Adjust Chaperone:** TBA
- **Disable App Vsync:** Allows setting a custom base update rate for Advanced Settings. (Might be useful on HMDs with very high or very low refresh rates).
- **Shutdown OVRAS** Shuts-Down Advanced Settings without closing out of VR.
diff --git a/advancedSettings.pro b/advancedSettings.pro
index e7db78b..e5dbd50 100644
--- a/advancedSettings.pro
+++ b/advancedSettings.pro
@@ -1,4 +1,4 @@
-QT += core gui qml quick multimedia widgets
+QT += core gui qml quick multimedia widgets websockets
CONFIG += c++1z file_copies optimize_full
DEFINES += ELPP_THREAD_SAFE ELPP_QT_LOGGING ELPP_NO_DEFAULT_LOG_FILE
diff --git a/build_scripts/compile_version_string.txt b/build_scripts/compile_version_string.txt
index 9eba3c0..6532e25 100644
--- a/build_scripts/compile_version_string.txt
+++ b/build_scripts/compile_version_string.txt
@@ -1 +1 @@
-5.4.0-release
\ No newline at end of file
+5.5.0-release
\ No newline at end of file
diff --git a/docs/pairing_guide.md b/docs/pairing_guide.md
new file mode 100644
index 0000000..ffb6cb5
--- /dev/null
+++ b/docs/pairing_guide.md
@@ -0,0 +1,33 @@
+# Pairing Cheat Sheet
+
+## Info
+
+This Guide contains info on how to get your controllers/trackers into pairing mode
+
+### Controllers Paired to headset dongles
+ - Controllers should be paired to the headset, if they are not they may lose radio contact more frequently making it seem as though they are losing tracking
+ - Controllers can take longer to initialize if they are not paired to the headset
+
+## Controllers
+
+### Knuckles
+
+- Hold B and System button for 3-5 seconds to hear a beep and starts flashing blue
+
+### Vive Wand
+
+- Hold Menu and System button for 3-5 seconds to hear a beep and starts flashing blue
+
+### Logitech Pen
+
+- Hold Menu and System button for 3-5 seconds to hear a beep and starts flashing blue
+
+## Trackers
+
+### Vive Tracker (1.0->3.0)
+
+- Hold Button 3-5 seconds until led starts flashing blue
+
+### Tundra Tracker
+
+- Hold Button 3-5 seconds until led starts flashing blue
\ No newline at end of file
diff --git a/docs/screenshots/MotionPage.png b/docs/screenshots/MotionPage.png
index 52cd48d..cc0c0f4 100644
Binary files a/docs/screenshots/MotionPage.png and b/docs/screenshots/MotionPage.png differ
diff --git a/docs/screenshots/RootPage.png b/docs/screenshots/RootPage.png
index 689baf5..780e27a 100644
Binary files a/docs/screenshots/RootPage.png and b/docs/screenshots/RootPage.png differ
diff --git a/docs/screenshots/SettingsPage.png b/docs/screenshots/SettingsPage.png
index 38cdb65..8c046d2 100644
Binary files a/docs/screenshots/SettingsPage.png and b/docs/screenshots/SettingsPage.png differ
diff --git a/docs/screenshots/SteamVRPage.png b/docs/screenshots/SteamVRPage.png
index efb97f0..a7ba08d 100644
Binary files a/docs/screenshots/SteamVRPage.png and b/docs/screenshots/SteamVRPage.png differ
diff --git a/docs/screenshots/SteamVRPairPage.png b/docs/screenshots/SteamVRPairPage.png
new file mode 100644
index 0000000..4c9b900
Binary files /dev/null and b/docs/screenshots/SteamVRPairPage.png differ
diff --git a/src/overlaycontroller.cpp b/src/overlaycontroller.cpp
index 213d535..138cbbf 100644
--- a/src/overlaycontroller.cpp
+++ b/src/overlaycontroller.cpp
@@ -493,6 +493,29 @@ void OverlayController::SetWidget( QQuickItem* quickItem,
m_moveCenterTabController.initStage2( this );
m_rotationTabController.initStage2( this );
m_videoTabController.initStage2();
+
+ if ( autoApplyChaperoneEnabled() )
+ {
+ m_chaperoneTabController.reloadChaperoneProfiles();
+ auto chapindex
+ = m_chaperoneTabController.getChaperoneProfileIndexFromName(
+ autoApplyChaperoneName() );
+ if ( chapindex.first )
+ {
+ m_chaperoneTabController.applyChaperoneProfile( chapindex.second );
+ vr::VRApplications()->CancelApplicationLaunch(
+ "openvr.tool.steamvr_room_setup" );
+ if ( vr::VRApplications()->GetApplicationProcessId(
+ "openvr.tool.steamvr_room_setup" )
+ != 0 )
+ {
+ LOG( INFO ) << "room setup running after applying chaperone "
+ "exiting roomsetup";
+ vr::VRApplications()->LaunchApplication(
+ "openvr.tool.steamvr_environments" );
+ }
+ }
+ }
}
void OverlayController::OnRenderRequest()
@@ -819,7 +842,7 @@ void OverlayController::setExclusiveInputEnabled( bool value, bool notify )
}
}
-void OverlayController::setOpenXRFixEnabled( bool value, bool notify )
+/*void OverlayController::setOpenXRFixEnabled( bool value, bool notify )
{
settings::setSetting( settings::BoolSetting::APPLICATION_openXRWorkAround,
value );
@@ -833,6 +856,37 @@ bool OverlayController::openXRFixEnabled() const
{
return settings::getSetting(
settings::BoolSetting::APPLICATION_openXRWorkAround );
+}*/
+
+void OverlayController::setAutoApplyChaperoneEnabled( bool value, bool notify )
+{
+ settings::setSetting( settings::BoolSetting::APPLICATION_autoApplyChaperone,
+ value );
+ if ( notify )
+ {
+ emit autoApplyChaperoneEnabledChanged( value );
+ }
+}
+
+std::string OverlayController::autoApplyChaperoneName()
+{
+ return settings::getSetting(
+ settings::StringSetting::APPLICATION_autoApplyChaperoneName );
+}
+
+Q_INVOKABLE void OverlayController::setAutoChapProfileName( int index )
+{
+ std::string value
+ = m_chaperoneTabController.getChaperoneProfileName( index )
+ .toStdString();
+ settings::setSetting(
+ settings::StringSetting::APPLICATION_autoApplyChaperoneName, value );
+}
+
+bool OverlayController::autoApplyChaperoneEnabled() const
+{
+ return settings::getSetting(
+ settings::BoolSetting::APPLICATION_autoApplyChaperone );
}
bool OverlayController::crashRecoveryDisabled() const
@@ -1260,6 +1314,7 @@ void OverlayController::mainEventLoop()
// This Fix is hopefully temporary as OpenVR doesn't appear to have a way to
// tell if an application is OpenXR outside of VR_init which we don't have
// control over
+ /*
if ( vr::VRApplications()->GetApplicationProcessId(
"openvr.tool.steamvr_room_setup" )
== 0
@@ -1269,7 +1324,7 @@ void OverlayController::mainEventLoop()
// Unless Room Setup is running, treat this case as Standing.
universe = vr::TrackingUniverseStanding;
}
-
+ */
m_moveCenterTabController.eventLoopTick( universe, devicePoses );
m_utilitiesTabController.eventLoopTick();
m_statisticsTabController.eventLoopTick(
diff --git a/src/overlaycontroller.h b/src/overlaycontroller.h
index 058596c..8312e9c 100644
--- a/src/overlaycontroller.h
+++ b/src/overlaycontroller.h
@@ -93,8 +93,9 @@ class OverlayController : public QObject
Q_PROPERTY(
bool exclusiveInputEnabled READ exclusiveInputEnabled WRITE
setExclusiveInputEnabled NOTIFY exclusiveInputEnabledChanged )
- Q_PROPERTY( bool openXRFixEnabled READ openXRFixEnabled WRITE
- setOpenXRFixEnabled NOTIFY openXRFixEnabledChanged )
+ Q_PROPERTY( bool autoApplyChaperoneEnabled READ autoApplyChaperoneEnabled
+ WRITE setAutoApplyChaperoneEnabled NOTIFY
+ autoApplyChaperoneEnabledChanged )
private:
vr::VROverlayHandle_t m_ulOverlayHandle = vr::k_ulOverlayHandleInvalid;
@@ -183,6 +184,7 @@ public:
void Shutdown();
Q_INVOKABLE void exitApp();
+ Q_INVOKABLE void setAutoChapProfileName( int index );
bool isDashboardVisible()
{
@@ -240,7 +242,7 @@ public:
bool crashRecoveryDisabled() const;
bool exclusiveInputEnabled() const;
- bool openXRFixEnabled() const;
+ bool autoApplyChaperoneEnabled() const;
bool enableDebug() const;
bool disableVersionCheck() const;
bool newVersionDetected() const;
@@ -248,6 +250,7 @@ public:
QString versionCheckText() const;
int customTickRateMs() const;
int debugState() const;
+ std::string autoApplyChaperoneName();
public slots:
void renderOverlay();
@@ -273,7 +276,7 @@ public slots:
void setVsyncDisabled( bool value, bool notify = true );
void setCustomTickRateMs( int value, bool notify = true );
void setDebugState( int value, bool notify = true );
- void setOpenXRFixEnabled( bool value, bool notify = true );
+ void setAutoApplyChaperoneEnabled( bool value, bool notify = true );
signals:
void keyBoardInputSignal( QString input, unsigned long userValue = 0 );
@@ -286,7 +289,7 @@ signals:
void vsyncDisabledChanged( bool value );
void customTickRateMsChanged( int value );
void debugStateChanged( int value );
- void openXRFixEnabledChanged( bool value );
+ void autoApplyChaperoneEnabledChanged( bool value );
};
} // namespace advsettings
diff --git a/src/res/qml/PlayspacePage.qml b/src/res/qml/PlayspacePage.qml
index 514d8b9..5faca3a 100644
--- a/src/res/qml/PlayspacePage.qml
+++ b/src/res/qml/PlayspacePage.qml
@@ -86,13 +86,6 @@ MyStackViewPage {
}
}
- MyText {
- id: seatedDisableWarningText
- visible: false
- wrapMode: Text.WordWrap
- text: "Settings Tab: 'Enable Motion Features in Seated Mode' not checked"
- }
-
ColumnLayout {
id: profileSection
Layout.bottomMargin: 32
@@ -521,28 +514,10 @@ MyStackViewPage {
if (MoveCenterTabController.trackingUniverse === 0) {
spaceModeText.text = "Sitting"
spaceSeatedRecenter.visible = true
- var boolEnableSeatedMotion = MoveCenterTabController.enableSeatedMotion
- offsetsGroupBox.visible = boolEnableSeatedMotion
- rotationGroupBox.visible = boolEnableSeatedMotion
- resetButtonRow.visible = boolEnableSeatedMotion
- profileSection.visible = boolEnableSeatedMotion
- seatedDisableWarningText.visible = !boolEnableSeatedMotion
-
} else if (MoveCenterTabController.trackingUniverse === 1) {
spaceModeText.text = "Standing"
- spaceSeatedRecenter.visible = true
- offsetsGroupBox.visible = true
- rotationGroupBox.visible = true
- resetButtonRow.visible = true
- profileSection.visible = true
- seatedDisableWarningText.visible = false
} else {
spaceModeText.text = "Unknown(" + MoveCenterTabController.trackingUniverse + ")"
- offsetsGroupBox.visible = false
- rotationGroupBox.visible = false
- resetButtonRow.visible = false
- profileSection.visible = false
- seatedDisableWarningText.visible = false
}
reloadOffsetProfiles()
}
@@ -575,43 +550,14 @@ MyStackViewPage {
onLockZToggleChanged: {
lockZToggle.checked = MoveCenterTabController.lockZToggle
}
- onEnableSeatedMotionChanged: {
- if (MoveCenterTabController.trackingUniverse === 0) {
- spaceModeText.text = "Sitting"
- spaceSeatedRecenter.visible = true
- var boolEnableSeatedMotion = MoveCenterTabController.enableSeatedMotion
- offsetsGroupBox.visible = boolEnableSeatedMotion
- rotationGroupBox.visible = boolEnableSeatedMotion
- resetButtonRow.visible = boolEnableSeatedMotion
- profileSection.visible = boolEnableSeatedMotion
- seatedDisableWarningText.visible = !boolEnableSeatedMotion
- }
- }
onTrackingUniverseChanged: {
if (MoveCenterTabController.trackingUniverse === 0) {
spaceModeText.text = "Sitting"
spaceSeatedRecenter.visible = true
- var boolEnableSeatedMotion = MoveCenterTabController.enableSeatedMotion
- offsetsGroupBox.visible = boolEnableSeatedMotion
- rotationGroupBox.visible = boolEnableSeatedMotion
- resetButtonRow.visible = boolEnableSeatedMotion
- profileSection.visible = boolEnableSeatedMotion
- seatedDisableWarningText.visible = !boolEnableSeatedMotion
} else if (MoveCenterTabController.trackingUniverse === 1) {
spaceModeText.text = "Standing"
- spaceSeatedRecenter.visible = true
- offsetsGroupBox.visible = true
- rotationGroupBox.visible = true
- resetButtonRow.visible = true
- profileSection.visible = true
- seatedDisableWarningText.visible = false
} else {
spaceModeText.text = "Unknown(" + MoveCenterTabController.trackingUniverse + ")"
- offsetsGroupBox.visible = false
- rotationGroupBox.visible = false
- resetButtonRow.visible = false
- profileSection.visible = false
- seatedDisableWarningText.visible = false
}
}
onOffsetProfilesUpdated: {
diff --git a/src/res/qml/SettingsPage.qml b/src/res/qml/SettingsPage.qml
index 8335c31..391225c 100644
--- a/src/res/qml/SettingsPage.qml
+++ b/src/res/qml/SettingsPage.qml
@@ -31,7 +31,7 @@ MyStackViewPage {
text: "Allow External App Chaperone Edits (Danger)"
onCheckedChanged: {
MoveCenterTabController.setAllowExternalEdits(checked, true)
- seatedOldExternalWarning.visible = checked && MoveCenterTabController.oldStyleMotion && MoveCenterTabController.enableSeatedMotion
+ seatedOldExternalWarning.visible = checked && MoveCenterTabController.oldStyleMotion
}
}
@@ -40,7 +40,7 @@ MyStackViewPage {
text: "Old-Style Motion (per-frame disk writes)"
onCheckedChanged: {
MoveCenterTabController.setOldStyleMotion(checked, true)
- seatedOldExternalWarning.visible = MoveCenterTabController.allowExternalEdits && checked && MoveCenterTabController.enableSeatedMotion
+ seatedOldExternalWarning.visible = MoveCenterTabController.allowExternalEdits && checked
}
}
@@ -52,30 +52,6 @@ MyStackViewPage {
}
}
- MyToggleButton {
- id: enableSeatedMotionToggle
- text: "Enable Motion Features When in Seated Mode (Experimental)"
- onCheckedChanged: {
- MoveCenterTabController.setEnableSeatedMotion(checked, true)
- seatedOldExternalWarning.visible = MoveCenterTabController.allowExternalEdits && MoveCenterTabController.oldStyleMotion && checked
- }
- }
-
- MyToggleButton {
- id: enableUnccalMotionToggle
- text: "Enable Motion Features When in Uncalibrated Mode (Experimental)"
- onCheckedChanged: {
- MoveCenterTabController.setEnableUncalMotion(checked, true);
- }
- }
-
- MyToggleButton {
- id: openXRFixToggle
- text: "OpenXR Fix (force standing universe [Experimental])"
- onCheckedChanged: {
- OverlayController.setOpenXRFixEnabled(checked, true);
- }
- }
MyToggleButton {
id: disableCrashRecoveryToggle
@@ -99,6 +75,48 @@ MyStackViewPage {
SettingsTabController.setNativeChaperoneToggle(this.checked, true)
}
}
+ RowLayout {
+ spacing: 18
+
+ MyToggleButton {
+ id: autoApplyChaperoneToggleButton
+ text: "Auto Apply Chaperone Profile:"
+ onCheckedChanged: {
+ OverlayController.setAutoApplyChaperoneEnabled(this.checked, true)
+ }
+ }
+
+ MyComboBox {
+ id: summaryChaperoneProfileComboBox
+ Layout.leftMargin: 47
+ Layout.maximumWidth: 378
+ Layout.minimumWidth: 378
+ Layout.preferredWidth: 378
+ Layout.fillWidth: true
+ model: [""]
+ onCurrentIndexChanged: {
+ if (currentIndex > 0) {
+ summaryChaperoneProfileApplyButton.enabled = true
+ } else {
+ summaryChaperoneProfileApplyButton.enabled = false
+ }
+ }
+ }
+
+ MyPushButton {
+ id: summaryChaperoneProfileApplyButton
+ enabled: false
+ Layout.preferredWidth: 150
+ text: "Select"
+ onClicked: {
+ if (summaryChaperoneProfileComboBox.currentIndex > 0) {
+ ChaperoneTabController.applyChaperoneProfile(summaryChaperoneProfileComboBox.currentIndex - 1)
+ OverlayController.setAutoChapProfileName(summaryChaperoneProfileComboBox.currentIndex - 1)
+ summaryChaperoneProfileComboBox.currentIndex = 0
+ }
+ }
+ }
+ }
MyToggleButton {
id: oculusSdkToggleButton
text: "Force Use SteamVR (Disable Oculus API [experimental])"
@@ -113,13 +131,6 @@ MyStackViewPage {
OverlayController.setExclusiveInputEnabled(this.checked, true)
}
}
- MyToggleButton {
- id: spaceAdjustChaperoneToggle
- text: "Adjust Chaperone"
- onCheckedChanged: {
- MoveCenterTabController.adjustChaperone = this.checked
- }
- }
RowLayout {
Layout.fillWidth: true
@@ -266,8 +277,6 @@ MyStackViewPage {
allowExternalEditsToggle.checked = MoveCenterTabController.allowExternalEdits
oldStyleMotionToggle.checked = MoveCenterTabController.oldStyleMotion
universeCenteredRotationToggle.checked = MoveCenterTabController.universeCenteredRotation
- enableSeatedMotionToggle.checked = MoveCenterTabController.enableSeatedMotion
- enableUnccalMotionToggle.checked = MoveCenterTabController.enableUncalMotion
disableCrashRecoveryToggle.checked = !OverlayController.crashRecoveryDisabled
customTickRateText.text = OverlayController.customTickRateMs
@@ -281,11 +290,11 @@ MyStackViewPage {
nativeChaperoneToggleButton.checked = SettingsTabController.nativeChaperoneToggle
oculusSdkToggleButton.checked = SettingsTabController.oculusSdkToggle
exclusiveInputToggleButton.checked = OverlayController.exclusiveInputEnabled
- openXRFixToggle.checked = OverlayController.openXRFixEnabled
+ autoApplyChaperoneToggleButton.checked = OverlayController.autoApplyChaperoneEnabled
- seatedOldExternalWarning.visible = MoveCenterTabController.allowExternalEdits && MoveCenterTabController.oldStyleMotion && MoveCenterTabController.enableSeatedMotion
- spaceAdjustChaperoneToggle.checked = MoveCenterTabController.adjustChaperone
+ seatedOldExternalWarning.visible = MoveCenterTabController.allowExternalEdits && MoveCenterTabController.oldStyleMotion
+ reloadChaperoneProfiles()
}
Connections {
@@ -305,25 +314,15 @@ MyStackViewPage {
target: MoveCenterTabController
onAllowExternalEditsChanged: {
allowExternalEditsToggle.checked = MoveCenterTabController.allowExternalEdits
- seatedOldExternalWarning.visible = MoveCenterTabController.allowExternalEdits && MoveCenterTabController.oldStyleMotion && MoveCenterTabController.enableSeatedMotion
+ seatedOldExternalWarning.visible = MoveCenterTabController.allowExternalEdits && MoveCenterTabController.oldStyleMotion
}
onOldStyleMotionChanged: {
oldStyleMotionToggle.checked = MoveCenterTabController.oldStyleMotion
- seatedOldExternalWarning.visible = MoveCenterTabController.allowExternalEdits && MoveCenterTabController.oldStyleMotion && MoveCenterTabController.enableSeatedMotion
+ seatedOldExternalWarning.visible = MoveCenterTabController.allowExternalEdits && MoveCenterTabController.oldStyleMotion
}
onUniverseCenteredRotationChanged: {
universeCenteredRotationToggle.checked = MoveCenterTabController.universeCenteredRotation
}
- onEnableSeatedMotionChanged: {
- enableSeatedMotionToggle.checked = MoveCenterTabController.enableSeatedMotion
- seatedOldExternalWarning.visible = MoveCenterTabController.allowExternalEdits && MoveCenterTabController.oldStyleMotion && MoveCenterTabController.enableSeatedMotion
- }
- onEnableUncalMotionChanged: {
- enableUnccalMotionToggle.checked = MoveCenterTabController.enableUncalMotion
- }
- onAdjustChaperoneChanged: {
- spaceAdjustChaperoneToggle.checked = MoveCenterTabController.adjustChaperone
- }
}
Connections {
@@ -355,9 +354,24 @@ MyStackViewPage {
onExclusiveInputEnabledChanged:{
exclusiveInputToggleButton.checked = OverlayController.exclusiveInputEnabled
}
- onOpenXRFixEnabledChanged:{
- openXRFixToggle.checked = OverlayController.openXRFixEnabled
+ onAutoApplyChaperoneEnabledChanged: {
+ autoApplyChaperoneToggleButton.checked = OverlayController.autoApplyChaperoneEnabled
+ }
+ }
+ Connections{
+ target: ChaperoneTabController
+ onChaperoneProfilesUpdated: {
+ reloadChaperoneProfiles()
}
}
} // end scroll
+ function reloadChaperoneProfiles() {
+ var profiles = [""]
+ var profileCount = ChaperoneTabController.getChaperoneProfileCount()
+ for (var i = 0; i < profileCount; i++) {
+ profiles.push(ChaperoneTabController.getChaperoneProfileName(i))
+ }
+ summaryChaperoneProfileComboBox.currentIndex = 0
+ summaryChaperoneProfileComboBox.model = profiles
+ }
}
diff --git a/src/res/qml/motion_page/gravity/GravityGroupBox.qml b/src/res/qml/motion_page/gravity/GravityGroupBox.qml
index 975e911..2ccc619 100644
--- a/src/res/qml/motion_page/gravity/GravityGroupBox.qml
+++ b/src/res/qml/motion_page/gravity/GravityGroupBox.qml
@@ -171,10 +171,10 @@ GroupBox {
function onInputEvent(input) {
var val = parseFloat(input)
if (!isNaN(val)) {
- MoveCenterTabController.flingStrength = val.toFixed(1)
- text = MoveCenterTabController.flingStrength.toFixed(1)
+ MoveCenterTabController.flingStrength = val.toFixed(2)
+ text = MoveCenterTabController.flingStrength.toFixed(2)
} else {
- text = MoveCenterTabController.flingStrength.toFixed(1)
+ text = MoveCenterTabController.flingStrength.toFixed(2)
}
}
}
diff --git a/src/res/qml/motion_page/space_drag/SpaceDragGroupBox.qml b/src/res/qml/motion_page/space_drag/SpaceDragGroupBox.qml
index 07da636..bac6fbb 100644
--- a/src/res/qml/motion_page/space_drag/SpaceDragGroupBox.qml
+++ b/src/res/qml/motion_page/space_drag/SpaceDragGroupBox.qml
@@ -88,6 +88,60 @@ GroupBox {
}
}
}
+ RowLayout{
+ Item{
+ Layout.fillWidth: true
+ }
+
+ MyText {
+ text: "Drag Multiplier:"
+ horizontalAlignment: Text.AlignRight
+ Layout.rightMargin: 2
+ }
+
+ MyTextField {
+ id: dragMultText
+ text: "1.0"
+ keyBoardUID: 157
+ Layout.preferredWidth: 120
+ Layout.leftMargin: 10
+ Layout.rightMargin: 10
+ horizontalAlignment: Text.AlignHCenter
+ function onInputEvent(input) {
+ var val = parseFloat(input)
+ if (!isNaN(val)) {
+ MoveCenterTabController.dragMult = val.toFixed(2)
+ text = MoveCenterTabController.dragMult.toFixed(2)
+ } else {
+ text = MoveCenterTabController.dragMult.toFixed(2)
+ }
+ }
+ }
+
+ MyPushButton2 {
+ Layout.preferredWidth: 50
+ text: "1x"
+ onClicked: {
+ MoveCenterTabController.dragMult = 1.0
+ }
+ }
+
+ MyPushButton2 {
+ Layout.preferredWidth: 50
+ text: "2x"
+ onClicked: {
+ MoveCenterTabController.dragMult = 2.0
+ }
+ }
+
+ MyPushButton2 {
+ Layout.preferredWidth: 50
+ text: "3x"
+ onClicked: {
+ MoveCenterTabController.dragMult = 3.0
+ }
+ }
+ }
}
Component.onCompleted: {
@@ -95,6 +149,7 @@ GroupBox {
moveShortcutRight.checked = MoveCenterTabController.moveShortcutRight
dragComfortSlider.value = MoveCenterTabController.dragComfortFactor
dragBounds.checked = MoveCenterTabController.dragBounds
+ dragMultText.text = MoveCenterTabController.dragMult.toFixed(2)
}
Connections {
@@ -112,5 +167,8 @@ GroupBox {
onDragBoundsChanged: {
dragBounds.checked = MoveCenterTabController.dragBounds
}
+ onDragMultChanged: {
+ dragMultText.text = MoveCenterTabController.dragMult.toFixed(2)
+ }
}
}
diff --git a/src/res/qml/steamvr_page/SteamVRPage.qml b/src/res/qml/steamvr_page/SteamVRPage.qml
index 0cac7d7..0640051 100644
--- a/src/res/qml/steamvr_page/SteamVRPage.qml
+++ b/src/res/qml/steamvr_page/SteamVRPage.qml
@@ -30,6 +30,7 @@ MyStackViewPage {
onClicked: {
MyResources.playFocusChangedSound()
mainView.push(steamVRTXRXPage)
+ SteamVRTabController.updateRXTXList()
}
}
diff --git a/src/res/qml/steamvr_page/steamvr_additional/SteamVRTXRXPage.qml b/src/res/qml/steamvr_page/steamvr_additional/SteamVRTXRXPage.qml
index bd9c971..f37f9c5 100644
--- a/src/res/qml/steamvr_page/steamvr_additional/SteamVRTXRXPage.qml
+++ b/src/res/qml/steamvr_page/steamvr_additional/SteamVRTXRXPage.qml
@@ -25,6 +25,18 @@ MyStackViewPage {
spacing: 10
Layout.fillWidth: true
Layout.fillHeight: true
+ RowLayout{
+ MyText{
+ text: "Status: "
+ Layout.preferredWidth: 200
+ }
+ MyText{
+ id: statusText
+ text: "Ready to Pair"
+ Layout.fillWidth: true
+ }
+ }
+
RowLayout{
MyText{
text: "dongles used: "
@@ -46,9 +58,21 @@ MyStackViewPage {
onClicked: {
getRXTX()
}
-
}
}
+ RowLayout{
+ MyText{
+ text: "Instructions: Set Device to pairing mode and then hit pair on desired un-connected Dongle. To pair to a currently used dongle turn-off the attached device and refresh the list"
+ Layout.fillWidth: true
+ wrapMode: Text.WordWrap
+ }
+ }
+ Rectangle {
+ color: "#ffffff"
+ height: 1
+ Layout.fillWidth: true
+ Layout.bottomMargin: 5
+ }
RowLayout{
Layout.fillHeight: true
Layout.fillWidth: true
@@ -101,6 +125,7 @@ MyStackViewPage {
MyText{
Layout.preferredWidth: 250
text: TX
+ clip: true
}
Item{
Layout.preferredWidth: 50
@@ -112,15 +137,29 @@ MyStackViewPage {
MyText{
Layout.preferredWidth: 250
text: DT
+ clip: true
}
}
RowLayout{
Layout.fillHeight: true
Layout.fillWidth: true
clip: true
+ MyPushButton{
+ Layout.preferredWidth: 200
+ text: "Pair"
+ id: pairBtn
+ onClicked: {
+ SteamVRTabController.pairDevice(rxtext.text)
+ }
+ Component.onCompleted: {
+ if(Dev != "No Connection"){
+ this.enabled = false;
+ }
+ }
+ }
Item{
- Layout.preferredWidth: 600
+ Layout.preferredWidth: 400
}
MyText{
Layout.preferredWidth: 150
@@ -128,6 +167,7 @@ MyStackViewPage {
}
MyText{
Layout.preferredWidth: 250
+ id: rxtext
text: RX
}
}
@@ -143,6 +183,18 @@ MyStackViewPage {
Component.onCompleted: {
getRXTX()
}
+ Connections{
+ target: SteamVRTabController
+ onPairStatusChanged: {
+ statusText.text = value;
+ getRXTX()
+ }
+ onUpdateRXTX:{
+ getRXTX()
+ }
+
+ }
+
function getRXTX() {
listModelRXTX.clear();
SteamVRTabController.searchRXTX();
diff --git a/src/settings/internal/settings_controller.h b/src/settings/internal/settings_controller.h
index f964ca1..047b142 100644
--- a/src/settings/internal/settings_controller.h
+++ b/src/settings/internal/settings_controller.h
@@ -318,6 +318,10 @@ private:
SettingCategory::Application,
QtInfo{ "openXRWorkAround" },
false },
+ BoolSettingValue{ BoolSetting::APPLICATION_autoApplyChaperone,
+ SettingCategory::Application,
+ QtInfo{ "autoApplyChaperoneToggle" },
+ false },
BoolSettingValue{ BoolSetting::AUDIO_pttEnabled,
SettingCategory::Audio,
QtInfo{ "pttEnabled" },
@@ -433,6 +437,10 @@ private:
SettingCategory::Playspace,
QtInfo{ "flingStrength" },
1.0 },
+ DoubleSettingValue{ DoubleSetting::PLAYSPACE_dragMult,
+ SettingCategory::Playspace,
+ QtInfo{ "dragMult" },
+ 1.0 },
DoubleSettingValue{ DoubleSetting::VIDEO_brightnessOpacityValue,
SettingCategory::Video,
@@ -515,6 +523,7 @@ private:
= static_cast( StringSetting::LAST_ENUMERATOR ) + 1;
constexpr static auto discordDefaultMuteKeybinding = "^>m";
constexpr static auto pressDefault = "F9";
+ constexpr static auto nameDefault = "«none»";
std::array m_stringSettings{
StringSettingValue{ StringSetting::KEYBOARDSHORTCUT_keyboardOne,
SettingCategory::KeyboardShortcut,
@@ -536,6 +545,10 @@ private:
SettingCategory::KeyboardShortcut,
QtInfo{ "keyPressSystem" },
pressDefault },
+ StringSettingValue{ StringSetting::APPLICATION_autoApplyChaperoneName,
+ SettingCategory::Application,
+ QtInfo{ "autoApplyChaperoneName" },
+ nameDefault },
};
constexpr static auto intSettingsSize
diff --git a/src/settings/settings.h b/src/settings/settings.h
index 95e9097..7014e69 100644
--- a/src/settings/settings.h
+++ b/src/settings/settings.h
@@ -33,6 +33,7 @@ enum class BoolSetting
APPLICATION_enableExclusiveInput,
APPLICATION_crashRecoveryDisabled2,
APPLICATION_openXRWorkAround,
+ APPLICATION_autoApplyChaperone,
AUDIO_pttEnabled,
AUDIO_pttShowNotification,
@@ -70,6 +71,7 @@ enum class DoubleSetting
PLAYSPACE_heightToggleOffset,
PLAYSPACE_gravityStrength,
PLAYSPACE_flingStrength,
+ PLAYSPACE_dragMult,
VIDEO_brightnessOpacityValue,
VIDEO_colorOverlayOpacity,
@@ -100,8 +102,11 @@ enum class StringSetting
KEYBOARDSHORTCUT_keyboardThree,
KEYBOARDSHORTCUT_keyPressMisc,
KEYBOARDSHORTCUT_keyPressSystem,
+
+ APPLICATION_autoApplyChaperoneName,
+
// LAST_ENUMERATOR must always be set to the last value
- LAST_ENUMERATOR = KEYBOARDSHORTCUT_keyPressSystem,
+ LAST_ENUMERATOR = APPLICATION_autoApplyChaperoneName,
};
enum class IntSetting
diff --git a/src/tabcontrollers/ChaperoneTabController.cpp b/src/tabcontrollers/ChaperoneTabController.cpp
index 229a450..200e385 100644
--- a/src/tabcontrollers/ChaperoneTabController.cpp
+++ b/src/tabcontrollers/ChaperoneTabController.cpp
@@ -327,14 +327,11 @@ void ChaperoneTabController::eventLoopTick(
}
else
{
- // attempts to reload chaperone data once per ~5 seconds.
- // TODO still need to figure out a proper way to handle this
- // failure.
+ // attempts to reload chaperone data once per ~10 seconds.
m_updateTicksChaperoneReload++;
- if ( m_updateTicksChaperoneReload >= 500 )
+ if ( m_updateTicksChaperoneReload >= 1000 )
{
m_updateTicksChaperoneReload = 0;
- LOG( WARNING ) << "Attempting to reload chaperone data";
parent->chaperoneUtils().loadChaperoneData();
}
}
diff --git a/src/tabcontrollers/ChaperoneTabController.h b/src/tabcontrollers/ChaperoneTabController.h
index 6b4235e..10abc70 100644
--- a/src/tabcontrollers/ChaperoneTabController.h
+++ b/src/tabcontrollers/ChaperoneTabController.h
@@ -408,6 +408,7 @@ public:
int chaperoneColorB();
int chaperoneColorA();
float boundsVisibility();
+ int getChaperoneProfileIndex();
bool centerMarkerNew();
bool m_centerMarkerOverlayNeedsUpdate = false;
diff --git a/src/tabcontrollers/MoveCenterTabController.cpp b/src/tabcontrollers/MoveCenterTabController.cpp
index 91428fc..41edf26 100644
--- a/src/tabcontrollers/MoveCenterTabController.cpp
+++ b/src/tabcontrollers/MoveCenterTabController.cpp
@@ -705,6 +705,28 @@ void MoveCenterTabController::setFlingStrength( float value, bool notify )
}
}
+float MoveCenterTabController::dragMult() const
+{
+ return static_cast(
+ settings::getSetting( settings::DoubleSetting::PLAYSPACE_dragMult ) );
+}
+
+void MoveCenterTabController::setDragMult( float value, bool notify )
+{
+ double valuesubmit = static_cast( value );
+ if ( value > 20.0f )
+ {
+ valuesubmit = 20.0;
+ }
+ settings::setSetting( settings::DoubleSetting::PLAYSPACE_dragMult,
+ static_cast( valuesubmit ) );
+
+ if ( notify )
+ {
+ emit dragMultChanged( value );
+ }
+}
+
bool MoveCenterTabController::gravityActive() const
{
return m_gravityActive;
@@ -879,48 +901,6 @@ bool MoveCenterTabController::isInitComplete() const
return m_initComplete;
}
-bool MoveCenterTabController::enableSeatedMotion() const
-{
- return settings::getSetting(
- settings::BoolSetting::PLAYSPACE_enableSeatedMotion );
-}
-
-void MoveCenterTabController::setEnableSeatedMotion( bool value, bool notify )
-{
- settings::setSetting( settings::BoolSetting::PLAYSPACE_enableSeatedMotion,
- value );
-
- if ( notify )
- {
- emit enableUncalMotionChanged( value );
- }
-}
-
-bool MoveCenterTabController::enableUncalMotion() const
-{
- return settings::getSetting(
- settings::BoolSetting::PLAYSPACE_enableUncalMotion );
-}
-
-void MoveCenterTabController::setEnableUncalMotion( bool value, bool notify )
-{
- if ( !value && m_initComplete )
- {
- reset();
- }
- settings::setSetting( settings::BoolSetting::PLAYSPACE_enableUncalMotion,
- value );
- if ( !value && m_initComplete )
- {
- m_pendingZeroOffsets = true;
- }
-
- if ( notify )
- {
- emit enableUncalMotionChanged( value );
- }
-}
-
bool MoveCenterTabController::simpleRecenter() const
{
return settings::getSetting(
@@ -982,26 +962,23 @@ void MoveCenterTabController::shutdown()
void MoveCenterTabController::incomingSeatedReset()
{
- if ( enableSeatedMotion() )
+ // if we didn't send the request from OVRAS, we need to send another
+ // ResetSeatedZeroPose(). It seems that only after this is sent from
+ // OVRAS does ReloadFromDisk return valid info on WMR.
+ if ( !m_selfRequestedSeatedRecenter && !simpleRecenter() )
{
- // if we didn't send the request from OVRAS, we need to send another
- // ResetSeatedZeroPose(). It seems that only after this is sent from
- // OVRAS does ReloadFromDisk return valid info on WMR.
- if ( !m_selfRequestedSeatedRecenter && !simpleRecenter() )
- {
- m_selfRequestedSeatedRecenter = true;
- vr::VRSystem()->ResetSeatedZeroPose();
- }
- else
- {
- updateSeatedResetData();
- }
+ m_selfRequestedSeatedRecenter = true;
+ vr::VRSystem()->ResetSeatedZeroPose();
+ }
+ else
+ {
+ updateSeatedResetData();
}
}
void MoveCenterTabController::reset()
{
- if ( !m_chaperoneBasisAcquired && !enableUncalMotion() )
+ if ( !m_chaperoneBasisAcquired )
{
LOG( WARNING ) << "WARNING: Attempted reset offsets before chaperone "
"basis is acquired!";
@@ -1039,8 +1016,8 @@ void MoveCenterTabController::reset()
if ( m_trackingUniverse == vr::TrackingUniverseSeated )
{
vr::HmdMatrix34_t temp;
- // This is not the floor it should be ~ chair height... this seems
- // to be intended behaviour from openvr
+ // This is not the floor it should be ~ chair height... this
+ // seems to be intended behaviour from openvr
vr::VRChaperoneSetup()->GetWorkingSeatedZeroPoseToRawTrackingPose(
&temp );
m_offsetmatrix.m[1][3] = temp.m[1][3];
@@ -1083,13 +1060,14 @@ void MoveCenterTabController::zeroOffsets()
<< currentCenterXyz[0] << " )";
LOG( INFO ) << "GetWorkingStandingZeroPoseToRawTrackingPose";
outputLogHmdMatrix( currentCenter );
- // if reset happens before init is complete we set the universe center
- // to the raw tracking zero point
+ // if reset happens before init is complete we set the universe
+ // center to the raw tracking zero point
reset();
if ( !m_chaperoneBasisAcquired )
{
LOG( WARNING )
- << "<[!]><[!]>EXECUTED RESET BEFORE BASIS ACQUIRED<[!]><[!]> "
+ << "<[!]><[!]>EXECUTED RESET BEFORE BASIS "
+ "ACQUIRED<[!]><[!]> "
"Setting universe center to raw tracking zero point.";
}
else
@@ -1103,13 +1081,14 @@ void MoveCenterTabController::zeroOffsets()
<< currentCenterXyz[1] << " )";
LOG( INFO ) << "GetWorkingStandingZeroPoseToRawTrackingPose";
outputLogHmdMatrix( currentCenter );
- // if reset happens before init is complete we set the universe center
- // to the raw tracking zero point
+ // if reset happens before init is complete we set the universe
+ // center to the raw tracking zero point
reset();
if ( !m_chaperoneBasisAcquired )
{
LOG( WARNING )
- << "<[!]><[!]>EXECUTED RESET BEFORE BASIS ACQUIRED<[!]><[!]> "
+ << "<[!]><[!]>EXECUTED RESET BEFORE BASIS "
+ "ACQUIRED<[!]><[!]> "
"Setting universe center to raw tracking zero point.";
}
else
@@ -1129,7 +1108,8 @@ void MoveCenterTabController::zeroOffsets()
if ( !m_chaperoneBasisAcquired )
{
LOG( WARNING )
- << "<[!]><[!]>EXECUTED RESET BEFORE BASIS ACQUIRED<[!]><[!]> "
+ << "<[!]><[!]>EXECUTED RESET BEFORE BASIS "
+ "ACQUIRED<[!]><[!]> "
"Setting universe center to raw tracking zero point.";
}
else
@@ -1138,10 +1118,10 @@ void MoveCenterTabController::zeroOffsets()
}
}
- // finished checking if out of bounds, proceed with normal zeroing offsets
+ // finished checking if out of bounds, proceed with normal zeroing
+ // offsets
if ( vr::VRChaperone()->GetCalibrationState()
- == vr::ChaperoneCalibrationState_OK
- || enableUncalMotion() )
+ == vr::ChaperoneCalibrationState_OK )
{
m_oldOffsetX = 0.0f;
m_oldOffsetY = 0.0f;
@@ -1157,7 +1137,7 @@ void MoveCenterTabController::zeroOffsets()
emit rotationChanged( m_rotation );
updateChaperoneResetData();
m_pendingZeroOffsets = false;
- if ( !m_chaperoneBasisAcquired && !enableUncalMotion() )
+ if ( !m_chaperoneBasisAcquired )
{
m_chaperoneBasisAcquired = true;
if ( !m_initComplete )
@@ -1179,13 +1159,14 @@ void MoveCenterTabController::zeroOffsets()
{
parent->m_chaperoneTabController
.applyAutosavedProfile();
- LOG( INFO )
- << "Applying last good chaperone profile autosave";
+ LOG( INFO ) << "Applying last good chaperone "
+ "profile autosave";
}
}
- // Now mark previous shutdown as unsafe in case we crash some
- // time during this session. Previous shutdown will be marked as
- // being safe once more just before our app shuts down properly.
+ // Now mark previous shutdown as unsafe in case we crash
+ // some time during this session. Previous shutdown will be
+ // marked as being safe once more just before our app shuts
+ // down properly.
parent->setPreviousShutdownSafe( false );
}
}
@@ -1199,6 +1180,7 @@ void MoveCenterTabController::zeroOffsets()
}
else
{
+ LOG( WARNING ) << "Chaperone not calibrated?";
if ( !m_pendingZeroOffsets )
{
LOG( INFO ) << "PENDING: Chaperone Data Update and Offsets zeroing";
@@ -1253,10 +1235,11 @@ void MoveCenterTabController::updateSeatedResetData()
emit offsetZChanged( m_offsetZ );
emit rotationChanged( m_rotation );
vr::VRChaperoneSetup()->ReloadFromDisk( vr::EChaperoneConfigFile_Live );
- // done with this recenter, so set self request back to false for next time.
+ // done with this recenter, so set self request back to false for next
+ // time.
m_selfRequestedSeatedRecenter = false;
- // set pending update here, will be processed on next instance of motion or
- // running the reset() function.
+ // set pending update here, will be processed on next instance of motion
+ // or running the reset() function.
m_pendingSeatedRecenter = true;
}
@@ -1297,8 +1280,8 @@ void MoveCenterTabController::updateCollisionBoundsForOffset()
= std::atan2( m_universeCenterForReset.m[0][2],
m_universeCenterForReset.m[2][2] );
- // we want to store m_collisionBoundsForOffset as spacially relative to
- // m_universeCenterForReset, so:
+ // we want to store m_collisionBoundsForOffset as spacially relative
+ // to m_universeCenterForReset, so:
// for every quad in the chaperone bounds...
for ( unsigned quad = 0; quad < m_collisionBoundsCountForReset; quad++ )
@@ -1668,14 +1651,14 @@ void MoveCenterTabController::swapSpaceDragToLeftHandOverride(
}
}
m_swapDragToLeftHandPressed = swapDragToLeftHand;
- // we only set activated flag when the swap was successfull, but we always
- // deactivate when swap action isn't pressed.
+ // we only set activated flag when the swap was successfull, but we
+ // always deactivate when swap action isn't pressed.
if ( !swapDragToLeftHand )
{
m_swapDragToLeftHandActivated = false;
}
- // deactivate turning even when not detecting a new press as long as a swap
- // is successfully activated now
+ // deactivate turning even when not detecting a new press as long as a
+ // swap is successfully activated now
if ( m_swapDragToLeftHandActivated )
{
m_activeTurnHand = vr::TrackedControllerRole_Invalid;
@@ -1748,14 +1731,14 @@ void MoveCenterTabController::swapSpaceDragToRightHandOverride(
m_swapDragToRightHandPressed = swapDragToRightHand;
- // we only set activated flag when the swap was successfull, but we always
- // deactivate when swap action isn't pressed.
+ // we only set activated flag when the swap was successfull, but we
+ // always deactivate when swap action isn't pressed.
if ( !swapDragToRightHand )
{
m_swapDragToRightHandActivated = false;
}
- // deactivate turning even when not detecting a new press as long as a swap
- // is successfully activated now
+ // deactivate turning even when not detecting a new press as long as a
+ // swap is successfully activated now
if ( m_swapDragToRightHandActivated )
{
m_activeTurnHand = vr::TrackedControllerRole_Invalid;
@@ -1764,7 +1747,7 @@ void MoveCenterTabController::swapSpaceDragToRightHandOverride(
// END of drag bindings
-// START of turn bindgins
+// START of turn bindings
void MoveCenterTabController::leftHandSpaceTurn( bool leftHandTurnActive )
{
@@ -2045,9 +2028,9 @@ void MoveCenterTabController::smoothTurnLeft( bool smoothTurnLeftActive )
return;
}
- // Activates every tick. smoothTurnRate() effectively becomes a percentage
- // of a degree per tick. A setting of 100 would equal 90 degrees/sec or 15
- // RPM with a framerate of 90fps
+ // Activates every tick. smoothTurnRate() effectively becomes a
+ // percentage of a degree per tick. A setting of 100 would equal 90
+ // degrees/sec or 15 RPM with a framerate of 90fps
int newRotationAngleDeg = m_rotation - smoothTurnRate();
// Keep angle within -18000 ~ 18000 centidegrees
if ( newRotationAngleDeg > 18000 )
@@ -2069,9 +2052,9 @@ void MoveCenterTabController::smoothTurnRight( bool smoothTurnRightActive )
return;
}
- // Activates every tick. smoothTurnRate() effectively becomes a percentage
- // of a degree per tick. A setting of 100 would equal 90 degrees/sec or 15
- // RPM with a framerate of 90fps
+ // Activates every tick. smoothTurnRate() effectively becomes a
+ // percentage of a degree per tick. A setting of 100 would equal 90
+ // degrees/sec or 15 RPM with a framerate of 90fps
int newRotationAngleDeg = m_rotation + smoothTurnRate();
// Keep angle within -18000 ~ 18000 centidegrees
if ( newRotationAngleDeg > 18000 )
@@ -2157,8 +2140,8 @@ void MoveCenterTabController::saveUncommittedChaperone()
}
}
-// NOTE this function will create bad output if User Rotates 180 Degrees in 1/7*
-// frame-rate. (Worst Case 30 fps = ~770 deg/s)
+// NOTE this function will create bad output if User Rotates 180 Degrees in
+// 1/7* frame-rate. (Worst Case 30 fps = ~770 deg/s)
void MoveCenterTabController::updateHmdRotationCounter(
vr::TrackedDevicePose_t hmdPose,
double angle )
@@ -2321,8 +2304,13 @@ void MoveCenterTabController::updateHandDrag(
// offset is un-rotated coordinates
- // prevent positional glitches from exceeding max openvr offset clamps.
- // We do this by detecting a drag larger than 100m in a single frame.
+ diff[0] = diff[0] * static_cast( dragMult() );
+ diff[1] = diff[1] * static_cast( dragMult() );
+ diff[2] = diff[2] * static_cast( dragMult() );
+
+ // prevent positional glitches from exceeding max openvr offset
+ // clamps. We do this by detecting a drag larger than 100m in a
+ // single frame.
if ( abs( diff[0] ) > 100.0 || abs( diff[1] ) > 100.0
|| abs( diff[2] ) > 100.0 )
{
@@ -2612,9 +2600,9 @@ void MoveCenterTabController::updateSpace( bool forceUpdate )
updateChaperoneResetData();
}
- // do a late on-demand setting of seated center basis when we need it for
- // motion. This gives the reload from disk a little more time to complete
- // before we apply the new seated basis.
+ // do a late on-demand setting of seated center basis when we need it
+ // for motion. This gives the reload from disk a little more time to
+ // complete before we apply the new seated basis.
if ( m_pendingSeatedRecenter )
{
vr::VRChaperoneSetup()->GetWorkingSeatedZeroPoseToRawTrackingPose(
@@ -2766,8 +2754,8 @@ void MoveCenterTabController::updateSpace( bool forceUpdate )
&offsetSeatedCenter );
}
- // As of SVR 1.13.1 The Chaperone will follow Universe Center NOT raw Center
- // as such this should be off by defualt.
+ // As of SVR 1.13.1 The Chaperone will follow Universe Center NOT raw
+ // Center as such this should be off by defualt.
if ( adjustChaperone() )
{
@@ -2794,14 +2782,15 @@ void MoveCenterTabController::updateSpace( bool forceUpdate )
= m_collisionBoundsForOffset[quad].vCorners[corner].v[2];
// cancel universe center's xyz offsets to each corner's
- // position and shift over by original center position so that
- // we are mirroring the offset as reflected about the original
- // origin
+ // position and shift over by original center position so
+ // that we are mirroring the offset as reflected about the
+ // original origin
updatedBounds[quad].vCorners[corner].v[0]
-= offsetUniverseCenter.m[0][3]
- offsetUniverseCenter.m[0][3];
//- m_universeCenterForReset.m[0][3];
- // but don't touch y=0 values to keep floor corners rooted down
+ // but don't touch y=0 values to keep floor corners rooted
+ // down
if ( updatedBounds[quad].vCorners[corner].v[1] != 0 )
{
updatedBounds[quad].vCorners[corner].v[1]
@@ -2932,8 +2921,8 @@ void MoveCenterTabController::updateSpace( bool forceUpdate )
m_chaperoneCommitted = false;
}
- // loadChaperoneData( false ), false so that we don't load live data, and
- // reference the working set instead.
+ // loadChaperoneData( false ), false so that we don't load live data,
+ // and reference the working set instead.
if ( m_collisionBoundsCountForReset > 0 )
{
parent->chaperoneUtils().loadChaperoneData( false );
@@ -2951,14 +2940,17 @@ void MoveCenterTabController::eventLoopTick(
{
// detect if room setup is running
- if ( universe == vr::TrackingUniverseRawAndUncalibrated )
+ if ( universe == vr::TrackingUniverseRawAndUncalibrated
+ && vr::VRApplications()->GetApplicationProcessId(
+ "openvr.tool.steamvr_room_setup" )
+ != 0 )
{
if ( !m_roomSetupModeDetected )
{
m_roomSetupModeDetected = true;
- // give up on any pending zero offsets so they aren't applied in the
- // middle of room setup.
+ // give up on any pending zero offsets so they aren't applied in
+ // the middle of room setup.
m_pendingZeroOffsets = false;
LOG( INFO ) << "room setup ENTRY detected";
@@ -2986,16 +2978,15 @@ void MoveCenterTabController::eventLoopTick(
LOG( INFO ) << "seated mode EXIT detected";
}
- // If we're trying to redifine the origin point, but can't becaues of bad
- // chaperone calibration, we keep trying and hold off on motion features
- // until we get ChaperoneCalibrationState_OK
+ // If we're trying to redifine the origin point, but can't becaues of
+ // bad chaperone calibration, we keep trying and hold off on motion
+ // features until we get ChaperoneCalibrationState_OK
- // if we were in room setup, but got this far in the loop, universe is no
- // longer raw mode and we detect room setup exit and zeroOffsets() to apply
- // new setup.
+ // if we were in room setup, but got this far in the loop, universe is
+ // no longer raw mode and we detect room setup exit and zeroOffsets() to
+ // apply new setup.
- if ( m_pendingZeroOffsets
- || ( m_roomSetupModeDetected && !enableUncalMotion() ) )
+ if ( m_pendingZeroOffsets || ( m_roomSetupModeDetected ) )
{
zeroOffsets();
// m_roomSetupModeDetected is set to false in zeroOffsets() if it's
@@ -3008,8 +2999,8 @@ void MoveCenterTabController::eventLoopTick(
// get current space rotation in radians
double angle = m_rotation * k_centidegreesToRadians;
- // hmd rotations stats counting doesn't need to be smooth, so we skip
- // some frames for performance
+ // hmd rotations stats counting doesn't need to be smooth, so we
+ // skip some frames for performance
if ( m_hmdRotationStatsUpdateCounter >= k_hmdRotationCounterUpdateRate )
{
// device pose index 0 is always the hmd
@@ -3021,26 +3012,20 @@ void MoveCenterTabController::eventLoopTick(
m_hmdRotationStatsUpdateCounter++;
}
- // stop everything before processing motion if we're in seated mode and
- // don't have seated motion enabled
- if ( m_seatedModeDetected && !enableSeatedMotion() )
- {
- return;
- }
-
// only update dynamic motion if the dash is closed
if ( !parent->isDashboardVisible() )
{
// detect new dash closed
if ( m_dashWasOpenPreviousFrame )
{
- // reset velocity time points on dash closed so we don't factor
- // in the time motion was paused during the open dash
+ // reset velocity time points on dash closed so we don't
+ // factor in the time motion was paused during the open dash
m_lastDragUpdateTimePoint = std::chrono::steady_clock::now();
m_lastGravityUpdateTimePoint = std::chrono::steady_clock::now();
}
- // force chaperone bounds visible if turn or drag settings require
+ // force chaperone bounds visible if turn or drag settings
+ // require
if ( dragBounds()
&& m_activeDragHand != vr::TrackedControllerRole_Invalid )
{
@@ -3058,9 +3043,9 @@ void MoveCenterTabController::eventLoopTick(
parent->m_chaperoneTabController.forceBounds() );
}
- // Smooth turn motion can cause sim-sickness so we check if the user
- // wants to skip frames to reduce vection. We use the factor squared
- // because of logarithmic human perception.
+ // Smooth turn motion can cause sim-sickness so we check if the
+ // user wants to skip frames to reduce vection. We use the
+ // factor squared because of logarithmic human perception.
if ( m_turnComfortFrameSkipCounter >= static_cast(
( turnComfortFactor() * turnComfortFactor() ) ) )
{
@@ -3072,9 +3057,9 @@ void MoveCenterTabController::eventLoopTick(
m_turnComfortFrameSkipCounter++;
}
- // Smooth drag motion can cause sim-sickness so we check if the user
- // wants to skip frames to reduce vection. We use the factor squared
- // because of logarithmic human perception.
+ // Smooth drag motion can cause sim-sickness so we check if the
+ // user wants to skip frames to reduce vection. We use the
+ // factor squared because of logarithmic human perception.
if ( m_dragComfortFrameSkipCounter >= static_cast(
( dragComfortFactor() * dragComfortFactor() ) ) )
{
diff --git a/src/tabcontrollers/MoveCenterTabController.h b/src/tabcontrollers/MoveCenterTabController.h
index 07a03c5..6255a03 100644
--- a/src/tabcontrollers/MoveCenterTabController.h
+++ b/src/tabcontrollers/MoveCenterTabController.h
@@ -135,12 +135,10 @@ class MoveCenterTabController : public QObject
Q_PROPERTY(
bool universeCenteredRotation READ universeCenteredRotation WRITE
setUniverseCenteredRotation NOTIFY universeCenteredRotationChanged )
- Q_PROPERTY( bool enableSeatedMotion READ enableSeatedMotion WRITE
- setEnableSeatedMotion NOTIFY enableSeatedMotionChanged )
Q_PROPERTY( bool simpleRecenter READ simpleRecenter WRITE setSimpleRecenter
NOTIFY simpleRecenterChanged )
- Q_PROPERTY( bool enableUncalMotion READ enableUncalMotion WRITE
- setEnableUncalMotion NOTIFY enableUncalMotionChanged )
+ Q_PROPERTY(
+ float dragMult READ dragMult WRITE setDragMult NOTIFY dragMultChanged )
private:
OverlayController* parent;
@@ -268,6 +266,7 @@ public:
float heightToggleOffset() const;
float gravityStrength() const;
float flingStrength() const;
+ float dragMult() const;
bool gravityActive() const;
bool momentumSave() const;
bool lockXToggle() const;
@@ -277,8 +276,6 @@ public:
bool allowExternalEdits() const;
bool oldStyleMotion() const;
bool universeCenteredRotation() const;
- bool enableSeatedMotion() const;
- bool enableUncalMotion() const;
bool simpleRecenter() const;
bool isInitComplete() const;
double getHmdYawTotal();
@@ -345,6 +342,7 @@ public slots:
void setHeightToggleOffset( float value, bool notify = true );
void setGravityStrength( float value, bool notify = true );
void setFlingStrength( float value, bool notify = true );
+ void setDragMult( float value, bool notify = true );
void setGravityActive( bool value, bool notify = true );
void setMomentumSave( bool value, bool notify = true );
@@ -359,8 +357,6 @@ public slots:
void setAllowExternalEdits( bool value, bool notify = true );
void setOldStyleMotion( bool value, bool notify = true );
void setUniverseCenteredRotation( bool value, bool notify = true );
- void setEnableSeatedMotion( bool value, bool notify = true );
- void setEnableUncalMotion( bool value, bool notify = true );
void setSimpleRecenter( bool value, bool notify = true );
void shutdown();
@@ -397,6 +393,7 @@ signals:
void heightToggleOffsetChanged( float value );
void gravityStrengthChanged( float value );
void flingStrengthChanged( float value );
+ void dragMultChanged( float value );
void gravityActiveChanged( bool value );
void momentumSaveChanged( bool value );
void requireLockXChanged( bool value );
@@ -406,9 +403,7 @@ signals:
void allowExternalEditsChanged( bool value );
void oldStyleMotionChanged( bool value );
void universeCenteredRotationChanged( bool value );
- void enableSeatedMotionChanged( bool value );
void simpleRecenterChanged( bool value );
- void enableUncalMotionChanged( bool value );
void offsetProfilesUpdated();
};
diff --git a/src/tabcontrollers/SteamVRTabController.cpp b/src/tabcontrollers/SteamVRTabController.cpp
index e51a0b9..907affa 100644
--- a/src/tabcontrollers/SteamVRTabController.cpp
+++ b/src/tabcontrollers/SteamVRTabController.cpp
@@ -3,6 +3,8 @@
#include "../overlaycontroller.h"
#include "../utils/update_rate.h"
+QT_USE_NAMESPACE
+
// application namespace
namespace advsettings
{
@@ -289,9 +291,14 @@ bool SteamVRTabController::cameraDashboard() const
return m_cameraDashboard;
}
+void SteamVRTabController::updateRXTXList()
+{
+ emit updateRXTX( true );
+}
+
void SteamVRTabController::searchRXTX()
{
- deviceList.clear();
+ m_deviceList.clear();
int hmdIndex = -1;
auto indexList = ovr_system_wrapper::getAllConnectedDevices( true );
m_dongleCountCur = 0;
@@ -303,8 +310,8 @@ void SteamVRTabController::searchRXTX()
hmdIndex = device;
continue;
}
- deviceList.push_back( DeviceInfo{ device } );
- GatherDeviceInfo( deviceList.back() );
+ m_deviceList.push_back( DeviceInfo{ device } );
+ GatherDeviceInfo( m_deviceList.back() );
}
if ( hmdIndex != -1 )
@@ -313,6 +320,7 @@ void SteamVRTabController::searchRXTX()
= ovr_system_wrapper::getStringTrackedProperty(
hmdIndex, vr::Prop_AllWirelessDongleDescriptions_String )
.second;
+ m_unparsedDongleString = QString::fromStdString( dongleList );
int count = 0;
if ( !dongleList.empty() )
{
@@ -326,9 +334,57 @@ void SteamVRTabController::searchRXTX()
}
}
m_dongleCountMax = count;
+ if ( static_cast( m_deviceList.size() ) < m_dongleCountMax )
+ {
+ auto DSNFullList = getDongleSerialList( dongleList );
+ for ( auto dSN : DSNFullList )
+ {
+ bool isPaired = false;
+ for ( auto pairedDev : m_deviceList )
+ {
+ if ( QString::fromStdString( pairedDev.conDongle ) == dSN )
+ {
+ isPaired = true;
+ break;
+ }
+ }
+ if ( isPaired )
+ {
+ continue;
+ }
+ m_deviceList.push_back( DeviceInfo{} );
+ AddUnPairedDevice( m_deviceList.back(), dSN.toStdString() );
+ // TODO create
+ }
+ }
}
return;
}
+
+void SteamVRTabController::AddUnPairedDevice( DeviceInfo& device,
+ std::string donSN )
+{
+ device.conDongle = donSN;
+ if ( donSN.find( "-RYB" ) != std::string::npos
+ || donSN.find( "-LYM" ) != std::string::npos )
+ {
+ device.dongleType = "Headset";
+ }
+ // TODO 1yx SN
+ else if ( std::regex_match( donSN, std::regex( "(.*)(-[0-9]YX)" ) ) )
+ {
+ device.dongleType = "Tundra Dongle";
+ }
+ else
+ {
+ device.dongleType = "Standard Dongle";
+ }
+ device.index = -1;
+ device.txName = "No Connection";
+ device.serialNumber = "n/a";
+ device.deviceName = "No Connection";
+}
+
void SteamVRTabController::GatherDeviceInfo( DeviceInfo& device )
{
std::string cd = ovr_system_wrapper::getStringTrackedProperty(
@@ -444,30 +500,132 @@ void SteamVRTabController::restartSteamVR()
Q_INVOKABLE unsigned SteamVRTabController::getRXTXCount()
{
- return static_cast( deviceList.size() );
+ return static_cast( m_deviceList.size() );
}
Q_INVOKABLE QString SteamVRTabController::getTXList( int i )
{
- return QString::fromStdString( deviceList[i].txName );
+ return QString::fromStdString( m_deviceList[i].txName );
}
Q_INVOKABLE QString SteamVRTabController::getDeviceName( int i )
{
- return QString::fromStdString( deviceList[i].deviceName );
+ return QString::fromStdString( m_deviceList[i].deviceName );
}
Q_INVOKABLE QString SteamVRTabController::getRXList( int i )
{
- return QString::fromStdString( deviceList[i].conDongle );
+ return QString::fromStdString( m_deviceList[i].conDongle );
}
Q_INVOKABLE QString SteamVRTabController::getDongleType( int i )
{
- return QString::fromStdString( deviceList[i].dongleType );
+ return QString::fromStdString( m_deviceList[i].dongleType );
}
Q_INVOKABLE QString SteamVRTabController::getDongleUsage()
{
return QString::fromStdString( std::to_string( m_dongleCountCur ) + "/"
+ std::to_string( m_dongleCountMax ) );
}
+Q_INVOKABLE void SteamVRTabController::pairDevice( QString sn )
+{
+ if ( !isSteamVRTracked( sn ) )
+ {
+ LOG( WARNING ) << sn.toStdString()
+ << " Is Not a SteamVR Dongle, skipping Pair";
+ return;
+ }
+ m_last_pair_sn = sn;
+ auto req = QNetworkRequest();
+ req.setUrl( QUrl( "ws://127.0.0.1:27062" ) );
+ req.setRawHeader(
+ QByteArray( "Referer" ),
+ QByteArray(
+ "http://localhost:27062/lighthouse/webinterface/pairing.html" ) );
+ m_webSocket.open( req );
+ connect( &m_webSocket,
+ &QWebSocket::connected,
+ this,
+ &SteamVRTabController::onConnected );
+ connect( &m_webSocket,
+ &QWebSocket::disconnected,
+ this,
+ &SteamVRTabController::onDisconnect );
+ connect( &m_webSocket,
+ &QWebSocket::textMessageReceived,
+ this,
+ &SteamVRTabController::onMsgRec );
+ return;
+}
+bool SteamVRTabController::isSteamVRTracked( QString sn )
+{
+ return m_unparsedDongleString.contains( sn );
+}
+void SteamVRTabController::onConnected()
+{
+ m_webSocket.sendTextMessage( QStringLiteral( "mailbox_open OVRAS_pair" ) );
+ QString messageout = "mailbox_send lighthouse_pairing "
+ "{\"type\":\"start_pairing\", "
+ "\"returnAddress\":\"OVRAS_pair\", "
+ "\"serial\":\"";
+ messageout.append( m_last_pair_sn );
+ messageout.append( QString::fromStdString( "\", \"timeoutSeconds\":15}" ) );
+ emit pairStatusChanged( QString( "Pairing..." ) );
+ if ( m_last_pair_sn == "" )
+ {
+ LOG( ERROR ) << "No Last SN to pair, this shouldn't happen";
+ }
+ m_webSocket.sendTextMessage( messageout );
+ // m_webSocket.close();
+}
+void SteamVRTabController::onDisconnect()
+{
+ LOG( INFO ) << "Pair WS disconnect";
+ m_webSocket.close();
+}
+void SteamVRTabController::onMsgRec( QString Msg )
+{
+ if ( Msg.contains( "success" ) )
+ {
+ LOG( INFO ) << "Pair Success";
+ emit pairStatusChanged( QString( "Success" ) );
+ }
+ if ( Msg.contains( "timeout" ) )
+ {
+ LOG( INFO ) << "Pair Timeout";
+ emit pairStatusChanged( QString( "Timeout" ) );
+ }
+ m_webSocket.close();
+}
+std::vector
+ SteamVRTabController::getDongleSerialList( std::string deviceString )
+{
+ std::vector dongleList;
+ size_t pos = 0;
+
+ while ( ( pos = deviceString.find( ',' ) ) != std::string::npos )
+ {
+ dongleList.push_back(
+ QString::fromStdString( deviceString.substr( 0, pos ) ) );
+ pos = deviceString.find( ';' );
+ if ( pos != std::string::npos )
+ {
+ deviceString.erase( 0, pos + 1 );
+ continue;
+ }
+ else
+ {
+ pos = deviceString.find( ',' );
+ if ( pos == std::string::npos )
+ {
+ break;
+ }
+ dongleList.push_back(
+ QString::fromStdString( deviceString.substr( 0, pos ) ) );
+ break;
+ }
+ break;
+ }
+ return dongleList;
+}
+
} // namespace advsettings
diff --git a/src/tabcontrollers/SteamVRTabController.h b/src/tabcontrollers/SteamVRTabController.h
index 0de08b3..55e0f06 100644
--- a/src/tabcontrollers/SteamVRTabController.h
+++ b/src/tabcontrollers/SteamVRTabController.h
@@ -11,12 +11,16 @@
#include
#include "../openvr/ovr_system_wrapper.h"
#include
+#include
+#include
+#include
class QQuickWindow;
// application namespace
namespace advsettings
{
// forward declaration
+
class OverlayController;
struct DeviceInfo
@@ -71,11 +75,16 @@ private:
bool m_pathRXTXInit = false;
int m_dongleCountCur = 0;
int m_dongleCountMax = 0;
+ QString m_unparsedDongleString = "";
+ QString m_last_pair_sn = "";
- std::vector deviceList;
+ std::vector m_deviceList;
void GatherDeviceInfo( DeviceInfo& device );
+ void AddUnPairedDevice( DeviceInfo& device, std::string donSN );
void synchSteamVR();
+ std::vector getDongleSerialList( std::string deviceString );
+ bool isSteamVRTracked( QString sn );
public:
void initStage1();
@@ -94,6 +103,8 @@ public:
bool cameraBounds() const;
bool cameraRoom() const;
bool cameraDashboard() const;
+ QNetworkProxy m_proxy;
+ QWebSocket m_webSocket;
Q_INVOKABLE void searchRXTX();
@@ -105,9 +116,13 @@ public:
Q_INVOKABLE QString getDeviceName( int i );
Q_INVOKABLE QString getDongleType( int i );
Q_INVOKABLE QString getDongleUsage();
+ Q_INVOKABLE void pairDevice( QString sn );
+ Q_INVOKABLE void updateRXTXList();
public slots:
-
+ void onConnected();
+ void onDisconnect();
+ void onMsgRec( QString Msg );
void setPerformanceGraph( bool value, bool notify = true );
void setSystemButton( bool value, bool notify = true );
void setNoFadeToGrid( bool value, bool notify = true );
@@ -133,6 +148,9 @@ signals:
void cameraBoundsChanged( bool value );
void cameraRoomChanged( bool value );
void cameraDashboardChanged( bool value );
+
+ void pairStatusChanged( QString value );
+ void updateRXTX( bool value );
};
} // namespace advsettings
diff --git a/src/tabcontrollers/UtilitiesTabController.cpp b/src/tabcontrollers/UtilitiesTabController.cpp
index 439d68b..df54953 100644
--- a/src/tabcontrollers/UtilitiesTabController.cpp
+++ b/src/tabcontrollers/UtilitiesTabController.cpp
@@ -224,7 +224,8 @@ QString getBatteryIconPath( int batteryState )
return QString::fromStdString( *batteryPath );
}
-vr::VROverlayHandle_t createBatteryOverlay( vr::TrackedDeviceIndex_t index )
+vr::VROverlayHandle_t createBatteryOverlay( vr::TrackedDeviceIndex_t index,
+ unsigned style = 0 )
{
vr::VROverlayHandle_t handle = vr::k_ulOverlayHandleInvalid;
std::string batteryKey = std::string( application_strings::applicationKey )
@@ -239,10 +240,19 @@ vr::VROverlayHandle_t createBatteryOverlay( vr::TrackedDeviceIndex_t index )
vr::VROverlay()->SetOverlayFromFile(
handle, batteryIconPath.toStdString().c_str() );
vr::VROverlay()->SetOverlayWidthInMeters( handle, 0.045f );
- vr::HmdMatrix34_t notificationTransform
- = { { { 1.0f, 0.0f, 0.0f, 0.00f },
- { 0.0f, -1.0f, 0.0f, 0.0081f },
- { 0.0f, 0.0f, -1.0f, -0.0178f } } };
+ vr::HmdMatrix34_t notificationTransform;
+ if ( style == 1 )
+ {
+ notificationTransform = { { { 1.0f, 0.0f, 0.0f, 0.00f },
+ { 0.0f, -1.0f, 0.0f, 0.0081f },
+ { 0.0f, 0.0f, -1.0f, -0.028f } } };
+ }
+ else
+ {
+ notificationTransform = { { { 1.0f, 0.0f, 0.0f, 0.00f },
+ { 0.0f, -1.0f, 0.0f, 0.0081f },
+ { 0.0f, 0.0f, -1.0f, -0.0178f } } };
+ }
vr::VROverlay()->SetOverlayTransformTrackedDeviceRelative(
handle, index, ¬ificationTransform );
LOG( INFO ) << "Created battery overlay for device " << index;
@@ -283,8 +293,19 @@ void UtilitiesTabController::eventLoopTick()
{
if ( m_batteryOverlayHandles[i] == 0 )
{
+ auto type = ovr_system_wrapper::getStringTrackedProperty(
+ i, vr::Prop_RenderModelName_String );
+ unsigned style = 0;
+ if ( type.first == ovr_system_wrapper::SystemError::NoError )
+ {
+ if ( type.second.find( "tundra" ) != std::string::npos )
+ {
+ style = 1;
+ }
+ }
+
LOG( INFO ) << "Creating battery overlay for device " << i;
- m_batteryOverlayHandles[i] = createBatteryOverlay( i );
+ m_batteryOverlayHandles[i] = createBatteryOverlay( i, style );
m_batteryVisible[i] = true;
}
diff --git a/ver/versioncheck.json b/ver/versioncheck.json
index 9b61b47..f50072a 100644
--- a/ver/versioncheck.json
+++ b/ver/versioncheck.json
@@ -1 +1 @@
-{ "major": 5, "minor": 3, "patch": 2, "updateMessage": "", "optionalMessage": "" }
\ No newline at end of file
+{ "major": 5, "minor": 5, "patch": 0, "updateMessage": "", "optionalMessage": "" }
\ No newline at end of file