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
+135
View File
@@ -289,6 +289,113 @@ bool SteamVRTabController::cameraDashboard() const
return m_cameraDashboard;
}
void SteamVRTabController::searchRXTX()
{
deviceList.clear();
int hmdIndex = -1;
auto indexList = ovr_system_wrapper::getAllConnectedDevices( true );
m_dongleCountCur = 0;
for ( auto device : indexList )
{
if ( vr::TrackedDeviceClass_HMD
== ovr_system_wrapper::getDeviceClass( device ) )
{
hmdIndex = device;
continue;
}
deviceList.push_back( DeviceInfo{ device } );
GatherDeviceInfo( deviceList.back() );
}
if ( hmdIndex != -1 )
{
auto dongleList
= ovr_system_wrapper::getStringTrackedProperty(
hmdIndex, vr::Prop_AllWirelessDongleDescriptions_String )
.second;
int count = 0;
if ( !dongleList.empty() )
{
count++;
}
for ( auto c : dongleList )
{
if ( c == ';' )
{
count++;
}
}
m_dongleCountMax = count;
}
return;
}
void SteamVRTabController::GatherDeviceInfo( DeviceInfo& device )
{
std::string cd = ovr_system_wrapper::getStringTrackedProperty(
device.index, vr::Prop_ConnectedWirelessDongle_String )
.second;
if ( cd.empty() || cd == " " )
{
cd = "n/a";
device.dongleType = "n/a";
}
else
{
m_dongleCountCur++;
if ( cd.find( "-RYB" ) != std::string::npos
|| cd.find( "-LYM" ) != std::string::npos )
{
device.dongleType = "Headset";
}
// TODO 1yx SN
else if ( std::regex_match( cd, std::regex( "(.*)(-[0-9]YX)" ) ) )
{
device.dongleType = "Tundra Dongle";
}
else
{
device.dongleType = "Standard Dongle";
}
}
device.conDongle = cd;
std::string dd = ovr_system_wrapper::getStringTrackedProperty(
device.index, vr::Prop_SerialNumber_String )
.second;
if ( dd.empty() || dd == " " )
{
dd = "n/a";
}
device.txName = dd;
auto devClass = ovr_system_wrapper::getDeviceClass( device.index );
if ( devClass == vr::TrackedDeviceClass_HMD
|| devClass == vr::TrackedDeviceClass_Controller
|| devClass == vr::TrackedDeviceClass_GenericTracker )
{
device.hasName = true;
device.deviceName = ovr_system_wrapper::getDeviceName( device.index );
}
else
{
if ( device.txName.find( "LHB-" ) != std::string::npos )
{
device.deviceName = "Lighthouse";
}
}
int role = ovr_system_wrapper::getInt32TrackedProperty(
device.index, vr::Prop_ControllerRoleHint_Int32 )
.second;
if ( role == 1 )
{
device.deviceName += " (L)";
}
else if ( role == 2 )
{
device.deviceName += " (R)";
}
}
void SteamVRTabController::launchBindingUI()
{
vr::VRActionSetHandle_t actionHandle = 0;
@@ -335,4 +442,32 @@ void SteamVRTabController::restartSteamVR()
QProcess::startDetached( cmd );
}
Q_INVOKABLE unsigned SteamVRTabController::getRXTXCount()
{
return static_cast<unsigned>( deviceList.size() );
}
Q_INVOKABLE QString SteamVRTabController::getTXList( int i )
{
return QString::fromStdString( deviceList[i].txName );
}
Q_INVOKABLE QString SteamVRTabController::getDeviceName( int i )
{
return QString::fromStdString( deviceList[i].deviceName );
}
Q_INVOKABLE QString SteamVRTabController::getRXList( int i )
{
return QString::fromStdString( deviceList[i].conDongle );
}
Q_INVOKABLE QString SteamVRTabController::getDongleType( int i )
{
return QString::fromStdString( deviceList[i].dongleType );
}
Q_INVOKABLE QString SteamVRTabController::getDongleUsage()
{
return QString::fromStdString( std::to_string( m_dongleCountCur ) + "/"
+ std::to_string( m_dongleCountMax ) );
}
} // namespace advsettings