Per Mårtensson 1 ヶ月 前
コミット
24dcc4a434
2 ファイル変更14 行追加8 行削除
  1. 7 7
      rtl_airband.conf
  2. 7 1
      src/rtl_airband.cpp

+ 7 - 7
rtl_airband.conf

@@ -1,11 +1,11 @@
 fft_size = 512;
-bel_start_on_time = 30;
-bel_open_time = 5;
-bel_prolong_time = 10;
+bel_start_on_time = 1800;
+bel_open_time = 7;
+bel_prolong_time = 600;
 bel_wave_out_level = 0.1;
 bel_wave_in_level = 10.0;
-bel_blink_time = 10;
-
+bel_blink_time = 60;
+pidfile = "/tmp/rtl_airband.pid";
 devices: (
   {
     type = "rtlsdr";
@@ -17,11 +17,11 @@ devices: (
     (
       {
         freq = 123.35;
-	squelch_threshold = -30;
+	squelch_threshold = -45;
         outputs: (
           {
             type = "icecast";
-            server = "india6.ljungsjo.se";
+            server = "icecast.dalsro.se";
             port = 8000;
             mountpoint = "TWR.mp3";
             name = "Tower";

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