Skip to content

Commit

Permalink
fixed errors
Browse files Browse the repository at this point in the history
  • Loading branch information
bruno3634-gif committed Aug 31, 2024
1 parent cab7aa5 commit 503ef51
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/store.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,7 @@ void store::parseBson(std::vector<std::uint8_t> v){
error_map["SOC warning"] = t.decoded;
scribeError("SOC warning",WARNING);
}
}
else{
if(error_map.find("SOC warning") == error_map.end()){
error_map.erase("SOC warning");
Expand Down Expand Up @@ -425,6 +426,7 @@ void store::parseBson(std::vector<std::uint8_t> v){
error_map["Motor temperature warning"] = j[BSON_MOTORTEMPERATURE];
scribeError("Motor temperature warning",WARNING);
}
}
else{
if(error_map.find("Motor temperature warning") == error_map.end()){
error_map.erase("Motor temperature warning");
Expand Down Expand Up @@ -464,8 +466,8 @@ void store::parseBson(std::vector<std::uint8_t> v){
if(j.contains(BSON_INVERTERTEMPERATURE)){
int temp = j[BSON_INVERTERTEMPERATURE];
this->setInverterTemperature(temp);
if(t.decoded<= INVERTER_TEMPERATURE_WARNING && error_map.find("Inverter temperature warning") != error_map.end()){
error_map["Inverter temperature warning"] = t.decoded;
if(temp<= INVERTER_TEMPERATURE_WARNING && error_map.find("Inverter temperature warning") != error_map.end()){
error_map["Inverter temperature warning"] = temp;
scribeError("Inverter temperature warning",WARNING);
}
else{
Expand Down

0 comments on commit 503ef51

Please sign in to comment.