From 6694212a6f2eda4bd70933ddabbc0243652f32d1 Mon Sep 17 00:00:00 2001 From: Jörg Hohensohn Date: Mon, 18 Oct 2004 07:58:59 +0000 Subject: minor touchup, to make the tuner interface independent from the IF git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5302 a1c6a512-1295-4272-9138-f99709370657 --- apps/recorder/radio.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'apps') diff --git a/apps/recorder/radio.c b/apps/recorder/radio.c index 9eac63a520..d60d1bd4d7 100644 --- a/apps/recorder/radio.c +++ b/apps/recorder/radio.c @@ -20,6 +20,7 @@ #include "config.h" #include #include +#include #include "sprintf.h" #include "lcd.h" #include "mas.h" @@ -160,7 +161,7 @@ bool radio_screen(void) bool done = false; int button; int freq; - int i_freq; + int freq_diff; bool stereo = false; int search_dir = 0; int fw, fh; @@ -254,10 +255,10 @@ bool radio_screen(void) sleep(1); /* Now check how close to the IF frequency we are */ - i_freq = radio_get(RADIO_IF_MEASURED); + freq_diff = radio_get(RADIO_DEVIATION); - /* Stop searching if the IF frequency is close to 10.7MHz */ - if(i_freq > 1065 && i_freq < 1075) + /* Stop searching if the tuning is close */ + if(abs(freq_diff) < 50) { search_dir = 0; curr_preset = find_preset(curr_freq); -- cgit v1.2.3