mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-18 03:09:18 +02:00
Add variable door lock speed
DoorLockSpeed in Doors: section in fiz
This commit is contained in:
@@ -959,6 +959,7 @@ private:
|
|||||||
std::array<basic_door, 2> instances; // door on the right and left side of the vehicle
|
std::array<basic_door, 2> instances; // door on the right and left side of the vehicle
|
||||||
// ld outputs
|
// ld outputs
|
||||||
bool is_locked { false };
|
bool is_locked { false };
|
||||||
|
double doorLockSpeed = 10.0; // predkosc przy ktorej wyzwalana jest blokada drzwi
|
||||||
};
|
};
|
||||||
|
|
||||||
struct water_heater {
|
struct water_heater {
|
||||||
|
|||||||
@@ -8617,8 +8617,7 @@ TMoverParameters::update_doors( double const Deltatime ) {
|
|||||||
|
|
||||||
Doors.is_locked =
|
Doors.is_locked =
|
||||||
( true == Doors.has_lock )
|
( true == Doors.has_lock )
|
||||||
&& ( true == Doors.lock_enabled )
|
&& ( true == Doors.lock_enabled ) && (Vel >= doorLockSpeed);
|
||||||
&& ( Vel >= 10.0 );
|
|
||||||
|
|
||||||
for( auto &door : Doors.instances ) {
|
for( auto &door : Doors.instances ) {
|
||||||
// revoke permit if...
|
// revoke permit if...
|
||||||
@@ -10292,7 +10291,7 @@ void TMoverParameters::LoadFIZ_Doors( std::string const &line ) {
|
|||||||
extract_value( Doors.has_warning, "DoorClosureWarning", line, "" );
|
extract_value( Doors.has_warning, "DoorClosureWarning", line, "" );
|
||||||
extract_value( Doors.has_autowarning, "DoorClosureWarningAuto", line, "" );
|
extract_value( Doors.has_autowarning, "DoorClosureWarningAuto", line, "" );
|
||||||
extract_value( Doors.has_lock, "DoorBlocked", line, "" );
|
extract_value( Doors.has_lock, "DoorBlocked", line, "" );
|
||||||
|
extract_value(Doors.doorLockSpeed, "DoorLockSpeed", line, "");
|
||||||
{
|
{
|
||||||
auto const remotedoorcontrol {
|
auto const remotedoorcontrol {
|
||||||
( Doors.open_control == control_t::driver )
|
( Doors.open_control == control_t::driver )
|
||||||
|
|||||||
Reference in New Issue
Block a user