diff options
author | Vadim Yanitskiy <vyanitskiy@sysmocom.de> | 2020-12-26 08:49:29 +0100 |
---|---|---|
committer | Vadim Yanitskiy <vyanitskiy@sysmocom.de> | 2021-01-08 02:23:56 +0100 |
commit | 834ba05cd218e0f08685adf259e18a96368285ef (patch) | |
tree | 984869f4500c035417e09579b03853082c575dbb /tests | |
parent | e8f857453df56a40be61b17aafc509047e141174 (diff) |
power_control: generalize measurement pre-processing state
This way EWMA based filtering can also be applied to RxQual.
Change-Id: I439c00b394da670e314f217b3246cc85ce8213c6
Related: SYS#4918, SYS#4917
Diffstat (limited to 'tests')
-rw-r--r-- | tests/power/ms_power_loop_test.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/power/ms_power_loop_test.c b/tests/power/ms_power_loop_test.c index e93a2efe..eb0e3e9b 100644 --- a/tests/power/ms_power_loop_test.c +++ b/tests/power/ms_power_loop_test.c @@ -164,7 +164,7 @@ static void test_pf_algo_ewma(void) init_test(__func__); lchan = &g_trx->ts[0].lchan[0]; - avg100 = &lchan->ms_power_ctrl.avg100_rxlev_dbm; + avg100 = &lchan->ms_power_ctrl.rxlev_meas_proc.ewma.Avg100; struct gsm_power_ctrl_meas_params *mp = &lchan->ms_dpc_params.rxlev_meas; mp->algo = GSM_PWR_CTRL_MEAS_AVG_ALGO_OSMO_EWMA; @@ -204,7 +204,8 @@ static void test_pf_algo_ewma(void) mp->ewma.alpha = 70; /* 30% smoothing */ lchan->ms_power_ctrl.current = 15; - lchan->ms_power_ctrl.avg100_rxlev_dbm = 0; + lchan->ms_power_ctrl.rxlev_meas_proc = \ + (struct gsm_power_ctrl_meas_proc_state) { 0 }; /* This is the first sample, the filter outputs it as-is */ apply_power_test(lchan, -50, 0, 15); |