Skip to content

Commit

Permalink
Merge pull request #146 from chrskly/simpbms_maxchargecurrent_scaling
Browse files Browse the repository at this point in the history
Fix SimpBMS MaxChargingCurrent scaling
  • Loading branch information
Tom-evnut authored Jan 25, 2025
2 parents e83e9f4 + 99b997f commit 6546abd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion include/simpbms.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class SimpBMS: public BMS
private:
bool BMSDataValid();
bool ChargeAllowed();
int chargeCurrentLimit = 0;
int chargeCurrentLimit = 0; // Sent by Simp as 0.1A per digit and stored the same way.
int timeoutCounter = 0;
float minCellV = 0;
float maxCellV = 0;
Expand Down
2 changes: 1 addition & 1 deletion src/simpbms.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ bool SimpBMS::ChargeAllowed()
float SimpBMS::MaxChargeCurrent()
{
if(!ChargeAllowed()) return 0;
return chargeCurrentLimit / 1000.0;
return chargeCurrentLimit * 0.1;
}

// Process voltage and temperature message from SimpBMS.
Expand Down

0 comments on commit 6546abd

Please sign in to comment.