<p>pespin has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/osmo-bts/+/19408">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">tx_power: Take into account max-initial when ramping up bigger power lvl intervals<br><br>Until now, power-ramp max-initial was only taken into account in order<br>to skip ramping if the desired target level was below it, in order to<br>forbid growin too quickly or applying directly to much power given power<br>amplifier requirements.<br>However, in the event that a higher tx power level is desired,<br>max-initial was not taking into account and ramping simply started from<br>current tx power level, which could be a lot lower than max-initial.<br>Allow shortcutting the ramping in that case so that max-initial is<br>applied directly, and ramping continues from there, in order to have a<br>more expected behavior (max-initial applied the same).<br><br>Since max-initial can since a few commits before handle a negative<br>value, this means One can for instance set max-initial to -10 and still<br>keep the old behavior of ramping step by step from -10 (rf-locked in<br>osmo-bts-trx) to 0 or 7 or whatever is the nominal power<br>(max_power_red).<br><br>Change-Id: I4e5742ecdbf66d77ff9445999f6fff43bbf4856a<br>---<br>M src/common/tx_power.c<br>1 file changed, 3 insertions(+), 1 deletion(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/08/19408/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/common/tx_power.c b/src/common/tx_power.c</span><br><span>index 7f134ca..c5ea7ed 100644</span><br><span>--- a/src/common/tx_power.c</span><br><span>+++ b/src/common/tx_power.c</span><br><span>@@ -276,8 +276,10 @@</span><br><span>                   tpp->ramp.attenuation_mdB = 0;</span><br><span>                    power_ramp_timer_cb(trx);</span><br><span>            } else {</span><br><span style="color: hsl(0, 100%, 40%);">-                        /* We need to step it up. Start from the current value */</span><br><span style="color: hsl(120, 100%, 40%);">+                     /* We need to step it up. Start from the current value, shortcutting to max-initial. */</span><br><span>                      /* Set attenuation to cause no power change right now */</span><br><span style="color: hsl(120, 100%, 40%);">+                      if (tpp->p_total_cur_mdBm + tpp->ramp.step_size_mdB < tpp->ramp.max_initial_pout_mdBm)</span><br><span style="color: hsl(120, 100%, 40%);">+                            tpp->p_total_cur_mdBm = tpp->ramp.max_initial_pout_mdBm - tpp->ramp.step_size_mdB;</span><br><span>                  tpp->ramp.attenuation_mdB = tpp->p_total_tgt_mdBm - tpp->p_total_cur_mdBm;</span><br><span> </span><br><span>                      /* start with the first step */</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-bts/+/19408">change 19408</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/c/osmo-bts/+/19408"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-bts </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I4e5742ecdbf66d77ff9445999f6fff43bbf4856a </div>
<div style="display:none"> Gerrit-Change-Number: 19408 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>