mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-03-22 15:05:03 +01:00
Vehicles with EIMCtrlType>0 use integrated controller instead of localbrake handle
This commit is contained in:
committed by
tmj-fstate
parent
ab16fc17d9
commit
3f12f9231f
39
Driver.cpp
39
Driver.cpp
@@ -2707,7 +2707,7 @@ bool TController::IncBrake()
|
||||
}
|
||||
}
|
||||
|
||||
standalone = standalone && ( mvControlling->EIMCtrlType == 0 );
|
||||
//standalone = standalone && ( mvControlling->EIMCtrlType == 0 );
|
||||
|
||||
if( true == standalone ) {
|
||||
if( mvControlling->EIMCtrlType > 0 ) {
|
||||
@@ -2855,9 +2855,11 @@ bool TController::DecBrake()
|
||||
}
|
||||
}
|
||||
if( !OK ) {
|
||||
OK = DecBrakeEIM();
|
||||
// OK = mvOccupied->DecLocalBrakeLevel(2);
|
||||
OK = mvOccupied->DecLocalBrakeLevel(2);
|
||||
}
|
||||
if (!OK) {
|
||||
OK = DecBrakeEIM();
|
||||
}
|
||||
if (mvOccupied->PipePress < 3.0)
|
||||
Need_BrakeRelease = true;
|
||||
break;
|
||||
@@ -3352,6 +3354,33 @@ void TController::SpeedCntrl(double DesiredSpeed)
|
||||
}
|
||||
};
|
||||
|
||||
void TController::SetTimeControllers()
|
||||
{
|
||||
|
||||
};
|
||||
|
||||
void TController::CheckTimeControllers()
|
||||
{
|
||||
//1. Check the type of Main Brake Handle
|
||||
|
||||
//2. Check the type of Secondary Brake Handle
|
||||
|
||||
//3. Check the type od EIMCtrlType
|
||||
if (mvOccupied->EIMCtrlType > 0)
|
||||
{
|
||||
if (mvOccupied->EIMCtrlType == 1) //traxx
|
||||
{
|
||||
if (mvOccupied->MainCtrlPos > 3) mvOccupied->MainCtrlPos = 5;
|
||||
if (mvOccupied->MainCtrlPos < 3) mvOccupied->MainCtrlPos = 1;
|
||||
}
|
||||
else if (mvOccupied->EIMCtrlType == 2) //elf
|
||||
{
|
||||
if (mvOccupied->eimic > 0) mvOccupied->MainCtrlPos = 3;
|
||||
if (mvOccupied->eimic < 0) mvOccupied->MainCtrlPos = 2;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// otwieranie/zamykanie drzwi w składzie albo (tylko AI) EZT
|
||||
void TController::Doors( bool const Open, int const Side ) {
|
||||
|
||||
@@ -4291,6 +4320,8 @@ TController::UpdateSituation(double dt) {
|
||||
auto const reactiontime = std::min( ReactionTime, 2.0 );
|
||||
if( LastReactionTime < reactiontime ) { return; }
|
||||
|
||||
CheckTimeControllers();
|
||||
|
||||
LastReactionTime -= reactiontime;
|
||||
// Ra: nie wiem czemu ReactionTime potrafi dostać 12 sekund, to jest przegięcie, bo przeżyna STÓJ
|
||||
// yB: otóż jest to jedna trzecia czasu napełniania na towarowym; może się przydać przy
|
||||
@@ -5509,7 +5540,7 @@ TController::UpdateSituation(double dt) {
|
||||
}
|
||||
}
|
||||
if (mvOccupied->BrakeSystem == TBrakeSystem::Pneumatic) // napełnianie uderzeniowe
|
||||
if (mvOccupied->BrakeHandle == TBrakeHandle::FV4a)
|
||||
if (mvOccupied->BrakeHandle == TBrakeHandle::FV4a || mvOccupied->BrakeHandle == TBrakeHandle::MHZ_6P)
|
||||
{
|
||||
if( mvOccupied->BrakeCtrlPos == -2 ) {
|
||||
mvOccupied->BrakeLevelSet( 0 );
|
||||
|
||||
Reference in New Issue
Block a user