diff options
-rw-r--r-- | driver/battery/bq27541.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/driver/battery/bq27541.c b/driver/battery/bq27541.c index 31d0292907..cd511bd749 100644 --- a/driver/battery/bq27541.c +++ b/driver/battery/bq27541.c @@ -261,7 +261,7 @@ enum battery_present battery_is_present(void) { int v; if (bq27541_read(REG_TEMPERATURE, &v)) - return BP_NOT_SURE; + return BP_NO; return BP_YES; } @@ -307,7 +307,9 @@ void battery_get_params(struct batt_params *batt) batt->flags |= BATT_FLAG_RESPONSIVE; batt->is_present = BP_YES; } else { - batt->is_present = BP_NOT_SURE; + + /* If all of those reads error, the battery is not present */ + batt->is_present = BP_NO; } v = 0; |