18
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-11-21 13:15:02 +01:00

Merge remote-tracking branch 'origin/master' into fix/freight-brake-setting-cw1

# Conflicts:
#	CMakeLists.txt
This commit is contained in:
jerrrrycho
2026-11-08 21:15:31 +01:00
86 changed files with 3447 additions and 124 deletions

View File

@@ -261,6 +261,22 @@ enum class range_t
/// <summary>Affects the entire consist.</summary>
consist
};
/// <summary>State of the door closure signalling (SOD) of a vehicle or a consist, ordered from the least to the most
/// severe: the state of a consist is the most severe state of its vehicles.</summary>
enum class door_closure_t
{
/// <summary>No doors worked by the crew: the vehicle doesn't take part in the signalling.</summary>
none,
/// <summary>All doors closed and locked: they can't be opened.</summary>
locked,
/// <summary>All doors closed, but released: a permit is given, or no lock holds them shut.</summary>
released,
/// <summary>A door is open, or not fully closed yet.</summary>
open
};
/// <summary>Whether the door closure signalling lamp is lit: steadily for locked doors, in the lit phase of the
/// blinking for released ones, never with a door open or with no doors signalled.</summary>
bool door_closure_lamp(door_closure_t const State, bool const BlinkLit);
/// <summary>Possible settings for an enable/disable input pair (mutually exclusive).</summary>
enum class operation_t
{
@@ -1439,6 +1455,7 @@ class TMoverParameters
float auto_velocity{-1.f}; // automatic door closure velocity threshold
bool auto_include_remote{false}; // automatic door closure applies also to remote control
bool permit_needed{false};
bool closure_signal{false}; // the door closure lamp (SOD) of the cab signals the doors of the whole consist in three states
std::vector<int> permit_presets; // permit presets selectable with preset switch
float voltage{0.f}; // power type required for door movement
// ld inputs
@@ -2596,6 +2613,10 @@ class TMoverParameters
bool LockDoors(bool const State, range_t const Notify = range_t::consist);
bool signal_departure(bool const State, range_t const Notify = range_t::consist); // toggles departure warning
void update_doors(double const Deltatime); // door controller update
door_closure_t door_closure() const; // state of the door closure signalling of this vehicle
// whether the door closure lamp in the cab of this vehicle is lit: with DoorClosureSignal, for the given state of the
// consist; without it, for the lock of the vehicle's own doors, as the lamp always worked
bool door_closure_lamp_lit(door_closure_t const Consist, bool const BlinkLit) const;
/* funkcje dla samochodow*/
bool ChangeOffsetH(double DeltaOffset);