Make sure single wheel braking pressure cannot exceed the normal one
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@5199 30fe4595-0a0c-4342-8851-515496e4dcbd Former-commit-id: 3e37f1503ad315c406abefd18aba444213889b58 Former-commit-id: 35334575204568ac2e2a7f5938264ab3d85c2afa
This commit is contained in:
parent
46ca5f4098
commit
08ff852c58
1 changed files with 4 additions and 4 deletions
|
@ -62,10 +62,10 @@ SimBrakeSystemUpdate(tCar *car)
|
|||
|
||||
if (car->ctrl->singleWheelBrakeMode == 1)
|
||||
{
|
||||
car->wheel[FRNT_RGT].brake.pressure = brkSyst->coeff * car->ctrl->brakeFrontRightCmd;
|
||||
car->wheel[FRNT_LFT].brake.pressure = brkSyst->coeff * car->ctrl->brakeFrontLeftCmd;
|
||||
car->wheel[REAR_RGT].brake.pressure = brkSyst->coeff * car->ctrl->brakeRearRightCmd;
|
||||
car->wheel[REAR_LFT].brake.pressure = brkSyst->coeff * car->ctrl->brakeRearLeftCmd;
|
||||
car->wheel[FRNT_RGT].brake.pressure = brkSyst->coeff * MIN(car->ctrl->brakeFrontRightCmd, brkSyst->rep);
|
||||
car->wheel[FRNT_LFT].brake.pressure = brkSyst->coeff * MIN(car->ctrl->brakeFrontLeftCmd, brkSyst->rep);
|
||||
car->wheel[REAR_RGT].brake.pressure = brkSyst->coeff * MIN(car->ctrl->brakeRearRightCmd, (1-brkSyst->rep));
|
||||
car->wheel[REAR_LFT].brake.pressure = brkSyst->coeff * MIN(car->ctrl->brakeRearLeftCmd, (1-brkSyst->rep));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue