| 
						
						
						
					 | 
					 | 
					@ -1,5 +1,7 @@ | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					#include <QApplication> | 
					 | 
					 | 
					 | 
					#include <QApplication> | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					#include <QDir> | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					#include <QCommandLineParser> | 
					 | 
					 | 
					 | 
					#include <QCommandLineParser> | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					#include <QUuid> | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					#include "selfdrive/ui/qt/util.h" | 
					 | 
					 | 
					 | 
					#include "selfdrive/ui/qt/util.h" | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					#include "tools/cabana/mainwin.h" | 
					 | 
					 | 
					 | 
					#include "tools/cabana/mainwin.h" | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -20,12 +22,22 @@ int main(int argc, char *argv[]) { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    cmd_parser.showHelp(); | 
					 | 
					 | 
					 | 
					    cmd_parser.showHelp(); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  } | 
					 | 
					 | 
					 | 
					  } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					  QString uuid =  QUuid::createUuid().toString(QUuid::WithoutBraces); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					  QString msgq_path = "/dev/shm/" + uuid; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					  QDir dir; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					  dir.mkdir(msgq_path); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					  setenv("OPENPILOT_PREFIX", qPrintable(uuid), 1); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					  int ret = 0; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  const QString route = args.empty() ? DEMO_ROUTE : args.first(); | 
					 | 
					 | 
					 | 
					  const QString route = args.empty() ? DEMO_ROUTE : args.first(); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  CANMessages p(&app); | 
					 | 
					 | 
					 | 
					  CANMessages p(&app); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  if (!p.loadRoute(route, cmd_parser.value("data_dir"), cmd_parser.isSet("qcam"))) { | 
					 | 
					 | 
					 | 
					  if (p.loadRoute(route, cmd_parser.value("data_dir"), cmd_parser.isSet("qcam"))) { | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    return 0; | 
					 | 
					 | 
					 | 
					    MainWindow w; | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					    w.showMaximized(); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					    ret = app.exec(); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  } | 
					 | 
					 | 
					 | 
					  } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  MainWindow w; | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  w.showMaximized(); | 
					 | 
					 | 
					 | 
					  dir.rmdir(msgq_path); | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  return app.exec(); | 
					 | 
					 | 
					 | 
					  return ret; | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					} | 
					 | 
					 | 
					 | 
					} | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
					 | 
					 | 
					
  |