diff --git a/include/simpbms.h b/include/simpbms.h index 88ad071..b4e4805 100644 --- a/include/simpbms.h +++ b/include/simpbms.h @@ -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; diff --git a/src/simpbms.cpp b/src/simpbms.cpp index 740a5f1..8590e40 100644 --- a/src/simpbms.cpp +++ b/src/simpbms.cpp @@ -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.