mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-24 06:29:18 +02:00
reformat: remove redundant qualifiers
This commit is contained in:
@@ -624,7 +624,7 @@ struct TCommand
|
||||
/// <summary>Second numeric argument.</summary>
|
||||
double Value2 = 0.0;
|
||||
/// <summary>Coupling flag controlling how the command propagates between vehicles.</summary>
|
||||
int Coupling{coupling::control}; // coupler flag used to determine command propagation
|
||||
int Coupling{control}; // coupler flag used to determine command propagation
|
||||
/// <summary>World-space location associated with the command.</summary>
|
||||
TLocation Location;
|
||||
};
|
||||
@@ -1210,10 +1210,10 @@ struct TCoupling
|
||||
double FmaxC = 1000.0;
|
||||
double beta = 0.0;
|
||||
TCouplerType CouplerType = TCouplerType::NoCoupler; /*typ sprzegu*/
|
||||
int AutomaticCouplingFlag = coupling::coupler;
|
||||
int AllowedFlag = coupling::coupler | coupling::brakehose; // Ra: maska dostępnych
|
||||
int PowerFlag = coupling::power110v | coupling::power24v;
|
||||
int PowerCoupling = coupling::permanent; // type of coupling required for power transfer
|
||||
int AutomaticCouplingFlag = coupler;
|
||||
int AllowedFlag = coupler | brakehose; // Ra: maska dostępnych
|
||||
int PowerFlag = power110v | power24v;
|
||||
int PowerCoupling = permanent; // type of coupling required for power transfer
|
||||
/*zmienne*/
|
||||
bool AutomaticCouplingAllowed{true}; // whether automatic coupling can be currently performed
|
||||
int CouplingFlag = 0; /*0 - wirtualnie, 1 - sprzegi, 2 - pneumatycznie, 4 - sterowanie, 8 - kabel mocy*/
|
||||
@@ -1424,10 +1424,10 @@ class TMoverParameters
|
||||
struct door_data
|
||||
{
|
||||
// config
|
||||
control_t open_control{control_t::passenger};
|
||||
control_t open_control{passenger};
|
||||
float open_rate{1.f};
|
||||
float open_delay{0.f};
|
||||
control_t close_control{control_t::passenger};
|
||||
control_t close_control{passenger};
|
||||
float close_rate{1.f};
|
||||
float close_delay{0.f};
|
||||
int type{2};
|
||||
@@ -2317,7 +2317,7 @@ class TMoverParameters
|
||||
double ShowEngineRotation(int VehN);
|
||||
|
||||
// Q *******************************************************************************************
|
||||
double GetTrainsetVoltage(int const Coupling = coupling::heating | coupling::highvoltage) const;
|
||||
double GetTrainsetVoltage(int const Coupling = heating | highvoltage) const;
|
||||
double GetTrainsetHighVoltage() const;
|
||||
bool switch_physics(bool const State);
|
||||
double LocalBrakeRatio(void);
|
||||
@@ -2330,10 +2330,10 @@ class TMoverParameters
|
||||
double EngineMaxRPM() const;
|
||||
|
||||
/*! przesylanie komend sterujacych*/
|
||||
bool SendCtrlToNext(std::string const CtrlCommand, double const ctrlvalue, double const dir, int const Couplertype = coupling::control);
|
||||
bool SetInternalCommand(std::string NewCommand, double NewValue1, double NewValue2, int const Couplertype = coupling::control);
|
||||
bool SendCtrlToNext(std::string const CtrlCommand, double const ctrlvalue, double const dir, int const Couplertype = control);
|
||||
bool SetInternalCommand(std::string NewCommand, double NewValue1, double NewValue2, int const Couplertype = control);
|
||||
double GetExternalCommand(std::string &Command);
|
||||
bool RunCommand(std::string Command, double CValue1, double CValue2, int const Couplertype = coupling::control);
|
||||
bool RunCommand(std::string Command, double CValue1, double CValue2, int const Couplertype = control);
|
||||
bool RunInternalCommand();
|
||||
void PutCommand(std::string NewCommand, double NewValue1, double NewValue2, const TLocation &NewLocation);
|
||||
bool CabActivisation(bool const Enforce = false);
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1715,7 +1715,7 @@ double TLSt::GetPF(double const PP, double const dt, double const Vel)
|
||||
SoundFlag |= sf_CylU;
|
||||
}
|
||||
// equivalent of checkreleaser() in the base class?
|
||||
const bool is_releasing = BrakeStatus & b_rls || UniversalFlag & TUniversalBrake::ub_Release;
|
||||
const bool is_releasing = BrakeStatus & b_rls || UniversalFlag & ub_Release;
|
||||
if (is_releasing)
|
||||
{
|
||||
if (CVP < 0.0)
|
||||
@@ -1779,7 +1779,7 @@ double TLSt::GetPF(double const PP, double const dt, double const Vel)
|
||||
if (EDFlag > 0.2)
|
||||
temp = 10000;
|
||||
double tempasb = 0;
|
||||
if ((UniversalFlag & TUniversalBrake::ub_AntiSlipBrake) > 0 || (BrakeStatus & b_asb_unbrake) == b_asb_unbrake)
|
||||
if ((UniversalFlag & ub_AntiSlipBrake) > 0 || (BrakeStatus & b_asb_unbrake) == b_asb_unbrake)
|
||||
tempasb = ASBP;
|
||||
// powtarzacz — podwojny zawor zwrotny
|
||||
temp = std::max(((CVP - BCP) * BVM + tempasb) / temp, LBP);
|
||||
@@ -2001,7 +2001,7 @@ double TEStED::GetPF(double const PP, double const dt, double const Vel)
|
||||
// powtarzacz — podwojny zawor zwrotny
|
||||
temp = std::max(LoadC * BCP / temp * std::clamp(1 - EDFlag, 0., 1.), LBP);
|
||||
|
||||
if ((UniversalFlag & TUniversalBrake::ub_AntiSlipBrake) > 0)
|
||||
if ((UniversalFlag & ub_AntiSlipBrake) > 0)
|
||||
temp = std::max(temp, ASBP);
|
||||
|
||||
double speed = 1;
|
||||
@@ -3304,7 +3304,7 @@ double TMHZ_EN57::GetPF(double i_bcp, double PP, double HP, double dt, double ep
|
||||
ActFlowSpeed = 4;
|
||||
|
||||
double uop = UnbrakeOverPressure; // unbrake over pressure in actual state
|
||||
ManualOvrldActive = UniversalFlag & TUniversalBrake::ub_HighPressure; // button is pressed
|
||||
ManualOvrldActive = UniversalFlag & ub_HighPressure; // button is pressed
|
||||
if (ManualOvrld && !ManualOvrldActive) // no overpressure for not pressed button if it does not exists
|
||||
uop = 0;
|
||||
|
||||
@@ -3329,7 +3329,7 @@ double TMHZ_EN57::GetPF(double i_bcp, double PP, double HP, double dt, double ep
|
||||
else
|
||||
dpMainValve = PFVd(PP, 0, ActFlowSpeed / LBDelay, dpPipe, 0.4);
|
||||
|
||||
if ((EQ(i_bcp, -1) && AutoOvrld) || (i_bcp < 0.5 && UniversalFlag & TUniversalBrake::ub_Overload))
|
||||
if ((EQ(i_bcp, -1) && AutoOvrld) || (i_bcp < 0.5 && UniversalFlag & ub_Overload))
|
||||
{
|
||||
if (TP < 5)
|
||||
TP = TP + dt; // 5/10
|
||||
@@ -3522,7 +3522,7 @@ double TMHZ_K5P::GetPF(double i_bcp, double PP, double HP, double dt, double ep)
|
||||
CP = CP + 9 * std::min(abs(LimCP - CP), 0.05) * PR(CP, LimCP) * dt; // zbiornik sterujacy
|
||||
|
||||
double uop = UnbrakeOverPressure; // unbrake over pressure in actual state
|
||||
ManualOvrldActive = UniversalFlag & TUniversalBrake::ub_HighPressure; // button is pressed
|
||||
ManualOvrldActive = UniversalFlag & ub_HighPressure; // button is pressed
|
||||
if (ManualOvrld && !ManualOvrldActive) // no overpressure for not pressed button if it does not exists
|
||||
uop = 0;
|
||||
|
||||
@@ -3546,7 +3546,7 @@ double TMHZ_K5P::GetPF(double i_bcp, double PP, double HP, double dt, double ep)
|
||||
else
|
||||
dpMainValve = PFVd(PP, 0, ActFlowSpeed / LBDelay, dpPipe, 0.4);
|
||||
|
||||
if ((EQ(i_bcp, -1) && AutoOvrld) || (i_bcp < 0.5 && UniversalFlag & TUniversalBrake::ub_Overload))
|
||||
if ((EQ(i_bcp, -1) && AutoOvrld) || (i_bcp < 0.5 && UniversalFlag & ub_Overload))
|
||||
{
|
||||
if (TP < OverloadMaxPressure)
|
||||
TP = TP + 0.03 * dt;
|
||||
@@ -3707,7 +3707,7 @@ double TMHZ_6P::GetPF(double i_bcp, double PP, double HP, double dt, double ep)
|
||||
dpPipe = std::min(HP, CP + TP + RedAdj);
|
||||
|
||||
double uop = UnbrakeOverPressure; // unbrake over pressure in actual state
|
||||
ManualOvrldActive = UniversalFlag & TUniversalBrake::ub_HighPressure; // button is pressed
|
||||
ManualOvrldActive = UniversalFlag & ub_HighPressure; // button is pressed
|
||||
if (ManualOvrld && !ManualOvrldActive) // no overpressure for not pressed button if it does not exists
|
||||
uop = 0;
|
||||
|
||||
@@ -3729,7 +3729,7 @@ double TMHZ_6P::GetPF(double i_bcp, double PP, double HP, double dt, double ep)
|
||||
else
|
||||
dpMainValve = PFVd(PP, 0, ActFlowSpeed / LBDelay, dpPipe, 0.4);
|
||||
|
||||
if ((EQ(i_bcp, -1) && AutoOvrld) || (i_bcp < 0.5 && UniversalFlag & TUniversalBrake::ub_Overload))
|
||||
if ((EQ(i_bcp, -1) && AutoOvrld) || (i_bcp < 0.5 && UniversalFlag & ub_Overload))
|
||||
{
|
||||
if (TP < OverloadMaxPressure)
|
||||
TP = TP + 0.03 * dt;
|
||||
|
||||
Reference in New Issue
Block a user