| 18 | } |
| 19 | |
| 20 | bool 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 | |
| 54 | bool LHCUtil::FindConnectedTX( QString RXSerial ) |
| 55 | { |