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/.
laforge gerrit-no-reply at lists.osmocom.orglaforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/22051 ) Change subject: power_control: properly track the first initial state ...................................................................... power_control: properly track the first initial state Change-Id: I16e7474b5affbd90855a2e407b305e9dec581dfa Related: SYS#4918, SYS#4917 --- M include/osmo-bts/gsm_data.h M src/common/power_control.c 2 files changed, 3 insertions(+), 1 deletion(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve laforge: Looks good to me, approved diff --git a/include/osmo-bts/gsm_data.h b/include/osmo-bts/gsm_data.h index 253b115..8071a28 100644 --- a/include/osmo-bts/gsm_data.h +++ b/include/osmo-bts/gsm_data.h @@ -215,6 +215,8 @@ /* Measurement pre-processing state */ struct gsm_power_ctrl_meas_proc_state { + /* Number of measurements processed */ + unsigned int meas_num; /* Algorithm specific data */ union { struct { diff --git a/src/common/power_control.c b/src/common/power_control.c index 0629630..5e2e85e 100644 --- a/src/common/power_control.c +++ b/src/common/power_control.c @@ -78,7 +78,7 @@ int *Avg100 = &mps->ewma.Avg100; /* We don't have 'Avg[n - 1]' if this is the first run */ - if (*Avg100 == 0) { + if (mps->meas_num++ == 0) { *Avg100 = Val * EWMA_SCALE_FACTOR; return Val; } -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/22051 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I16e7474b5affbd90855a2e407b305e9dec581dfa Gerrit-Change-Number: 22051 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy at sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge at osmocom.org> Gerrit-Reviewer: pespin <pespin at sysmocom.de> Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210111/2f12931a/attachment.htm>