Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 39b29bc2 authored by Hui Yu's avatar Hui Yu
Browse files

Calculate cellular radio value from modem.controller values.

Recently cellular radio related values {"radio.active", "radio.scanning",
"radio.on"} are removed from power_profile.xml, which causes inaccurate
radio power usage. We use following formula to calculate radio
values from modem.controller values.

radio.active = average of modem.controller.rx and modem.controller.tx values
radio.scanning = 0 (since this is already included in radio.on bin 0)
<array name="radio.on"> <!-- Strength 0 to BINS-1 -->
    <value>modem.controller.idle * 25 / 180 </value>   <!-- none -->
    <value>max(1, modem.controller.idle/256) </value>  <!-- poor -->
    <value>max(1, modem.controller.idle/256) </value>  <!-- moderate -->
    <value>max(1, modem.controller.idle/256) </value>  <!-- good -->
    <value>max(1, modem.controller.idle/256) </value>  <!-- great -->
 </array>

Bug: 79379255
Test:  use debugger to observe correct mPowerRadioOn, mPowerBins,
mPowerScan are calculated. "adb shell dumpsys batterystats", looking for
"radio=" in "Estimated power use" section.

Change-Id: Ic65a5c8a35a5b1f4ba05ddc150e29b00bc62689f
parent 57f6932f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment