5.4.0 Raw Restriction Setting, Apply Offsets (#577)

* Crash Recovery Defaults to Off, add option to use space drag w/ uncalibrated playspace

* increment version 5.3.3

* Feat/apply offsets binding (#576)

* add apply offsets steamvr input

* add new binding to Readme

Co-authored-by: TheMrGong <gongora656@gmail.com>

* increment version 5.4.0

* added LH Console Interface class, WIP TX/RX list via lh console

* switch over to property based dongle information

* add ovr system wrapper

* add use of parameter to avoid warning as error

* openXR fix, and Change Display State of Chaperone Disabled

* update text

* format files

* clang 9.0.0 format

* add documentation update

* remove windows header include

* remove filesystem header

* fix uncal motion switching issue

Co-authored-by: TheMrGong <gongora656@gmail.com>
This commit is contained in:
ykeara
2022-02-23 16:06:03 -06:00
committed by GitHub
co-authored by TheMrGong
parent 522ba46ac6
commit eea713429d
24 changed files with 992 additions and 14 deletions
+42 -5
View File
@@ -892,7 +892,32 @@ void MoveCenterTabController::setEnableSeatedMotion( bool value, bool notify )
if ( notify )
{
emit enableSeatedMotionChanged( value );
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 );
}
}
@@ -976,7 +1001,7 @@ void MoveCenterTabController::incomingSeatedReset()
void MoveCenterTabController::reset()
{
if ( !m_chaperoneBasisAcquired )
if ( !m_chaperoneBasisAcquired && !enableUncalMotion() )
{
LOG( WARNING ) << "WARNING: Attempted reset offsets before chaperone "
"basis is acquired!";
@@ -1115,7 +1140,8 @@ void MoveCenterTabController::zeroOffsets()
// finished checking if out of bounds, proceed with normal zeroing offsets
if ( vr::VRChaperone()->GetCalibrationState()
== vr::ChaperoneCalibrationState_OK )
== vr::ChaperoneCalibrationState_OK
|| enableUncalMotion() )
{
m_oldOffsetX = 0.0f;
m_oldOffsetY = 0.0f;
@@ -1131,7 +1157,7 @@ void MoveCenterTabController::zeroOffsets()
emit rotationChanged( m_rotation );
updateChaperoneResetData();
m_pendingZeroOffsets = false;
if ( !m_chaperoneBasisAcquired )
if ( !m_chaperoneBasisAcquired && !enableUncalMotion() )
{
m_chaperoneBasisAcquired = true;
if ( !m_initComplete )
@@ -1962,6 +1988,14 @@ void MoveCenterTabController::resetOffsets( bool resetOffsetsJustPressed )
}
}
void MoveCenterTabController::applyOffsets( bool applyOffsetsJustPressed )
{
if ( applyOffsetsJustPressed )
{
zeroOffsets();
}
}
void MoveCenterTabController::snapTurnLeft( bool snapTurnLeftJustPressed )
{
if ( !snapTurnLeftJustPressed )
@@ -2933,6 +2967,7 @@ void MoveCenterTabController::eventLoopTick(
vr::VRChaperoneSetup()->RevertWorkingCopy();
}
setTrackingUniverse( int( universe ) );
// TODO set to allow.
return;
}
@@ -2958,7 +2993,9 @@ void MoveCenterTabController::eventLoopTick(
// 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 )
if ( m_pendingZeroOffsets
|| ( m_roomSetupModeDetected && !enableUncalMotion() ) )
{
zeroOffsets();
// m_roomSetupModeDetected is set to false in zeroOffsets() if it's