Spacedragupdate (#663)
* add delay if interface not found * adjust initialization behavior * pushed for debugging reasons for concerned parties * comment out simple recenter * remove old style motion, some minor optimizations * optimize default case check * optimized default condition * change manifest install behavior to trigger on desktop mode as well * add desktop mode binding launch * add tracker overlay option to utils * commit to check status * attempt to fix native LH issues with chaperone when exiting * add desktop mode toggle and some cleanup * remove adjust chaperone * remove clang format from ci, increment version, cleanup * update circle ci * fix conversion warning * add F13-19 to keyboard parser * add additional logging around failure to initialize * add unsaved changes * update version 5.8.1 * fix some collisions in enum declaration * add controller powers on steamvr, and no HMD to steamvr tab, increment version * slightly alter drag movement, fix qml issue * code cleanup * fix logspam/attempt to delete non existant overlays * increment version 5.8.3 * add zero-offset to true as potential edge case fix * remove dead code in qml * fix both brightness sliders to be uniform .05 minimum via set, and .2 minimum via slider * attempt to fix recenter, and fix floor * further space drag/recenter improvements * get rid of old code * increment version 5.8.6 * remove old commented code settings page * update documentation * re-add mistakenly removed line * attempt at fixing reset etc. etc. * incrment verison * fix brightness slider min at 3 or 20 depending if slide or direct input add error recovery from bad cal state on recenter and reset offsets * update version 5.8.8 * fix room-setup bug on startup if using auto apply chaperone * incrmenet version 5.8.9
This commit is contained in:
@@ -1 +1 @@
|
|||||||
5.8.6-release
|
5.8.9-release
|
||||||
|
|||||||
+23
-37
@@ -526,22 +526,15 @@ void OverlayController::SetWidget( QQuickItem* quickItem,
|
|||||||
autoApplyChaperoneName() );
|
autoApplyChaperoneName() );
|
||||||
if ( chapindex.first )
|
if ( chapindex.first )
|
||||||
{
|
{
|
||||||
|
LOG( INFO ) << "Auto Applying Chaperone";
|
||||||
m_chaperoneTabController.applyChaperoneProfile( chapindex.second );
|
m_chaperoneTabController.applyChaperoneProfile( chapindex.second );
|
||||||
bool success = vr::VRApplications()->CancelApplicationLaunch(
|
// This should be the way to stop room-setup from starting... as it
|
||||||
"openvr.tool.steamvr_room_setup" );
|
// sends steamvr a signal that it is completed
|
||||||
auto successsstr = success ? "true" : "false";
|
vr::VRChaperoneSetup()->CommitWorkingCopy(
|
||||||
|
vr::EChaperoneConfigFile_Live );
|
||||||
LOG( INFO ) << "Attempted to stop roomsetup: " << successsstr;
|
return;
|
||||||
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" );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
LOG( WARNING ) << "Profile Not Found for Auto Apply Chaperone!";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1248,41 +1241,28 @@ void OverlayController::mainEventLoop()
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case vr::VREvent_SeatedZeroPoseReset:
|
case vr::VREvent_SeatedZeroPoseReset:
|
||||||
{
|
|
||||||
m_incomingReset = true;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case vr::VREvent_StandingZeroPoseReset:
|
case vr::VREvent_StandingZeroPoseReset:
|
||||||
{
|
{
|
||||||
m_incomingReset = true;
|
m_incomingReset = true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// Multiple ChaperoneUniverseHasChanged are often emitted at the
|
// Multiple ChaperoneUniverseHasChanged are often
|
||||||
// same time (some with a little bit of delay) There is no sure way
|
// emitted at the same time (some with a little bit of
|
||||||
// to recognize redundant events, we can only exclude redundant
|
// delay) There is no sure way to recognize redundant
|
||||||
// events during the same call of OnTimeoutPumpEvents() INFO Removed
|
// events, we can only exclude redundant events during
|
||||||
// logging on play space mover for possible crashing issues.
|
// the same call of OnTimeoutPumpEvents() INFO Removed
|
||||||
|
// logging on play space mover for possible crashing
|
||||||
|
// issues.
|
||||||
case vr::VREvent_ChaperoneUniverseHasChanged:
|
case vr::VREvent_ChaperoneUniverseHasChanged:
|
||||||
{
|
{
|
||||||
uint64_t previousUniverseId
|
uint64_t previousUniverseId
|
||||||
= vrEvent.data.chaperone.m_nPreviousUniverse;
|
= vrEvent.data.chaperone.m_nPreviousUniverse;
|
||||||
uint64_t currentUniverseId
|
uint64_t currentUniverseId
|
||||||
= vrEvent.data.chaperone.m_nCurrentUniverse;
|
= vrEvent.data.chaperone.m_nCurrentUniverse;
|
||||||
LOG( INFO ) << "(VREvent) ChaperoneUniverseHasChanged... Previous:"
|
LOG( INFO )
|
||||||
<< previousUniverseId
|
<< "(VREvent) ChaperoneUniverseHasChanged... Previous : "
|
||||||
<< " Current:" << currentUniverseId;
|
<< previousUniverseId << " Current:" << currentUniverseId;
|
||||||
|
|
||||||
if ( !chaperoneDataAlreadyUpdated )
|
|
||||||
{
|
|
||||||
m_chaperoneUtils.loadChaperoneData();
|
|
||||||
chaperoneDataAlreadyUpdated = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case vr::VREvent_ChaperoneDataHasChanged:
|
|
||||||
{
|
|
||||||
if ( !chaperoneDataAlreadyUpdated )
|
if ( !chaperoneDataAlreadyUpdated )
|
||||||
{
|
{
|
||||||
m_chaperoneUtils.loadChaperoneData();
|
m_chaperoneUtils.loadChaperoneData();
|
||||||
@@ -1303,6 +1283,12 @@ void OverlayController::mainEventLoop()
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if ( m_incomingReset )
|
||||||
|
{
|
||||||
|
m_incomingReset = false;
|
||||||
|
LOG( INFO ) << "Reset zero event recorded";
|
||||||
|
m_moveCenterTabController.incomingZeroReset();
|
||||||
|
}
|
||||||
|
|
||||||
if ( m_incomingReset )
|
if ( m_incomingReset )
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -167,6 +167,7 @@ public: // I know it's an ugly hack to make them public to enable external
|
|||||||
UtilitiesTabController m_utilitiesTabController;
|
UtilitiesTabController m_utilitiesTabController;
|
||||||
VideoTabController m_videoTabController;
|
VideoTabController m_videoTabController;
|
||||||
RotationTabController m_rotationTabController;
|
RotationTabController m_rotationTabController;
|
||||||
|
bool m_incomingReset = false;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QPoint getMousePositionForEvent( vr::VREvent_Mouse_t mouse );
|
QPoint getMousePositionForEvent( vr::VREvent_Mouse_t mouse );
|
||||||
|
|||||||
@@ -488,7 +488,7 @@ MyStackViewPage {
|
|||||||
id: spaceSeatedRecenter
|
id: spaceSeatedRecenter
|
||||||
Layout.preferredWidth: 250
|
Layout.preferredWidth: 250
|
||||||
visible: true
|
visible: true
|
||||||
text: "Seated Recenter"
|
text: "Re-center"
|
||||||
onClicked: {
|
onClicked: {
|
||||||
MoveCenterTabController.sendSeatedRecenter()
|
MoveCenterTabController.sendSeatedRecenter()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -57,9 +57,7 @@ GroupBox {
|
|||||||
value: 1.0
|
value: 1.0
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
onMoved: {
|
onMoved: {
|
||||||
var val = (this.value * 100)
|
VideoTabController.setBrightnessOpacityValue(this.value.toFixed(2), true)
|
||||||
brightnessValueText.text = Math.round(val) + "%"
|
|
||||||
VideoTabController.setBrightnessOpacityValue(value.toFixed(2), true)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -73,17 +71,13 @@ GroupBox {
|
|||||||
function onInputEvent(input) {
|
function onInputEvent(input) {
|
||||||
var val = parseFloat(input)
|
var val = parseFloat(input)
|
||||||
if (!isNaN(val)) {
|
if (!isNaN(val)) {
|
||||||
if (val < 5.0) {
|
if (val < 3) {
|
||||||
val = 5.0
|
val = 3
|
||||||
} else if (val > 100.0) {
|
} else if (val > 100.0) {
|
||||||
val = 100.0
|
val = 100.0
|
||||||
}
|
}
|
||||||
var v = (val/100)
|
var v = (val/100)
|
||||||
VideoTabController.setBrightnessOpacityValue(v.toFixed(2), true)
|
VideoTabController.setBrightnessOpacityValue(v.toFixed(2), true)
|
||||||
if(v<.05){
|
|
||||||
v = .05
|
|
||||||
}
|
|
||||||
brightnessSlider.value = v
|
|
||||||
}
|
}
|
||||||
text = Math.round(VideoTabController.brightnessOpacityValue * 100) + "%"
|
text = Math.round(VideoTabController.brightnessOpacityValue * 100) + "%"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -57,13 +57,8 @@ GroupBox {
|
|||||||
stepSize: 0.01
|
stepSize: 0.01
|
||||||
value: 1.0
|
value: 1.0
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
onPositionChanged: {
|
onMoved: {
|
||||||
var val = (this.value * 100)
|
VideoTabController.setBrightnessOpacityValue(this.value.toFixed(2), true)
|
||||||
brightnessValueText.text = Math.round(val) + "%"
|
|
||||||
}
|
|
||||||
onValueChanged: {
|
|
||||||
|
|
||||||
VideoTabController.setBrightnessOpacityValue(value.toFixed(2), true)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -77,13 +72,13 @@ GroupBox {
|
|||||||
function onInputEvent(input) {
|
function onInputEvent(input) {
|
||||||
var val2 = parseFloat(input)
|
var val2 = parseFloat(input)
|
||||||
if (!isNaN(val2)) {
|
if (!isNaN(val2)) {
|
||||||
if (val2 < 5) {
|
if (val2 < 3) {
|
||||||
val2 = 5
|
val2 = 3
|
||||||
} else if (val2 > 100.0) {
|
} else if (val2 > 100.0) {
|
||||||
val2 = 100.0
|
val2 = 100.0
|
||||||
}
|
}
|
||||||
var v2 = (val2/100).toFixed(2)
|
var v2 = (val2/100)
|
||||||
brightnessSlider.value = v
|
VideoTabController.setBrightnessOpacityValue(v2.toFixed(2), true)
|
||||||
}
|
}
|
||||||
text = Math.round(VideoTabController.brightnessOpacityValue * 100) + "%"
|
text = Math.round(VideoTabController.brightnessOpacityValue * 100) + "%"
|
||||||
}
|
}
|
||||||
@@ -304,7 +299,9 @@ GroupBox {
|
|||||||
target: VideoTabController
|
target: VideoTabController
|
||||||
|
|
||||||
onBrightnessOpacityValueChanged: {
|
onBrightnessOpacityValueChanged: {
|
||||||
brightnessSlider.value = VideoTabController.brightnessOpacityValue
|
var brightvalue = VideoTabController.brightnessOpacityValue
|
||||||
|
brightnessSlider.value = brightvalue
|
||||||
|
brightnessValueText.text = Math.round(brightvalue*100)+ "%"
|
||||||
}
|
}
|
||||||
onBrightnessEnabledChanged: {
|
onBrightnessEnabledChanged: {
|
||||||
brightnessToggle.checked = VideoTabController.brightnessEnabled
|
brightnessToggle.checked = VideoTabController.brightnessEnabled
|
||||||
|
|||||||
@@ -885,25 +885,57 @@ void MoveCenterTabController::shutdown()
|
|||||||
vr::VRChaperoneSetup()->RevertWorkingCopy();
|
vr::VRChaperoneSetup()->RevertWorkingCopy();
|
||||||
}
|
}
|
||||||
|
|
||||||
void MoveCenterTabController::incomingSeatedReset()
|
void MoveCenterTabController::incomingZeroReset()
|
||||||
{
|
{
|
||||||
// This really covers standing reset as well
|
// Calibration state is ultimately no longer a safety issue per discussions
|
||||||
updateChaperoneResetData();
|
// with valve (the warnings/error's dont' mean anything for out context)
|
||||||
if ( m_offsetY != 0 )
|
// However It does appear to effect the recenter method (potentially other
|
||||||
|
// aspects) IN mixed tracking environments I get this issue, the check if
|
||||||
|
// there is an error and apply autosaved profile is hopefully a workaround
|
||||||
|
auto calState = vr::VRChaperone()->GetCalibrationState();
|
||||||
|
LOG( INFO ) << "Calibration State on Zero Reset is: " << calState;
|
||||||
|
|
||||||
|
// If we detect a seated Recenter and are not currently in process
|
||||||
|
// we reload chaperone from disk
|
||||||
|
if ( m_recenterStages < 1 )
|
||||||
{
|
{
|
||||||
m_offsetY = -m_offsetY;
|
LOG( INFO ) << "Re-Center Stage 1, reload from disk";
|
||||||
updateSpace();
|
m_recenterStages++;
|
||||||
updateChaperoneResetData();
|
|
||||||
|
if ( calState > 199 && m_initComplete )
|
||||||
|
{
|
||||||
|
LOG( INFO ) << "Chaperone calibration state is error, attempting "
|
||||||
|
"to apply autosaved profile to fix issue";
|
||||||
|
parent->m_chaperoneTabController.applyAutosavedProfile();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Revert Working copy to "apply" the changes
|
||||||
|
vr::VRChaperoneSetup()->RevertWorkingCopy();
|
||||||
|
// Send a Re-center again so the changes stick on our end.
|
||||||
|
sendSeatedRecenter();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// We finalize the Recenter, by zero-ing offsets and setting new zero pos,
|
||||||
|
// and reseting our stage counter
|
||||||
|
if ( m_recenterStages == 1 )
|
||||||
|
{
|
||||||
|
LOG( INFO ) << "Recenter Stage 2 re-set zero pos, and reset offsets";
|
||||||
|
vr::VRChaperoneSetup()->GetWorkingStandingZeroPoseToRawTrackingPose(
|
||||||
|
&m_universeCenterForReset );
|
||||||
|
vr::VRChaperoneSetup()->GetWorkingSeatedZeroPoseToRawTrackingPose(
|
||||||
|
&m_seatedCenterForReset );
|
||||||
|
resetOffsets( true );
|
||||||
|
m_recenterStages = 0;
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
zeroOffsets();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void MoveCenterTabController::reset()
|
void MoveCenterTabController::reset()
|
||||||
{
|
{
|
||||||
// This is a weird hack for handling the reset properly don't ask me why
|
// DO NOT attempt to apply autosaved profile on reset, as it is triggered by
|
||||||
// reset plays better w/ a non 0 starting point
|
// the apply chaperone profile Side effects are bad!
|
||||||
m_offsetY = 0.01f;
|
auto calState = vr::VRChaperone()->GetCalibrationState();
|
||||||
updateSpace();
|
LOG( INFO ) << "Calibration State on Reset is: " << calState;
|
||||||
|
|
||||||
if ( !m_chaperoneBasisAcquired )
|
if ( !m_chaperoneBasisAcquired )
|
||||||
{
|
{
|
||||||
@@ -1069,6 +1101,9 @@ void MoveCenterTabController::zeroOffsets()
|
|||||||
// all init complete, safe to autosave chaperone profile
|
// all init complete, safe to autosave chaperone profile
|
||||||
parent->m_chaperoneTabController.createNewAutosaveProfile();
|
parent->m_chaperoneTabController.createNewAutosaveProfile();
|
||||||
m_initComplete = true;
|
m_initComplete = true;
|
||||||
|
auto calState = vr::VRChaperone()->GetCalibrationState();
|
||||||
|
LOG( INFO ) << "Calibration State after autosave profile is: "
|
||||||
|
<< calState;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -1129,32 +1164,15 @@ void MoveCenterTabController::clampVelocity( double* velocity )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MoveCenterTabController::updateSeatedResetData()
|
|
||||||
{
|
|
||||||
m_heightToggle = false;
|
|
||||||
emit heightToggleChanged( m_heightToggle );
|
|
||||||
|
|
||||||
m_oldOffsetX = m_oldOffsetY = m_oldOffsetZ = 0.0f;
|
|
||||||
m_oldRotation = m_rotation = 0;
|
|
||||||
m_offsetX = m_offsetY = m_offsetZ = 0.0f;
|
|
||||||
|
|
||||||
emit offsetXChanged( m_offsetX );
|
|
||||||
emit offsetYChanged( m_offsetY );
|
|
||||||
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.
|
|
||||||
}
|
|
||||||
|
|
||||||
void MoveCenterTabController::updateChaperoneResetData()
|
void MoveCenterTabController::updateChaperoneResetData()
|
||||||
{
|
{
|
||||||
vr::VRChaperoneSetup()->RevertWorkingCopy();
|
// TODO
|
||||||
|
// vr::VRChaperoneSetup()->RevertWorkingCopy();
|
||||||
unsigned currentQuadCount = 0;
|
unsigned currentQuadCount = 0;
|
||||||
vr::VRChaperoneSetup()->GetWorkingCollisionBoundsInfo( nullptr,
|
vr::VRChaperoneSetup()->GetWorkingCollisionBoundsInfo( nullptr,
|
||||||
¤tQuadCount );
|
¤tQuadCount );
|
||||||
m_collisionBoundsForReset = new vr::HmdQuad_t[currentQuadCount];
|
m_collisionBoundsForReset = new vr::HmdQuad_t[currentQuadCount];
|
||||||
m_collisionBoundsForOffset = new vr::HmdQuad_t[currentQuadCount];
|
// m_collisionBoundsForOffset = new vr::HmdQuad_t[currentQuadCount];
|
||||||
m_collisionBoundsCountForReset = currentQuadCount;
|
m_collisionBoundsCountForReset = currentQuadCount;
|
||||||
vr::VRChaperoneSetup()->GetWorkingCollisionBoundsInfo(
|
vr::VRChaperoneSetup()->GetWorkingCollisionBoundsInfo(
|
||||||
m_collisionBoundsForReset, ¤tQuadCount );
|
m_collisionBoundsForReset, ¤tQuadCount );
|
||||||
@@ -1164,7 +1182,7 @@ void MoveCenterTabController::updateChaperoneResetData()
|
|||||||
vr::VRChaperoneSetup()->GetWorkingSeatedZeroPoseToRawTrackingPose(
|
vr::VRChaperoneSetup()->GetWorkingSeatedZeroPoseToRawTrackingPose(
|
||||||
&m_seatedCenterForReset );
|
&m_seatedCenterForReset );
|
||||||
|
|
||||||
updateCollisionBoundsForOffset();
|
// updateCollisionBoundsForOffset();
|
||||||
parent->m_chaperoneTabController.updateHeight( getBoundsBasisMaxY() );
|
parent->m_chaperoneTabController.updateHeight( getBoundsBasisMaxY() );
|
||||||
|
|
||||||
// unsigned checkQuadCount = 0;
|
// unsigned checkQuadCount = 0;
|
||||||
@@ -1177,44 +1195,8 @@ void MoveCenterTabController::updateChaperoneResetData()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MoveCenterTabController::updateCollisionBoundsForOffset()
|
|
||||||
{
|
|
||||||
if ( m_collisionBoundsCountForReset > 0 )
|
|
||||||
{
|
|
||||||
float universeCenterForResetYaw
|
|
||||||
= 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:
|
|
||||||
|
|
||||||
// for every quad in the chaperone bounds...
|
|
||||||
for ( unsigned quad = 0; quad < m_collisionBoundsCountForReset; quad++ )
|
|
||||||
{
|
|
||||||
// at every corner in that quad...
|
|
||||||
for ( unsigned corner = 0; corner < 4; corner++ )
|
|
||||||
{
|
|
||||||
// copy from m_collisionBoundsForReset
|
|
||||||
m_collisionBoundsForOffset[quad].vCorners[corner].v[0]
|
|
||||||
= m_collisionBoundsForReset[quad].vCorners[corner].v[0];
|
|
||||||
m_collisionBoundsForOffset[quad].vCorners[corner].v[1]
|
|
||||||
= m_collisionBoundsForReset[quad].vCorners[corner].v[1];
|
|
||||||
m_collisionBoundsForOffset[quad].vCorners[corner].v[2]
|
|
||||||
= m_collisionBoundsForReset[quad].vCorners[corner].v[2];
|
|
||||||
|
|
||||||
// unrotate by universe center's yaw
|
|
||||||
rotateFloatCoordinates(
|
|
||||||
m_collisionBoundsForOffset[quad].vCorners[corner].v,
|
|
||||||
-universeCenterForResetYaw );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void MoveCenterTabController::applyChaperoneResetData()
|
void MoveCenterTabController::applyChaperoneResetData()
|
||||||
{
|
{
|
||||||
updateSpace( true );
|
|
||||||
vr::VRChaperoneSetup()->RevertWorkingCopy();
|
|
||||||
if ( m_collisionBoundsCountForReset > 0 )
|
if ( m_collisionBoundsCountForReset > 0 )
|
||||||
{
|
{
|
||||||
vr::VRChaperoneSetup()->SetWorkingCollisionBoundsInfo(
|
vr::VRChaperoneSetup()->SetWorkingCollisionBoundsInfo(
|
||||||
@@ -1250,7 +1232,7 @@ void MoveCenterTabController::setBoundsBasisHeight( float newHeight )
|
|||||||
m_collisionBoundsForReset[b].vCorners[3].v[1] = 0.0;
|
m_collisionBoundsForReset[b].vCorners[3].v[1] = 0.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
updateCollisionBoundsForOffset();
|
// updateCollisionBoundsForOffset();
|
||||||
updateSpace( true );
|
updateSpace( true );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1872,9 +1854,30 @@ void MoveCenterTabController::heightToggleAction( bool heightToggleJustPressed )
|
|||||||
|
|
||||||
void MoveCenterTabController::resetOffsets( bool resetOffsetsJustPressed )
|
void MoveCenterTabController::resetOffsets( bool resetOffsetsJustPressed )
|
||||||
{
|
{
|
||||||
|
// The fn is ran if bool is true, this function is called every pass because
|
||||||
|
// of keyboard input.
|
||||||
if ( resetOffsetsJustPressed )
|
if ( resetOffsetsJustPressed )
|
||||||
{
|
{
|
||||||
reset();
|
auto calState = vr::VRChaperone()->GetCalibrationState();
|
||||||
|
LOG( INFO ) << "Calibration State on Reset Offsets is: " << calState;
|
||||||
|
|
||||||
|
if ( calState > 199 && m_initComplete )
|
||||||
|
{
|
||||||
|
LOG( INFO ) << "Chaperone calibration state is error, attempting "
|
||||||
|
"to apply autosaved profile to fix issue";
|
||||||
|
parent->m_chaperoneTabController.applyAutosavedProfile();
|
||||||
|
}
|
||||||
|
|
||||||
|
m_offsetX = 0.0f;
|
||||||
|
m_offsetY = 0.0f;
|
||||||
|
m_offsetZ = 0.0f;
|
||||||
|
m_rotation = 0;
|
||||||
|
emit offsetXChanged( m_offsetX );
|
||||||
|
emit offsetYChanged( m_offsetY );
|
||||||
|
emit offsetZChanged( m_offsetZ );
|
||||||
|
emit rotationChanged( m_rotation );
|
||||||
|
updateSpace( true );
|
||||||
|
// reset();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -126,9 +126,6 @@ class MoveCenterTabController : public QObject
|
|||||||
Q_PROPERTY(
|
Q_PROPERTY(
|
||||||
bool showLogMatricesButton READ showLogMatricesButton WRITE
|
bool showLogMatricesButton READ showLogMatricesButton WRITE
|
||||||
setShowLogMatricesButton NOTIFY showLogMatricesButtonChanged )
|
setShowLogMatricesButton NOTIFY showLogMatricesButtonChanged )
|
||||||
// Q_PROPERTY( bool allowExternalEdits READ allowExternalEdits WRITE
|
|
||||||
// setAllowExternalEdits NOTIFY allowExternalEditsChanged
|
|
||||||
// )
|
|
||||||
Q_PROPERTY(
|
Q_PROPERTY(
|
||||||
bool universeCenteredRotation READ universeCenteredRotation WRITE
|
bool universeCenteredRotation READ universeCenteredRotation WRITE
|
||||||
setUniverseCenteredRotation NOTIFY universeCenteredRotationChanged )
|
setUniverseCenteredRotation NOTIFY universeCenteredRotationChanged )
|
||||||
@@ -198,6 +195,7 @@ private:
|
|||||||
int m_hmdRotationStatsUpdateCounter = 0;
|
int m_hmdRotationStatsUpdateCounter = 0;
|
||||||
unsigned m_dragComfortFrameSkipCounter = 0;
|
unsigned m_dragComfortFrameSkipCounter = 0;
|
||||||
unsigned m_turnComfortFrameSkipCounter = 0;
|
unsigned m_turnComfortFrameSkipCounter = 0;
|
||||||
|
int m_recenterStages = 0;
|
||||||
|
|
||||||
// Matrix used For Center Marker
|
// Matrix used For Center Marker
|
||||||
vr::HmdMatrix34_t m_offsetmatrix = utils::k_forwardUpMatrix;
|
vr::HmdMatrix34_t m_offsetmatrix = utils::k_forwardUpMatrix;
|
||||||
@@ -215,8 +213,8 @@ private:
|
|||||||
= { { { 1.0f, 0.0f, 0.0f, 0.0f },
|
= { { { 1.0f, 0.0f, 0.0f, 0.0f },
|
||||||
{ 0.0f, 1.0f, 0.0f, 0.0f },
|
{ 0.0f, 1.0f, 0.0f, 0.0f },
|
||||||
{ 0.0f, 0.0f, 1.0f, 0.0f } } };
|
{ 0.0f, 0.0f, 1.0f, 0.0f } } };
|
||||||
vr::HmdQuad_t* m_collisionBoundsForOffset;
|
// vr::HmdQuad_t* m_collisionBoundsForOffset;
|
||||||
void updateCollisionBoundsForOffset();
|
// void updateCollisionBoundsForOffset();
|
||||||
|
|
||||||
void updateHmdRotationCounter( vr::TrackedDevicePose_t hmdPose,
|
void updateHmdRotationCounter( vr::TrackedDevicePose_t hmdPose,
|
||||||
double angle );
|
double angle );
|
||||||
@@ -270,7 +268,7 @@ public:
|
|||||||
bool isInitComplete() const;
|
bool isInitComplete() const;
|
||||||
double getHmdYawTotal();
|
double getHmdYawTotal();
|
||||||
void resetHmdYawTotal();
|
void resetHmdYawTotal();
|
||||||
void incomingSeatedReset();
|
void incomingZeroReset();
|
||||||
void setBoundsBasisHeight( float newHeight );
|
void setBoundsBasisHeight( float newHeight );
|
||||||
float getBoundsBasisMaxY();
|
float getBoundsBasisMaxY();
|
||||||
|
|
||||||
@@ -280,7 +278,6 @@ public:
|
|||||||
void saveOffsetProfiles();
|
void saveOffsetProfiles();
|
||||||
Q_INVOKABLE unsigned getOffsetProfileCount();
|
Q_INVOKABLE unsigned getOffsetProfileCount();
|
||||||
Q_INVOKABLE QString getOffsetProfileName( unsigned index );
|
Q_INVOKABLE QString getOffsetProfileName( unsigned index );
|
||||||
// Q_INVOKABLE void setIgnoreChaperoneState();
|
|
||||||
|
|
||||||
// actions:
|
// actions:
|
||||||
void leftHandSpaceDrag( bool leftHandDragActive );
|
void leftHandSpaceDrag( bool leftHandDragActive );
|
||||||
@@ -349,7 +346,6 @@ public slots:
|
|||||||
|
|
||||||
void shutdown();
|
void shutdown();
|
||||||
void reset();
|
void reset();
|
||||||
void updateSeatedResetData();
|
|
||||||
void outputLogPoses();
|
void outputLogPoses();
|
||||||
void zeroOffsets();
|
void zeroOffsets();
|
||||||
void sendSeatedRecenter();
|
void sendSeatedRecenter();
|
||||||
@@ -387,7 +383,6 @@ signals:
|
|||||||
void requireLockYChanged( bool value );
|
void requireLockYChanged( bool value );
|
||||||
void requireLockZChanged( bool value );
|
void requireLockZChanged( bool value );
|
||||||
void showLogMatricesButtonChanged( bool value );
|
void showLogMatricesButtonChanged( bool value );
|
||||||
// void allowExternalEditsChanged( bool value );
|
|
||||||
void universeCenteredRotationChanged( bool value );
|
void universeCenteredRotationChanged( bool value );
|
||||||
void offsetProfilesUpdated();
|
void offsetProfilesUpdated();
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
{ "major": 5, "minor": 7, "patch": 4, "updateMessage": "", "optionalMessage": "" }
|
{ "major": 5, "minor": 8, "patch": 9, "updateMessage": "", "optionalMessage": "" }
|
||||||
|
|||||||
Reference in New Issue
Block a user