Skip to content

Commit

Permalink
Merge pull request #24 from tmobile/tmo-CFSPDK-874
Browse files Browse the repository at this point in the history
Fixed "plugged in" state report being incorrect when no battery is attached
  • Loading branch information
johnlange2 authored Nov 15, 2022
2 parents e29d3a1 + 995d583 commit 00e1b69
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion samples/tmo_shell/src/tmo_ble_demo.c
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ static ssize_t battery_power_source_get(struct bt_conn *conn,
uint8_t charging, vbus, battery_attached, fault;

get_battery_charging_status(&charging, &vbus, &battery_attached, &fault);
if (vbus) {
if (vbus || !battery_attached) {
power_source = ON_CHARGER_POWER;
} else {
power_source = ON_BATTERY_POWER;
Expand Down

0 comments on commit 00e1b69

Please sign in to comment.