OSDN Git Service

[AKC6955][v1.0] Remove duplicate check(s).
authorK.Ohta <whatisthis.sowhat@gmail.com>
Fri, 27 Sep 2013 03:59:55 +0000 (12:59 +0900)
committerK.Ohta <whatisthis.sowhat@gmail.com>
Fri, 27 Sep 2013 03:59:55 +0000 (12:59 +0900)
akc6955.c
menu_defs.c

index c0e67db..c07ed08 100644 (file)
--- a/akc6955.c
+++ b/akc6955.c
@@ -337,31 +337,14 @@ void akc6955_set_freq(unsigned int freq)
     __bitops_t f;
     __bitops_t mode3k;
     unsigned char band;
-    unsigned int start, stop;
 
     f.byte = akc6955_readcmd(AKC6955_POWER);
     if(f.b6) { // FM
         akc6955_get_fmband(band);
-//        band &= 7;
-        if(band == AKC6955_BAND_FMUSER){
-            start = setup.fm_usrbands[setup.fm_userbandnum].start * 32;
-            stop = setup.fm_usrbands[setup.fm_userbandnum].stop * 32;
-        } else {
-            start = fmbands[band].start;
-            stop = fmbands[band].end;
-        }
         ch = freq - 3000;
         ch = (ch << 2) / 10;
     } else {
         akc6955_get_amband(band);
-//        if(band >= AKC6955_BAND_AMEND) band = AKC6955_BAND_AMEND - 1;
-        if(band == AKC6955_BAND_AMUSER){
-            start = setup.am_usrbands[setup.am_userbandnum].start * 32;
-            stop = setup.am_usrbands[setup.am_userbandnum].stop * 32;
-        } else {
-            start = ambands[band].start;
-            stop = ambands[band].end;
-        }
         mode3k.byte = akc6955_readcmd(AKC6955_CNR_AM);
         if(band == AKC6955_BAND_MW2) {
             ch = (freq / 9) * 3; // See datasheet.
@@ -373,8 +356,6 @@ void akc6955_set_freq(unsigned int freq)
             ch = freq / 5;
         }
     }
-    if(freq <  start) freq = start;
-    if(freq >= stop)   freq = stop - 1;
     akc6955_set_tune(mode3k.b7, ch);
 }
 
index 7f6ce62..bb3a67d 100644 (file)
@@ -54,7 +54,7 @@
 #include "backlight.h"
 
 const banddesc ambands[19] = {
-    {150,285},
+    {100,522},
     {520,1710},
     {522,1620},
     {520,1710},