Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "ISA Shunt UDCsw" #165

Merged
merged 1 commit into from
Feb 26, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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