Skip to content

Commit f541f89

Browse files
LeoCX-TsaiTerrails
authored andcommitted
fwk: lotus: override the display charge value for Windows system
reference marigold CLs[PR#1042] use Windows system to show the display battery percentage before use battery register 0x0d (batt soc) after use windows formula (batt cap*1000 / LFCC+1) BRANCH=fwk-lotus-azalea-19573 BUG=None TEST=verify battery extender is triggered at the correct battery percentage float range Stage1 95-90, Stage2 87-85. Signed-off-by: LeoCX_Tsai <[email protected]>
1 parent b046765 commit f541f89

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

zephyr/program/framework/azalea/src/battery.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,4 +262,7 @@ __override void board_battery_compensate_params(struct batt_params *batt)
262262
batt->flags &= ~BATT_FLAG_BAD_ANY;
263263
batt->flags |= BATT_FLAG_RESPONSIVE;
264264
batt_cache.flags |= BATT_FLAG_RESPONSIVE;
265+
266+
/* override the display charge value for Windows system */
267+
batt->display_charge = get_system_percentage();
265268
}

zephyr/program/framework/lotus/src/battery.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,9 @@ __override void board_battery_compensate_params(struct batt_params *batt)
312312
batt->flags &= ~BATT_FLAG_BAD_ANY;
313313
batt->flags |= BATT_FLAG_RESPONSIVE;
314314
batt_cache.flags |= BATT_FLAG_RESPONSIVE;
315+
316+
/* override the display charge value for Windows system */
317+
batt->display_charge = get_system_percentage();
315318
}
316319

317320
void board_cut_off(void)

0 commit comments

Comments
 (0)