MCPcopy Create free account
hub / github.com/OpenVR-Advanced-Settings/OpenVR-AdvancedSettings / FindAllRX

Method FindAllRX

src/openvr/lh_console_util.cpp:20–52  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

18}
19
20bool LHCUtil::FindAllRX()
21{
22 QProcess* lhProcess = new QProcess();
23 QString program = "lighthouse_console.exe";
24 lhProcess->start( path_, QStringList() << "" );
25 lhProcess->waitForFinished();
26
27 QString output = QString( lhProcess->readAllStandardOutput() );
28 QStringList outputLines
29 = output.split( QRegExp( "[\r\n]" ), QString::SkipEmptyParts );
30 bool RecieverStart = false;
31
32 for ( auto OutputLine : outputLines )
33 {
34 if ( OutputLine.contains( "Attached lighthouse receiver devices:" ) )
35 {
36 RecieverStart = true;
37 continue;
38 }
39 if ( RecieverStart )
40 {
41 if ( OutputLine.contains( "lighthouse_console" ) )
42 {
43 break;
44 }
45 OutputLine.simplified().remove( " " );
46 OutputLine.remove( 0, 1 );
47 // LOG( WARNING ) << OutputLine << std::endl;
48 RXTX_Pairs_.push_back( RXTX_Pair{ OutputLine, " ", true, false } );
49 }
50 }
51 return !RXTX_Pairs_.empty();
52}
53
54bool LHCUtil::FindConnectedTX( QString RXSerial )
55{

Callers

nothing calls this directly

Calls 5

startMethod · 0.80
containsMethod · 0.80
removeMethod · 0.80
push_backMethod · 0.80
emptyMethod · 0.45

Tested by

no test coverage detected