Skip to content

azalea/lotus: CHG_LIMIT_GET_LIMIT disables override #42

Open
@DHowett

Description

@DHowett

This is a repeat of bug #6 for azalea and lotus

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.

The override flag is cleared when we read into charging_maximum_level here:

azalea

if (p->modes & CHG_LIMIT_GET_LIMIT) {
system_get_bbram(SYSTEM_BBRAM_IDX_CHARGE_LIMIT_MAX, &charging_maximum_level);
r->max_percentage = charging_maximum_level;
args->response_size = sizeof(*r);
}

lotus

if (p->modes & CHG_LIMIT_GET_LIMIT) {
system_get_bbram(SYSTEM_BBRAM_IDX_CHARGE_LIMIT_MAX, &charging_maximum_level);
r->max_percentage = charging_maximum_level;
args->response_size = sizeof(*r);
}

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