Skip to content

Commit

Permalink
Fix typo in Battery.cpp
Browse files Browse the repository at this point in the history
When the limit is valid, use the actual configured limit, not the bool value :)
  • Loading branch information
ranma committed Sep 28, 2024
1 parent cb7c169 commit be23665
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Battery.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ float BatteryClass::getDischargeCurrentLimit()
}

if (dischargeCurrentValid) {
return dischargeCurrentValid;
return dischargeCurrentLimit;
}

return FLT_MAX;
Expand Down

0 comments on commit be23665

Please sign in to comment.