Skip to content

Built-in BATTERY_PROPERTY_CAPACITY and BATTERY_PROPERTY_CHARGE_COUNTER#630

Closed
Wetitpig wants to merge 1 commit intotermux:masterfrom
Wetitpig:battery-patch
Closed

Built-in BATTERY_PROPERTY_CAPACITY and BATTERY_PROPERTY_CHARGE_COUNTER#630
Wetitpig wants to merge 1 commit intotermux:masterfrom
Wetitpig:battery-patch

Conversation

@Wetitpig
Copy link
Copy Markdown
Contributor

@Wetitpig Wetitpig commented Nov 1, 2023

BATTERY_PROPERTY_CHARGE_COUNTER can be multiplied with EXTRA_VOLTAGE in #623 to obtain the remaining battery energy, while BATTERY_PROPERTY_CAPACITY is available since API level 21, without requiring Termux to calculate the battery percentage by itself.

`BATTERY_PROPERTY_CHARGE_COUNTER` can be multiplied with `EXTRA_VOLTAGE` in another pull request to obtain the energy level, while `BATTERY_PROPERTY_CAPACITY` can be obtained since API level 21 without doing the calculation by Termux itself.
agnostic-apollo added a commit that referenced this pull request Jan 12, 2025
…_avg`, `level`, `scale`, `charge_counter`, `energy` and `cycle` properties to battery API

Fix `BATTERY_PROPERTY_CURRENT_NOW` unit if required.

Use `percentage` returned by `BATTERY_PROPERTY_CAPACITY` instead of using scale and level as suggested by @Wetitpig in #630
@agnostic-apollo
Copy link
Copy Markdown
Member

Closed by d5364ef

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants