diff options
author | Jörg Hohensohn <hohensoh@rockbox.org> | 2004-10-18 07:58:59 +0000 |
---|---|---|
committer | Jörg Hohensohn <hohensoh@rockbox.org> | 2004-10-18 07:58:59 +0000 |
commit | 6694212a6f2eda4bd70933ddabbc0243652f32d1 (patch) | |
tree | e91ae3ca579873c1463d5b623a8d9899aa578568 /apps | |
parent | d8426965a2284fc47bc6e1d9f932d0a9fb1a90ac (diff) | |
download | rockbox-6694212a6f2eda4bd70933ddabbc0243652f32d1.tar.gz rockbox-6694212a6f2eda4bd70933ddabbc0243652f32d1.zip |
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
Diffstat (limited to 'apps')
-rw-r--r-- | apps/recorder/radio.c | 9 |
1 files changed, 5 insertions, 4 deletions
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 @@ | |||
20 | #include "config.h" | 20 | #include "config.h" |
21 | #include <stdio.h> | 21 | #include <stdio.h> |
22 | #include <stdbool.h> | 22 | #include <stdbool.h> |
23 | #include <stdlib.h> | ||
23 | #include "sprintf.h" | 24 | #include "sprintf.h" |
24 | #include "lcd.h" | 25 | #include "lcd.h" |
25 | #include "mas.h" | 26 | #include "mas.h" |
@@ -160,7 +161,7 @@ bool radio_screen(void) | |||
160 | bool done = false; | 161 | bool done = false; |
161 | int button; | 162 | int button; |
162 | int freq; | 163 | int freq; |
163 | int i_freq; | 164 | int freq_diff; |
164 | bool stereo = false; | 165 | bool stereo = false; |
165 | int search_dir = 0; | 166 | int search_dir = 0; |
166 | int fw, fh; | 167 | int fw, fh; |
@@ -254,10 +255,10 @@ bool radio_screen(void) | |||
254 | sleep(1); | 255 | sleep(1); |
255 | 256 | ||
256 | /* Now check how close to the IF frequency we are */ | 257 | /* Now check how close to the IF frequency we are */ |
257 | i_freq = radio_get(RADIO_IF_MEASURED); | 258 | freq_diff = radio_get(RADIO_DEVIATION); |
258 | 259 | ||
259 | /* Stop searching if the IF frequency is close to 10.7MHz */ | 260 | /* Stop searching if the tuning is close */ |
260 | if(i_freq > 1065 && i_freq < 1075) | 261 | if(abs(freq_diff) < 50) |
261 | { | 262 | { |
262 | search_dir = 0; | 263 | search_dir = 0; |
263 | curr_preset = find_preset(curr_freq); | 264 | curr_preset = find_preset(curr_freq); |