Change in osmo-bts[master]: power_control: lchan_ul_pf_ewma(): do not use lchan->meas.res_nr

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

fixeria gerrit-no-reply at lists.osmocom.org
Tue Dec 1 17:41:34 UTC 2020


fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/21442 )


Change subject: power_control: lchan_ul_pf_ewma(): do not use lchan->meas.res_nr
......................................................................

power_control: lchan_ul_pf_ewma(): do not use lchan->meas.res_nr

Change-Id: Idfefca30f4944bc722b4e9d8f1685eb77670a9db
Related: SYS#4918
---
M src/common/power_control.c
M tests/power/power_test.c
2 files changed, 2 insertions(+), 2 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/42/21442/1

diff --git a/src/common/power_control.c b/src/common/power_control.c
index 3328167..5dbf8ce 100644
--- a/src/common/power_control.c
+++ b/src/common/power_control.c
@@ -82,7 +82,7 @@
 	int *Avg100 = &lchan->ms_power_ctrl.avg100_rxlev_dbm;
 
 	/* We don't have 'Avg[n - 1]' if this is the first run */
-	if (lchan->meas.res_nr == 0) {
+	if (*Avg100 == 0) {
 		*Avg100 = Pwr * EWMA_SCALE_FACTOR;
 		return Pwr;
 	}
diff --git a/tests/power/power_test.c b/tests/power/power_test.c
index 1abe532..147c725 100644
--- a/tests/power/power_test.c
+++ b/tests/power/power_test.c
@@ -191,7 +191,7 @@
 
 	g_bts->ul_power_ctrl.pf.ewma.alpha = 70; /* 30% smoothing */
 	lchan->ms_power_ctrl.current = 15;
-	lchan->meas.res_nr = 0;
+	lchan->ms_power_ctrl.avg100_rxlev_dbm = 0;
 
 	/* This is the first sample, the filter outputs it as-is */
 	apply_power_test(lchan, -50, 0, 15);

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/21442
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: Idfefca30f4944bc722b4e9d8f1685eb77670a9db
Gerrit-Change-Number: 21442
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20201201/c449ade3/attachment.htm>


More information about the gerrit-log mailing list