Add variable door lock speed

DoorLockSpeed in Doors: section in fiz
This commit is contained in:
2025-01-06 20:46:27 +01:00
parent d66d4751c2
commit b8d7d4b096
2 changed files with 3 additions and 3 deletions

View File

@@ -959,6 +959,7 @@ private:
std::array<basic_door, 2> instances; // door on the right and left side of the vehicle
// ld outputs
bool is_locked { false };
double doorLockSpeed = 10.0; // predkosc przy ktorej wyzwalana jest blokada drzwi
};
struct water_heater {

View File

@@ -8617,8 +8617,7 @@ TMoverParameters::update_doors( double const Deltatime ) {
Doors.is_locked =
( true == Doors.has_lock )
&& ( true == Doors.lock_enabled )
&& ( Vel >= 10.0 );
&& ( true == Doors.lock_enabled ) && (Vel >= doorLockSpeed);
for( auto &door : Doors.instances ) {
// 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_autowarning, "DoorClosureWarningAuto", line, "" );
extract_value( Doors.has_lock, "DoorBlocked", line, "" );
extract_value(Doors.doorLockSpeed, "DoorLockSpeed", line, "");
{
auto const remotedoorcontrol {
( Doors.open_control == control_t::driver )