Skip to content

Commit

Permalink
Fix SimpBMS MaxChargingCurrent scaling
Browse files Browse the repository at this point in the history
  • Loading branch information
chrskly committed Jan 22, 2025
1 parent e83e9f4 commit 99b997f
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 99b997f

Please sign in to comment.