summaryrefslogtreecommitdiffstats
path: root/apps/recorder
diff options
context:
space:
mode:
authorJörg Hohensohn <hohensoh@rockbox.org>2004-10-18 07:58:59 +0000
committerJörg Hohensohn <hohensoh@rockbox.org>2004-10-18 07:58:59 +0000
commit6694212a6f2eda4bd70933ddabbc0243652f32d1 (patch)
treee91ae3ca579873c1463d5b623a8d9899aa578568 /apps/recorder
parentd8426965a2284fc47bc6e1d9f932d0a9fb1a90ac (diff)
downloadrockbox-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/recorder')
-rw-r--r--apps/recorder/radio.c9
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 @@
#include "config.h"
#include <stdio.h>
#include <stdbool.h>
+#include <stdlib.h>
#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);