| 
						
						
							
								
							
						
						
					 | 
					 | 
					@ -6,6 +6,7 @@ | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					#include <QString> | 
					 | 
					 | 
					 | 
					#include <QString> | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					#include <QSoundEffect> | 
					 | 
					 | 
					 | 
					#include <QSoundEffect> | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					#include "selfdrive/ui/qt/util.h" | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					#include "cereal/messaging/messaging.h" | 
					 | 
					 | 
					 | 
					#include "cereal/messaging/messaging.h" | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					#include "selfdrive/common/util.h" | 
					 | 
					 | 
					 | 
					#include "selfdrive/common/util.h" | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					#include "selfdrive/hardware/hw.h" | 
					 | 
					 | 
					 | 
					#include "selfdrive/hardware/hw.h" | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -14,6 +15,10 @@ | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					// TODO: detect when we can't play sounds
 | 
					 | 
					 | 
					 | 
					// TODO: detect when we can't play sounds
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					// TODO: detect when we can't display the UI
 | 
					 | 
					 | 
					 | 
					// TODO: detect when we can't display the UI
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					void sigHandler(int s) { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					  qApp->quit(); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					} | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					class Sound : public QObject { | 
					 | 
					 | 
					 | 
					class Sound : public QObject { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					public: | 
					 | 
					 | 
					 | 
					public: | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  explicit Sound(QObject *parent = 0) { | 
					 | 
					 | 
					 | 
					  explicit Sound(QObject *parent = 0) { | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					 | 
					@ -100,9 +105,13 @@ private: | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					}; | 
					 | 
					 | 
					 | 
					}; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					int main(int argc, char **argv) { | 
					 | 
					 | 
					 | 
					int main(int argc, char **argv) { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					  qInstallMessageHandler(swagLogMessageHandler); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  setpriority(PRIO_PROCESS, 0, -20); | 
					 | 
					 | 
					 | 
					  setpriority(PRIO_PROCESS, 0, -20); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  QApplication a(argc, argv); | 
					 | 
					 | 
					 | 
					  QApplication a(argc, argv); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					  std::signal(SIGINT, sigHandler); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					  std::signal(SIGTERM, sigHandler); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  Sound sound; | 
					 | 
					 | 
					 | 
					  Sound sound; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  return a.exec(); | 
					 | 
					 | 
					 | 
					  return a.exec(); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					} | 
					 | 
					 | 
					 | 
					} | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
					 | 
					 | 
					
  |