Skip to content

Commit

Permalink
Merge pull request #165 from damienmaguire/revert-164-Tom-evnut-patch-1
Browse files Browse the repository at this point in the history
Revert "ISA Shunt UDCsw"
  • Loading branch information
Tom-evnut authored Feb 26, 2025
2 parents 4cae2d4 + a2287cc commit dab0fae
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,6 @@ float ProcessUdc(int motorSpeed)
Param::SetFloat(Param::udc, udc);
float udc2 = ((float)ISA::Voltage2)/1000;//get voltage from isa sensor and post to parameter database
Param::SetFloat(Param::udc2, udc2);
Param::SetFloat(Param::udcsw, udc2-20); //Set udcsw to 20V under battery voltage
float udc3 = ((float)ISA::Voltage3)/1000;//get voltage from isa sensor and post to parameter database
Param::SetFloat(Param::udc3, udc3);
float idc = ((float)ISA::Amperes)/1000;//get current from isa sensor and post to parameter database
Expand All @@ -372,7 +371,8 @@ float ProcessUdc(int motorSpeed)
float Amph = ((float)ISA::Ah)/3600;//get Ah from isa sensor and post to parameter database
Param::SetFloat(Param::AMPh, Amph);
float deltaVolts1 = (udc2 / 2) - udc3;
Param::SetFloat(Param::deltaV, deltaVolts1);
float deltaVolts2 = (udc2 + udc3) - udc;
Param::SetFloat(Param::deltaV, MAX(deltaVolts1, deltaVolts2));
}
else if (Param::GetInt(Param::ShuntType) == 2)//BMs Sbox
{
Expand Down

0 comments on commit dab0fae

Please sign in to comment.