Skip to content

Commit 00e1b69

Browse files
authored
Merge pull request #24 from tmobile/tmo-CFSPDK-874
Fixed "plugged in" state report being incorrect when no battery is attached
2 parents e29d3a1 + 995d583 commit 00e1b69

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

samples/tmo_shell/src/tmo_ble_demo.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ static ssize_t battery_power_source_get(struct bt_conn *conn,
222222
uint8_t charging, vbus, battery_attached, fault;
223223

224224
get_battery_charging_status(&charging, &vbus, &battery_attached, &fault);
225-
if (vbus) {
225+
if (vbus || !battery_attached) {
226226
power_source = ON_CHARGER_POWER;
227227
} else {
228228
power_source = ON_BATTERY_POWER;

0 commit comments

Comments
 (0)