Skip to content

hx20: CHG_LIMIT_GET_LIMIT disables charge override #6

Closed

Description

@DHowett

Querying the charge limit with host command CHARGE_LIMIT_CONTROL mode CHG_LIMIT_GET_LIMIT reloads the charge limit from bbram, which overwrites the CHG_LIMIT_OVERRIDE flag.

Flag is set here (and not stored to bbram, because it is a one-time override):

if (p->modes & CHG_LIMIT_OVERRIDE)
charging_maximum_level = charging_maximum_level | CHG_LIMIT_OVERRIDE;

and cleared when we read into charging_maximum_level here:

if (p->modes & CHG_LIMIT_GET_LIMIT) {
system_get_bbram(SYSTEM_BBRAM_IDX_CHG_MAX, &charging_maximum_level);

Activity

  1. added a commit that references this issue on Jan 23, 2022
    5452515
  2. changed the title [-]CHG_LIMIT_GET_LIMIT disables charge override[/-] [+]hx20: CHG_LIMIT_GET_LIMIT disables charge override[/+] on Jun 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions