Skip to content

Commit 7c1edb3

Browse files
authored
Merge pull request #120 from tmobile/tmo-CFSPDK-1050-Remove-battery-attached-check-when-discharging
Remove battery attached check when discharging
2 parents 438dcf9 + 730cf65 commit 7c1edb3

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

samples/tmo_shell/src/tmo_shell.c

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2148,14 +2148,9 @@ int cmd_battery_discharge(const struct shell *shell, size_t argc, char **argv)
21482148
}
21492149

21502150
while (percent > set_point) {
2151-
get_battery_charging_status(&charging, &vbus, &battery_attached, &fault);
2152-
if (battery_attached != 0) {
2153-
millivolts = read_battery_voltage();
2154-
millivolts_to_percent(millivolts, &percent);
2155-
} else {
2156-
shell_error(shell, "Battery not attached, aborting...");
2157-
return -ENOEXEC;
2158-
}
2151+
millivolts = read_battery_voltage();
2152+
millivolts_to_percent(millivolts, &percent);
2153+
21592154
if ((abs(old_percent - percent) > 5) && ((percent % 5) == 0)) {
21602155
shell_print(shell, "Battery level is now (%d%%)...", percent);
21612156
old_percent = percent;

0 commit comments

Comments
 (0)