mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-19 23:49:18 +02:00
Merge branch 'tmj-dev' into milek-dev
This commit is contained in:
130
Driver.cpp
130
Driver.cpp
@@ -796,6 +796,7 @@ TCommandType TController::TableUpdate(double &fVelDes, double &fDist, double &fN
|
||||
double v; // prędkość
|
||||
double d; // droga
|
||||
double d_to_next_sem = 10000.0; //ustaiwamy na pewno dalej niż widzi AI
|
||||
bool isatpassengerstop { false }; // true if the consist is within acceptable range of w4 post
|
||||
TCommandType go = cm_Unknown;
|
||||
eSignNext = NULL;
|
||||
// te flagi są ustawiane tutaj, w razie potrzeby
|
||||
@@ -851,25 +852,30 @@ TCommandType TController::TableUpdate(double &fVelDes, double &fDist, double &fN
|
||||
continue; // nie analizować prędkości
|
||||
}
|
||||
} // koniec obsługi przelotu na W4
|
||||
else
|
||||
{ // zatrzymanie na W4
|
||||
if (!eSignNext) //jeśli nie widzi następnego sygnału
|
||||
eSignNext = sSpeedTable[i].evEvent; //ustawia dotychczasową
|
||||
if (mvOccupied->Vel > 0.3) // jeśli jedzie (nie trzeba czekać, aż się
|
||||
// drgania wytłumią - drzwi zamykane od 1.0)
|
||||
sSpeedTable[i].fVelNext = 0; // to będzie zatrzymanie
|
||||
// else if
|
||||
// ((iDrivigFlags&moveStopCloser)?sSpeedTable[i].fDist<=fMaxProximityDist*(AIControllFlag?1.0:10.0):true)
|
||||
else if ((iDrivigFlags & moveStopCloser) ?
|
||||
sSpeedTable[i].fDist + fLength <=
|
||||
Max0R(sSpeedTable[i].evEvent->ValueGet(2),
|
||||
fMaxProximityDist + fLength) :
|
||||
sSpeedTable[i].fDist < d_to_next_sem)
|
||||
// Ra 2F1I: odległość plus długość pociągu musi być mniejsza od długości
|
||||
// peronu, chyba że pociąg jest dłuższy, to wtedy minimalna
|
||||
// jeśli długość peronu ((sSpeedTable[i].evEvent->ValueGet(2)) nie podana,
|
||||
// przyjąć odległość fMinProximityDist
|
||||
{ // jeśli się zatrzymał przy W4, albo stał w momencie zobaczenia W4
|
||||
else {
|
||||
// zatrzymanie na W4
|
||||
isatpassengerstop = (
|
||||
// Ra 2F1I: odległość plus długość pociągu musi być mniejsza od długości
|
||||
// peronu, chyba że pociąg jest dłuższy, to wtedy minimalna.
|
||||
// jeśli długość peronu ((sSpeedTable[i].evEvent->ValueGet(2)) nie podana,
|
||||
// przyjąć odległość fMinProximityDist
|
||||
( iDrivigFlags & moveStopCloser ) ?
|
||||
( sSpeedTable[ i ].fDist + fLength ) <=
|
||||
std::max(
|
||||
sSpeedTable[ i ].evEvent->ValueGet( 2 ),
|
||||
2.0 * fMaxProximityDist + fLength ) : // fmaxproximitydist typically equals ~50 m
|
||||
sSpeedTable[ i ].fDist < d_to_next_sem );
|
||||
|
||||
if( !eSignNext ) {
|
||||
//jeśli nie widzi następnego sygnału ustawia dotychczasową
|
||||
eSignNext = sSpeedTable[ i ].evEvent;
|
||||
}
|
||||
if( mvOccupied->Vel > 0.3 ) {
|
||||
// jeśli jedzie (nie trzeba czekać, aż się drgania wytłumią - drzwi zamykane od 1.0) to będzie zatrzymanie
|
||||
sSpeedTable[ i ].fVelNext = 0;
|
||||
}
|
||||
else if( true == isatpassengerstop ) {
|
||||
// jeśli się zatrzymał przy W4, albo stał w momencie zobaczenia W4
|
||||
if( !AIControllFlag ) {
|
||||
// w razie przełączenia na AI ma nie podciągać do W4, gdy użytkownik zatrzymał za daleko
|
||||
iDrivigFlags &= ~moveStopCloser;
|
||||
@@ -878,8 +884,9 @@ TCommandType TController::TableUpdate(double &fVelDes, double &fDist, double &fN
|
||||
if( ( iDrivigFlags & moveDoorOpened ) == 0 ) {
|
||||
// drzwi otwierać jednorazowo
|
||||
iDrivigFlags |= moveDoorOpened; // nie wykonywać drugi raz
|
||||
Doors( true, static_cast<int>( std::floor( sSpeedTable[ i ].evEvent->ValueGet( 2 ) ) ) % 10 );
|
||||
Doors( true, static_cast<int>( std::floor( std::abs( sSpeedTable[ i ].evEvent->ValueGet( 2 ) ) ) ) % 10 );
|
||||
}
|
||||
|
||||
if (TrainParams->UpdateMTable( simulation::Time, asNextStop) ) {
|
||||
// to się wykona tylko raz po zatrzymaniu na W4
|
||||
if( TrainParams->StationIndex < TrainParams->StationCount ) {
|
||||
@@ -889,7 +896,7 @@ TCommandType TController::TableUpdate(double &fVelDes, double &fDist, double &fN
|
||||
}
|
||||
|
||||
// perform loading/unloading
|
||||
auto const platformside = static_cast<int>( std::floor( sSpeedTable[ i ].evEvent->ValueGet( 2 ) ) ) % 10;
|
||||
auto const platformside = static_cast<int>( std::floor( std::abs( sSpeedTable[ i ].evEvent->ValueGet( 2 ) ) ) ) % 10;
|
||||
auto const exchangetime = simulation::Station.update_load( pVehicles[ 0 ], *TrainParams, platformside );
|
||||
WaitingSet( std::max( -fStopTime, exchangetime ) ); // na końcu rozkładu się ustawia 60s i tu by było skrócenie
|
||||
|
||||
@@ -933,29 +940,21 @@ TCommandType TController::TableUpdate(double &fVelDes, double &fDist, double &fN
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if (OrderCurrentGet() == Shunt)
|
||||
{
|
||||
|
||||
if (OrderCurrentGet() == Shunt) {
|
||||
OrderNext(Obey_train); // uruchomić jazdę pociągową
|
||||
CheckVehicles(); // zmienić światła
|
||||
}
|
||||
if (TrainParams->StationIndex < TrainParams->StationCount)
|
||||
{ // jeśli są dalsze stacje, czekamy do godziny odjazdu
|
||||
if (TrainParams->IsTimeToGo(simulation::Time.data().wHour, simulation::Time.data().wMinute))
|
||||
{ // z dalszą akcją czekamy do godziny odjazdu
|
||||
/* potencjalny problem z ruszaniem z w4
|
||||
if (TrainParams->CheckTrainLatency() < 0)
|
||||
WaitingSet(20); //Jak spóźniony to czeka 20s
|
||||
*/
|
||||
// iDrivigFlags|=moveLate1; //oflagować, gdy odjazd ze
|
||||
// spóźnieniem, będzie jechał forsowniej
|
||||
fLastStopExpDist =
|
||||
mvOccupied->DistCounter + 0.050 +
|
||||
0.001 * fLength; // przy jakim dystansie (stanie licznika)
|
||||
// ma przesunąć na następny postój
|
||||
// Controlled-> //zapisać odległość do przejechania
|
||||
|
||||
if (TrainParams->StationIndex < TrainParams->StationCount) {
|
||||
// jeśli są dalsze stacje, czekamy do godziny odjazdu
|
||||
if (TrainParams->IsTimeToGo(simulation::Time.data().wHour, simulation::Time.data().wMinute)) {
|
||||
// z dalszą akcją czekamy do godziny odjazdu
|
||||
isatpassengerstop = false;
|
||||
// przy jakim dystansie (stanie licznika) ma przesunąć na następny postój
|
||||
fLastStopExpDist = mvOccupied->DistCounter + 0.050 + 0.001 * fLength;
|
||||
TrainParams->StationIndexInc(); // przejście do następnej
|
||||
asNextStop = TrainParams->NextStop(); // pobranie kolejnego miejsca zatrzymania
|
||||
// TableClear(); //aby od nowa sprawdziło W4 z inną nazwą już - to nie jest dobry pomysł
|
||||
#if LOGSTOPS
|
||||
WriteLog(
|
||||
pVehicle->asName + " as " + TrainParams->TrainName
|
||||
@@ -987,8 +986,8 @@ TCommandType TController::TableUpdate(double &fVelDes, double &fDist, double &fN
|
||||
continue; // nie analizować prędkości
|
||||
} // koniec startu z zatrzymania
|
||||
} // koniec obsługi początkowych stacji
|
||||
else
|
||||
{ // jeśli dojechaliśmy do końca rozkładu
|
||||
else {
|
||||
// jeśli dojechaliśmy do końca rozkładu
|
||||
#if LOGSTOPS
|
||||
WriteLog(
|
||||
pVehicle->asName + " as " + TrainParams->TrainName
|
||||
@@ -1023,7 +1022,7 @@ TCommandType TController::TableUpdate(double &fVelDes, double &fDist, double &fN
|
||||
continue; // nie analizować prędkości
|
||||
}
|
||||
} // koniec obsługi W4
|
||||
v = sSpeedTable[i].fVelNext; // odczyt prędkości do zmiennej pomocniczej
|
||||
v = sSpeedTable[ i ].fVelNext; // odczyt prędkości do zmiennej pomocniczej
|
||||
if( sSpeedTable[ i ].iFlags & spSwitch ) {
|
||||
// zwrotnice są usuwane z tabelki dopiero po zjechaniu z nich
|
||||
iDrivigFlags |= moveSwitchFound; // rozjazd z przodu/pod ogranicza np. sens skanowania wstecz
|
||||
@@ -1187,12 +1186,13 @@ TCommandType TController::TableUpdate(double &fVelDes, double &fDist, double &fN
|
||||
{ // zawalidrogi nie ma (albo pojazd jest samochodem), sprawdzić sygnał
|
||||
if (sSpeedTable[i].iFlags & spShuntSemaphor) // jeśli Tm - w zasadzie to sprawdzić komendę!
|
||||
{ // jeśli podana prędkość manewrowa
|
||||
if ((OrderCurrentGet() & Obey_train) ? v == 0.0 : false)
|
||||
{ // jeśli tryb pociągowy a tarcze ma ShuntVelocity 0 0
|
||||
if( ( v == 0.0 ) && ( true == TestFlag( OrderCurrentGet(), Obey_train ) ) ) {
|
||||
// jeśli tryb pociągowy a tarcze ma ShuntVelocity 0 0
|
||||
v = -1; // ignorować, chyba że prędkość stanie się niezerowa
|
||||
if (sSpeedTable[i].iFlags & spElapsed) // a jak przejechana
|
||||
sSpeedTable[i].iFlags = 0; // to można usunąć, bo podstawowy automat
|
||||
// usuwa tylko niezerowe
|
||||
if( true == TestFlag( sSpeedTable[ i ].iFlags, spElapsed ) ) {
|
||||
// a jak przejechana to można usunąć, bo podstawowy automat usuwa tylko niezerowe
|
||||
sSpeedTable[ i ].iFlags = 0;
|
||||
}
|
||||
}
|
||||
else if (go == cm_Unknown) // jeśli jeszcze nie ma komendy
|
||||
if (v != 0.0) // komenda jest tylko gdy ma jechać, bo stoi na podstawie
|
||||
@@ -1266,19 +1266,19 @@ TCommandType TController::TableUpdate(double &fVelDes, double &fDist, double &fN
|
||||
}
|
||||
} // jeśli nie ma zawalidrogi
|
||||
} // jeśli event
|
||||
if (v >= 0.0)
|
||||
{ // pozycje z prędkością -1 można spokojnie pomijać
|
||||
|
||||
if (v >= 0.0) {
|
||||
// pozycje z prędkością -1 można spokojnie pomijać
|
||||
d = sSpeedTable[i].fDist;
|
||||
if( ( d > 0.0 )
|
||||
&& ( false == TestFlag( sSpeedTable[ i ].iFlags, spElapsed ) ) ) {
|
||||
// sygnał lub ograniczenie z przodu (+32=przejechane)
|
||||
// 2014-02: jeśli stoi, a ma do przejechania kawałek, to niech jedzie
|
||||
if( ( mvOccupied->Vel == 0.0 )
|
||||
&& ( d > fMaxProximityDist )
|
||||
&& ( true == TestFlag( sSpeedTable[ i ].iFlags, ( spEnabled | spEvent | spPassengerStopPoint ) ) ) ) {
|
||||
if( ( mvOccupied->Vel < 0.01 )
|
||||
&& ( true == TestFlag( sSpeedTable[ i ].iFlags, ( spEnabled | spEvent | spPassengerStopPoint ) ) )
|
||||
&& ( false == isatpassengerstop ) ) {
|
||||
// ma podjechać bliżej - czy na pewno w tym miejscu taki warunek?
|
||||
a = (
|
||||
iDrivigFlags & moveStopCloser ?
|
||||
a = ( iDrivigFlags & moveStopCloser ?
|
||||
fAcc :
|
||||
0.0 );
|
||||
}
|
||||
@@ -1348,14 +1348,16 @@ TCommandType TController::TableUpdate(double &fVelDes, double &fDist, double &fN
|
||||
VelSignalLast = -1.0; // jeśli mieliśmy ograniczenie z semafora i nie ma przed nami
|
||||
|
||||
//analiza spisanych z tabelki ograniczeń i nadpisanie aktualnego
|
||||
if (VelSignalLast >= 0.0)
|
||||
fVelDes = Min0R(fVelDes, VelSignalLast);
|
||||
if (VelLimitLast >= 0.0)
|
||||
fVelDes = Min0R(fVelDes, VelLimitLast);
|
||||
if (VelRoad >= 0.0)
|
||||
fVelDes = Min0R(fVelDes, VelRoad);
|
||||
if( VelRestricted >= 0.0 )
|
||||
fVelDes = Min0R( fVelDes, VelRestricted );
|
||||
if( ( true == isatpassengerstop ) && ( mvOccupied->Vel < 0.01 ) ) {
|
||||
// if stopped at a valid passenger stop, hold there
|
||||
fVelDes = 0.0;
|
||||
}
|
||||
else {
|
||||
fVelDes = min_speed( fVelDes, VelSignalLast );
|
||||
fVelDes = min_speed( fVelDes, VelLimitLast );
|
||||
fVelDes = min_speed( fVelDes, VelRoad );
|
||||
fVelDes = min_speed( fVelDes, VelRestricted );
|
||||
}
|
||||
// nastepnego semafora albo zwrotnicy to uznajemy, że mijamy W5
|
||||
FirstSemaphorDist = d_to_next_sem; // przepisanie znalezionej wartosci do zmiennej
|
||||
return go;
|
||||
@@ -2625,7 +2627,7 @@ bool TController::DecBrake()
|
||||
case ElectroPneumatic:
|
||||
if (mvOccupied->EngineType == ElectricInductionMotor) {
|
||||
if (mvOccupied->BrakeHandle == MHZ_EN57) {
|
||||
if (mvOccupied->BrakeCtrlPos > mvOccupied->Handle->GetPos(bh_MB))
|
||||
if (mvOccupied->BrakeCtrlPos > mvOccupied->Handle->GetPos(bh_RP))
|
||||
OK = mvOccupied->BrakeLevelAdd(-1.0);
|
||||
}
|
||||
else {
|
||||
@@ -4440,6 +4442,8 @@ TController::UpdateSituation(double dt) {
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if( VelNext == 0.0 ) {
|
||||
|
||||
47
DynObj.cpp
47
DynObj.cpp
@@ -2956,7 +2956,7 @@ bool TDynamicObject::Update(double dt, double dt1)
|
||||
p->MoverParameters->BrakeCylNo * p->MoverParameters->BrakeRigEff;
|
||||
FmaxPN += Nmax * p->MoverParameters->Hamulec->GetFC(
|
||||
Nmax / (p->MoverParameters->NAxles * p->MoverParameters->NBpA),
|
||||
p->MoverParameters->Vmax) *
|
||||
p->MoverParameters->MED_Vref) *
|
||||
1000; // sila hamowania pn
|
||||
FmaxED += ((p->MoverParameters->Mains) && (p->MoverParameters->ActiveDir != 0) &&
|
||||
(p->MoverParameters->eimc[eimc_p_Fh] * p->MoverParameters->NPoweredAxles >
|
||||
@@ -2975,7 +2975,7 @@ bool TDynamicObject::Update(double dt, double dt1)
|
||||
osie += p->MoverParameters->NAxles;
|
||||
}
|
||||
|
||||
auto const amax = FmaxPN / masamax;
|
||||
auto const amax = std::min(FmaxPN / masamax, MoverParameters->MED_amax);
|
||||
if ((MoverParameters->Vel < 0.5) && (MoverParameters->BrakePress > 0.2) ||
|
||||
(dDoorMoveL > 0.001) || (dDoorMoveR > 0.001))
|
||||
{
|
||||
@@ -3045,7 +3045,7 @@ bool TDynamicObject::Update(double dt, double dt1)
|
||||
FmaxEP[i] = Nmax *
|
||||
p->MoverParameters->Hamulec->GetFC(
|
||||
Nmax / (p->MoverParameters->NAxles * p->MoverParameters->NBpA),
|
||||
p->MoverParameters->Vmax) *
|
||||
p->MoverParameters->MED_Vref) *
|
||||
1000; // sila hamowania pn
|
||||
|
||||
PrzekrF[i] = false;
|
||||
@@ -3107,10 +3107,10 @@ bool TDynamicObject::Update(double dt, double dt1)
|
||||
p->MoverParameters->BrakeCylMult[0] -
|
||||
p->MoverParameters->BrakeSlckAdj) *
|
||||
p->MoverParameters->BrakeCylNo * p->MoverParameters->BrakeRigEff;
|
||||
float VelC = ((FrED > 0.1) || p->MoverParameters->MED_EPVC ? clamp(p->MoverParameters->Vel, p->MoverParameters->MED_Vmin, p->MoverParameters->MED_Vmax) : p->MoverParameters->MED_Vref);//korekcja EP po prędkości
|
||||
float FmaxPoj = Nmax *
|
||||
p->MoverParameters->Hamulec->GetFC(
|
||||
Nmax / (p->MoverParameters->NAxles * p->MoverParameters->NBpA),
|
||||
p->MoverParameters->Vel) *
|
||||
Nmax / (p->MoverParameters->NAxles * p->MoverParameters->NBpA), VelC) *
|
||||
1000; // sila hamowania pn
|
||||
p->MoverParameters->LocalBrakePosA = (p->MoverParameters->SlippingWheels ? 0 : FzEP[i] / FmaxPoj);
|
||||
if (p->MoverParameters->LocalBrakePosA>0.009)
|
||||
@@ -6121,40 +6121,31 @@ TDynamicObject::powertrain_sounds::render( TMoverParameters const &Vehicle, doub
|
||||
if( Vehicle.TurboTest > 0 ) {
|
||||
// udawanie turbo:
|
||||
auto const goalpitch { std::max( 0.025, ( engine_volume + engine_turbo.m_frequencyoffset ) * engine_turbo.m_frequencyfactor ) };
|
||||
auto const goalvolume { std::max( 0.0, ( engine_turbo_pitch + engine_turbo.m_amplitudeoffset ) * engine_turbo.m_amplitudefactor ) };
|
||||
auto const goalvolume { (
|
||||
( ( Vehicle.MainCtrlPos >= Vehicle.TurboTest ) && ( Vehicle.enrot > 0.1 ) ) ?
|
||||
std::max( 0.0, ( engine_turbo_pitch + engine_turbo.m_amplitudeoffset ) * engine_turbo.m_amplitudefactor ) :
|
||||
0.0 ) };
|
||||
auto const currentvolume { engine_turbo.gain() };
|
||||
auto const changerate { 0.4 * Deltatime };
|
||||
|
||||
if( ( Vehicle.MainCtrlPos >= Vehicle.TurboTest )
|
||||
&& ( Vehicle.enrot > 0.1 ) ) {
|
||||
engine_turbo_pitch = (
|
||||
engine_turbo_pitch > goalpitch ?
|
||||
std::max( goalpitch, engine_turbo_pitch - changerate * 0.5 ) :
|
||||
std::min( goalpitch, engine_turbo_pitch + changerate ) );
|
||||
|
||||
engine_turbo_pitch = (
|
||||
engine_turbo_pitch > goalpitch ?
|
||||
std::max( goalpitch, engine_turbo_pitch - changerate * 0.5 ) :
|
||||
std::min( goalpitch, engine_turbo_pitch + changerate ) );
|
||||
|
||||
volume = (
|
||||
currentvolume > goalvolume ?
|
||||
std::max( goalvolume, currentvolume - changerate ) :
|
||||
std::min( goalvolume, currentvolume + changerate ) );
|
||||
volume = (
|
||||
currentvolume > goalvolume ?
|
||||
std::max( goalvolume, currentvolume - changerate ) :
|
||||
std::min( goalvolume, currentvolume + changerate ) );
|
||||
|
||||
if( volume > 0.05 ) {
|
||||
engine_turbo
|
||||
.pitch( 0.4 + engine_turbo_pitch * 0.4 )
|
||||
.gain( volume )
|
||||
.play( sound_flags::exclusive | sound_flags::looping );
|
||||
}
|
||||
else {
|
||||
engine_turbo_pitch = std::max( goalpitch, engine_turbo_pitch - changerate * 0.5 );
|
||||
volume = std::max( 0.0, engine_turbo.gain() - 2.0 * Deltatime );
|
||||
if( volume > 0.05 ) {
|
||||
engine_turbo
|
||||
.pitch( 0.4 + engine_turbo_pitch * 0.4 )
|
||||
.gain( volume );
|
||||
}
|
||||
else {
|
||||
engine_turbo.stop();
|
||||
engine_turbo_pitch = goalpitch;
|
||||
}
|
||||
engine_turbo.stop();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -922,9 +922,16 @@ public:
|
||||
double Ftmax = 0.0;
|
||||
/*- dla lokomotyw z silnikami indukcyjnymi -*/
|
||||
double eimc[26];
|
||||
bool EIMCLogForce; //
|
||||
bool EIMCLogForce = false; //
|
||||
static std::vector<std::string> const eimc_labels;
|
||||
double InverterFrequency { 0.0 }; // current frequency of power inverters
|
||||
/* -dla pojazdów z blendingiem EP/ED (MED) */
|
||||
double MED_Vmax = 0; // predkosc maksymalna dla obliczen chwilowej sily hamowania EP w MED
|
||||
double MED_Vmin = 0; // predkosc minimalna dla obliczen chwilowej sily hamowania EP w MED
|
||||
double MED_Vref = 0; // predkosc referencyjna dla obliczen dostepnej sily hamowania EP w MED
|
||||
double MED_amax = 9.81; // maksymalne opoznienie hamowania sluzbowego MED
|
||||
bool MED_EPVC = 0; // czy korekcja sily hamowania EP, gdy nie ma dostepnego ED
|
||||
bool MED_Ncor = 0; // czy korekcja sily hamowania z uwzglednieniem nacisku
|
||||
/*-dla wagonow*/
|
||||
float MaxLoad = 0.f; /*masa w T lub ilosc w sztukach - ladownosc*/
|
||||
std::string LoadAccepted; std::string LoadQuantity; /*co moze byc zaladowane, jednostki miary*/
|
||||
@@ -1375,6 +1382,7 @@ private:
|
||||
void LoadFIZ_BuffCoupl( std::string const &line, int const Index );
|
||||
void LoadFIZ_TurboPos( std::string const &line );
|
||||
void LoadFIZ_Cntrl( std::string const &line );
|
||||
void LoadFIZ_Blending(std::string const &line);
|
||||
void LoadFIZ_Light( std::string const &line );
|
||||
void LoadFIZ_Security( std::string const &line );
|
||||
void LoadFIZ_Clima( std::string const &line );
|
||||
|
||||
@@ -3329,7 +3329,7 @@ void TMoverParameters::CompressorCheck(double dt)
|
||||
{ // zasilanie sprężarki w członie ra z członu silnikowego (sprzęg 1)
|
||||
if( Couplers[ side::rear ].Connected != NULL ) {
|
||||
CompressorFlag = (
|
||||
( ( CompressorAllow ) || ( CompressorStart == start::automatic ) )
|
||||
( ( Couplers[ side::rear ].Connected->CompressorAllow ) || ( CompressorStart == start::automatic ) )
|
||||
&& ( CompressorAllowLocal )
|
||||
&& ( Couplers[ side::rear ].Connected->ConverterFlag ) );
|
||||
}
|
||||
@@ -3342,7 +3342,7 @@ void TMoverParameters::CompressorCheck(double dt)
|
||||
{ // zasilanie sprężarki w członie ra z członu silnikowego (sprzęg 1)
|
||||
if( Couplers[ side::front ].Connected != NULL ) {
|
||||
CompressorFlag = (
|
||||
( ( CompressorAllow ) || ( CompressorStart == start::automatic ) )
|
||||
( ( Couplers[ side::front ].Connected->CompressorAllow ) || ( CompressorStart == start::automatic ) )
|
||||
&& ( CompressorAllowLocal )
|
||||
&& ( Couplers[ side::front ].Connected->ConverterFlag ) );
|
||||
}
|
||||
@@ -3405,7 +3405,7 @@ void TMoverParameters::CompressorCheck(double dt)
|
||||
{ // zasilanie sprężarki w członie ra z członu silnikowego (sprzęg 1)
|
||||
if( Couplers[ side::rear ].Connected != NULL ) {
|
||||
CompressorFlag = (
|
||||
( ( CompressorAllow ) || ( CompressorStart == start::automatic ) )
|
||||
( ( Couplers[ side::rear ].Connected->CompressorAllow ) || ( CompressorStart == start::automatic ) )
|
||||
&& ( CompressorAllowLocal )
|
||||
&& ( Couplers[ side::rear ].Connected->ConverterFlag ) );
|
||||
}
|
||||
@@ -3418,7 +3418,7 @@ void TMoverParameters::CompressorCheck(double dt)
|
||||
{ // zasilanie sprężarki w członie ra z członu silnikowego (sprzęg 1)
|
||||
if( Couplers[ side::front ].Connected != NULL ) {
|
||||
CompressorFlag = (
|
||||
( ( CompressorAllow ) || ( CompressorStart == start::automatic ) )
|
||||
( ( Couplers[ side::front ].Connected->CompressorAllow ) || ( CompressorStart == start::automatic ) )
|
||||
&& ( CompressorAllowLocal )
|
||||
&& ( Couplers[ side::front ].Connected->ConverterFlag ) );
|
||||
}
|
||||
@@ -7430,6 +7430,14 @@ bool TMoverParameters::LoadFIZ(std::string chkpath)
|
||||
continue;
|
||||
}
|
||||
|
||||
if (issection("Blending:", inputline)) {
|
||||
|
||||
startBPT = true; LISTLINE = 0;
|
||||
fizlines.emplace( "Blending", inputline);
|
||||
LoadFIZ_Blending( inputline );
|
||||
continue;
|
||||
}
|
||||
|
||||
if( issection( "Light:", inputline ) ) {
|
||||
|
||||
startBPT = false;
|
||||
@@ -8193,6 +8201,16 @@ void TMoverParameters::LoadFIZ_Cntrl( std::string const &line ) {
|
||||
}
|
||||
}
|
||||
|
||||
void TMoverParameters::LoadFIZ_Blending(std::string const &line) {
|
||||
|
||||
extract_value(MED_Vmax, "MED_Vmax", line, to_string(Vmax));
|
||||
extract_value(MED_Vmin, "MED_Vmin", line, "0");
|
||||
extract_value(MED_Vref, "MED_Vref", line, to_string(Vmax));
|
||||
extract_value(MED_amax, "MED_amax", line, "9.81");
|
||||
MED_EPVC = (extract_value("MED_EPVC", line).find("Yes") != std::string::npos);
|
||||
MED_Ncor = (extract_value("MED_Ncor", line).find("Yes") != std::string::npos);
|
||||
|
||||
}
|
||||
void TMoverParameters::LoadFIZ_Light( std::string const &line ) {
|
||||
|
||||
LightPowerSource.SourceType = LoadFIZ_SourceDecode( extract_value( "Light", line ) );
|
||||
|
||||
@@ -334,9 +334,9 @@ keyboard_input::default_bindings() {
|
||||
// epbrakecontroltoggle
|
||||
{ GLFW_KEY_Z | keymodifier::control },
|
||||
// trainbrakeoperationmodeincrease
|
||||
{ GLFW_KEY_KP_3 | keymodifier::shift | keymodifier::control },
|
||||
{ GLFW_KEY_KP_2 | keymodifier::control },
|
||||
// trainbrakeoperationmodedecrease
|
||||
{ GLFW_KEY_KP_9 | keymodifier::shift | keymodifier::control },
|
||||
{ GLFW_KEY_KP_8 | keymodifier::control },
|
||||
// brakeactingspeedincrease
|
||||
{ GLFW_KEY_B | keymodifier::shift },
|
||||
// brakeactingspeeddecrease
|
||||
|
||||
@@ -453,7 +453,7 @@ ui_layer::update() {
|
||||
uitextline2 += ( vehicle->MoverParameters->OilPump.is_active ? "O" : ( vehicle->MoverParameters->OilPump.is_enabled ? "o" : "." ) );
|
||||
uitextline2 += ( false == vehicle->MoverParameters->ConverterAllowLocal ? "-" : ( vehicle->MoverParameters->ConverterAllow ? ( vehicle->MoverParameters->ConverterFlag ? "X" : "x" ) : "." ) );
|
||||
uitextline2 += ( vehicle->MoverParameters->ConvOvldFlag ? "!" : "." );
|
||||
uitextline2 += ( false == vehicle->MoverParameters->CompressorAllowLocal ? "-" : ( ( vehicle->MoverParameters->CompressorAllow || vehicle->MoverParameters->CompressorPower > 1 ) ? ( vehicle->MoverParameters->CompressorFlag ? "C" : "c" ) : "." ) );
|
||||
uitextline2 += ( vehicle->MoverParameters->CompressorFlag ? "C" : ( false == vehicle->MoverParameters->CompressorAllowLocal ? "-" : ( ( vehicle->MoverParameters->CompressorAllow || vehicle->MoverParameters->CompressorStart == start::automatic ) ? "c" : "." ) ) );
|
||||
uitextline2 += ( vehicle->MoverParameters->CompressorGovernorLock ? "!" : "." );
|
||||
|
||||
auto const train { Global.pWorld->train() };
|
||||
|
||||
Reference in New Issue
Block a user