| 
					
				 | 
			
			
				@@ -206,7 +206,12 @@ void* belysning_control_thread(void*){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             prolong = true; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             sem_post(&spooler_sem); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        //printf("DATA %u, %ld, %ld, %ld %u\n",sq_status,sq_start_time,audio_start_time,tv.tv_sec,prolong); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (sq_status && sq_start_time < tv.tv_sec){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            prolong = true; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        }else{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            prolong = false; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        printf("DATA %u, %ld, %ld, %ld %u %ld\n",sq_status,sq_start_time,audio_start_time,tv.tv_sec,prolong,stop_time); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         //Check if we should start 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if (sq_status == true && sq_start_time+bel_open_time < tv.tv_sec && audio_start_time+bel_open_time < tv.tv_sec){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             sq_start_time=sq_start_time; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -225,6 +230,7 @@ void* belysning_control_thread(void*){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         // Prolong 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if (active==true && prolong==true){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+         
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             if (tv.tv_sec+bel_prolong_time >= stop_time){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 stop_time=tv.tv_sec+bel_prolong_time; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 if (tui) 
			 |