Browse Source

Added banbel marker in config

Per Mårtensson 2 weeks ago
parent
commit
d8c789f767
1 changed files with 7 additions and 1 deletions
  1. 7 1
      src/rtl_airband.cpp

+ 7 - 1
src/rtl_airband.cpp

@@ -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)