summaryrefslogtreecommitdiff
path: root/gsm-tvoid/src
diff options
context:
space:
mode:
Diffstat (limited to 'gsm-tvoid/src')
-rwxr-xr-xgsm-tvoid/src/lib/gsm_burst.cc7
-rwxr-xr-xgsm-tvoid/src/python/gsm_scan.py38
2 files changed, 23 insertions, 22 deletions
diff --git a/gsm-tvoid/src/lib/gsm_burst.cc b/gsm-tvoid/src/lib/gsm_burst.cc
index f18dcae..3bef146 100755
--- a/gsm-tvoid/src/lib/gsm_burst.cc
+++ b/gsm-tvoid/src/lib/gsm_burst.cc
@@ -713,7 +713,8 @@ int gsm_burst::get_burst(void)
#ifdef TEST_TUNE_TIMING
static int good_count = -1; //-1: wait sch, >=0: got sch, counting
-
+ static int wait_count = 0;
+
if (UNKNOWN == d_burst_type) {
if (good_count >= 0) {
fprintf(stdout,"good_count: %d\n",good_count);
@@ -732,9 +733,9 @@ int gsm_burst::get_burst(void)
}
if (SCH == d_burst_type) {
- if (good_count < 0) { // waiting for sch?
+ if ((good_count < 0) && (++wait_count > 20)) { // get some good syncs before trying again
fprintf(stdout,"restarting good_count\n");
- good_count = 0;
+ good_count = wait_count = 0;
//tune away
if (p_tuner) {
next_arfcn = TEST_TUNE_EMPTY_ARFCN;
diff --git a/gsm-tvoid/src/python/gsm_scan.py b/gsm-tvoid/src/python/gsm_scan.py
index 6e09f7f..461abf1 100755
--- a/gsm-tvoid/src/python/gsm_scan.py
+++ b/gsm-tvoid/src/python/gsm_scan.py
@@ -214,25 +214,25 @@ class app_flow_graph(stdgui.gui_flow_graph):
sps = input_rate/gsm_symb_rate
-# # Attempt to enable realtime scheduling
-# r = gr.enable_realtime_scheduling()
-# if r == gr.RT_OK:
-# realtime = True
-# print "Realtime scheduling ENABLED"
-# else:
-# realtime = False
-# print "Realtime scheduling FAILED"
-#
-# # if options.fusb_block_size == 0 and options.fusb_nblocks == 0:
-# if realtime: # be more aggressive
-# options.fusb_block_size = gr.prefs().get_long('fusb', 'rt_block_size', 1024)
-# options.fusb_nblocks = gr.prefs().get_long('fusb', 'rt_nblocks', 16)
-# else:
-# options.fusb_block_size = gr.prefs().get_long('fusb', 'block_size', 4096)
-# options.fusb_nblocks = gr.prefs().get_long('fusb', 'nblocks', 16)
-#
-# print "fusb_block_size =", options.fusb_block_size
-# print "fusb_nblocks =", options.fusb_nblocks
+ # Attempt to enable realtime scheduling
+ r = gr.enable_realtime_scheduling()
+ if r == gr.RT_OK:
+ realtime = True
+ print "Realtime scheduling ENABLED"
+ else:
+ realtime = False
+ print "Realtime scheduling FAILED"
+
+# if options.fusb_block_size == 0 and options.fusb_nblocks == 0:
+ if realtime: # be more aggressive
+ options.fusb_block_size = gr.prefs().get_long('fusb', 'rt_block_size', 1024)
+ options.fusb_nblocks = gr.prefs().get_long('fusb', 'rt_nblocks', 16)
+ else:
+ options.fusb_block_size = gr.prefs().get_long('fusb', 'block_size', 4096)
+ options.fusb_nblocks = gr.prefs().get_long('fusb', 'nblocks', 16)
+
+ print "fusb_block_size =", options.fusb_block_size
+ print "fusb_nblocks =", options.fusb_nblocks
# Build the flowgraph
# Setup our input source
personal git repositories of Harald Welte. Your mileage may vary