Fix: Correctly convert ARFCN to index.
If you enable PCS, you'll never make it out of power-measurement without this patch.
This commit is contained in:
parent
5c036d5983
commit
50c3ca922b
|
@ -300,11 +300,14 @@ uint16_t index2arfcn(int index)
|
|||
|
||||
int arfcn2index(uint16_t arfcn)
|
||||
{
|
||||
if ((arfcn & ARFCN_PCS) && arfcn >= 512 && arfcn <= 810)
|
||||
int is_pcs = arfcn & ARFCN_PCS;
|
||||
arfcn &= ~ARFCN_FLAG_MASK;
|
||||
if ((is_pcs) && (arfcn >= 512) && (arfcn <= 810))
|
||||
return (arfcn & 1023)-512+1024;
|
||||
return arfcn & 1023;
|
||||
}
|
||||
|
||||
|
||||
static char *bargraph(int value, int min, int max)
|
||||
{
|
||||
static char bar[128];
|
||||
|
|
Loading…
Reference in New Issue