mirror of
https://github.com/brmlab/kalibrate-rtl.git
synced 2025-08-01 21:53:37 +02:00
fix scanning of E-GSM-900
Signed-off-by: Steve Markgraf <steve@steve-m.de>
This commit is contained in:
parent
912f946144
commit
ed733cc952
2 changed files with 4 additions and 4 deletions
|
@ -95,7 +95,7 @@ double arfcn_to_freq(int n, int *bi) {
|
|||
}
|
||||
|
||||
if((1 <= n) && (n <= 124)) {
|
||||
if(bi)
|
||||
if(bi && (*bi != GSM_E_900))
|
||||
*bi = GSM_900;
|
||||
return 890.0e6 + 0.2e6 * n + 45.0e6;
|
||||
}
|
||||
|
|
|
@ -79,7 +79,7 @@ int c0_detect(usrp_source *u, int bi) {
|
|||
}
|
||||
u->start();
|
||||
u->flush();
|
||||
for(i = first_chan(bi); i > 0; i = next_chan(i, bi)) {
|
||||
for(i = first_chan(bi); i >= 0; i = next_chan(i, bi)) {
|
||||
freq = arfcn_to_freq(i, &bi);
|
||||
if(!u->tune(freq)) {
|
||||
fprintf(stderr, "error: usrp_source::tune\n");
|
||||
|
@ -111,7 +111,7 @@ int c0_detect(usrp_source *u, int bi) {
|
|||
* channels when we construct the average.
|
||||
*/
|
||||
chan_count = 0;
|
||||
for(i = first_chan(bi); i > 0; i = next_chan(i, bi)) {
|
||||
for(i = first_chan(bi); i >= 0; i = next_chan(i, bi)) {
|
||||
spower[chan_count++] = power[i];
|
||||
}
|
||||
sort(spower, chan_count);
|
||||
|
@ -166,7 +166,7 @@ int c0_detect(usrp_source *u, int bi) {
|
|||
i = next_chan(i, bi);
|
||||
}
|
||||
}
|
||||
} while(i > 0);
|
||||
} while(i >= 0);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue