[layer1] set RF frontend gain during power measurement

also add some debug messages
This commit is contained in:
Harald Welte 2010-06-25 23:55:09 +02:00
parent d919186ca4
commit 0d0c9e8f5b
1 changed files with 6 additions and 0 deletions

View File

@ -66,6 +66,9 @@ static int l1s_pm_cmd(uint8_t num_meas,
dsp_api.ndb->d_fb_mode = 0; /* wideband search */
dsp_end_scenario();
/* Tell the RF frontend to set the gain appropriately */
rffe_set_gain(-85, CAL_DSP_TGT_BB_LVL);
/* Program TPU */
/* FIXME: RXWIN_PW needs to set up multiple times in case
* num_meas > 1 */
@ -87,6 +90,9 @@ static int l1s_pm_resp(uint8_t num_meas, __unused uint8_t p2,
l1ddsp_meas_read(num_meas, pm_level);
printf("PM MEAS: ARFCN=%u, %-4d dBm at baseband, %-4d dBm at RF\n",
arfcn, pm_level[0]/8, agc_inp_dbm8_by_pm(pm_level[0])/8);
printd("PM MEAS: %-4d dBm, %-4d dBm ARFCN=%u\n",
agc_inp_dbm8_by_pm(pm_level[0])/8,
agc_inp_dbm8_by_pm(pm_level[1])/8, arfcn);