langerhans / OdinTools

Collection of utilities for the AYN Odin 2
MIT License
133 stars 9 forks source link

Configurable automatic charging separation #21

Closed langerhans closed 5 months ago

langerhans commented 9 months ago

Automatically turn on/off charging separation at user selectable battery levels

miguelguzmanr commented 9 months ago

Notes

Settings

Name Type Command Description
Charging separation Boolean settings get system is_charging_separation
Restrict current Int cat /sys/class/qcom-battery/restrict_cur
Restrict charge Boolean cat /sys/class/qcom-battery/restrict_chg Controls fast charge mode. When fastcharge is enabled, restrict_cur doesn't have any effect.

Values

State Charging separation Restrict current Restrict charge
🔋 Charging 0 1000000 0 = fastcharge on
âš¡ Bypass charging 1 1000 1 = fastcharge off
miguelguzmanr commented 8 months ago

Unable to implement as-is due to charging separation not switching off as expected.

Currently, under device version 1.0.0.266, turning off charging separation while plugged in will not resume charging. You must re-plug your device to resume charging again.

Thanks to @langerhans for discovering and reporting this issue.

Might look into it later if fixed in a future update.

miguelguzmanr commented 6 months ago

Seems to be working on device version 1.0.0.288!

miguelguzmanr commented 5 months ago

Added in #28