mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-12-01 03:37:09 +01:00
refactor(physics): the definition of the brakes apart from their state
What the .fiz gives about the brakes of a vehicle (the kinds of the brake
system, the valves and the handles, the cylinders and the rigging, the pipe
pressures, the delays and the modes it can be set to: 35 fields) moves into
physics::Braking::Config, held as brakes.config, set as the vehicle loads and
not changed after. Six fields that sat with the definition but change in the
run (the weighted pressures of the handle position, the universal buttons
pressed, the load setting, the control reservoir, the emergency valve, the
lock of the pipe) go with the state.
No change in behaviour: the golden traces recorded on dfb43c4f match bit for bit.
This commit is contained in:
@@ -490,7 +490,7 @@ TController::cue_action( driver_hint const Action, float const Actionparameter )
|
||||
hint(
|
||||
Action,
|
||||
[this]( float const /*Parameter*/ ) {
|
||||
return occupied->brakes.localKind != TLocalBrake::ManualBrake || occupied->brakes.hasHandBrake == false || occupied->brakes.handBrakePosition == ManualBrakePosNo; } );
|
||||
return occupied->brakes.config.localKind != TLocalBrake::ManualBrake || occupied->brakes.config.hasHandBrake == false || occupied->brakes.handBrakePosition == ManualBrakePosNo; } );
|
||||
break;
|
||||
}
|
||||
case driver_hint::manualbrakoff: {
|
||||
@@ -501,7 +501,7 @@ TController::cue_action( driver_hint const Action, float const Actionparameter )
|
||||
hint(
|
||||
Action,
|
||||
[this]( float const /*Parameter*/ ) {
|
||||
return occupied->brakes.localKind != TLocalBrake::ManualBrake || occupied->brakes.hasHandBrake == false || occupied->brakes.handBrakePosition == 0; } );
|
||||
return occupied->brakes.config.localKind != TLocalBrake::ManualBrake || occupied->brakes.config.hasHandBrake == false || occupied->brakes.handBrakePosition == 0; } );
|
||||
break;
|
||||
}
|
||||
// master controller
|
||||
@@ -818,7 +818,7 @@ TController::cue_action( driver_hint const Action, float const Actionparameter )
|
||||
hint(
|
||||
Action,
|
||||
[this](float const /*Parameter*/) {
|
||||
return is_equal(occupied->brakes.handlePositionSmooth, occupied->brakes.driverValve->GetPos(bh_RP), 0.2) || (occupied->brakes.driverValve->Time && occupied->brakes.driverValve->GetCP() > occupied->brakes.pipeHighPressure - 0.05); } );
|
||||
return is_equal(occupied->brakes.handlePositionSmooth, occupied->brakes.driverValve->GetPos(bh_RP), 0.2) || (occupied->brakes.driverValve->Time && occupied->brakes.driverValve->GetCP() > occupied->brakes.config.pipeHighPressure - 0.05); } );
|
||||
// return ( BrakeCtrlPosition == gbh_RP ); } );
|
||||
break;
|
||||
}
|
||||
@@ -1001,7 +1001,7 @@ TController::cue_action( driver_hint const Action, float const Actionparameter )
|
||||
hint(
|
||||
Action,
|
||||
[this](float const /*Parameter*/) {
|
||||
return mvControlling->brakes.antiSlipType != 1 || (mvControlling->brakes.distributor->GetBrakeStatus() & b_asb) != 0 || mvControlling->SlippingWheels == false; } );
|
||||
return mvControlling->brakes.config.antiSlipType != 1 || (mvControlling->brakes.distributor->GetBrakeStatus() & b_asb) != 0 || mvControlling->SlippingWheels == false; } );
|
||||
break;
|
||||
}
|
||||
// horns
|
||||
|
||||
Reference in New Issue
Block a user