mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-03-22 15:05:03 +01:00
tempomat fixes
This commit is contained in:
@@ -2853,6 +2853,7 @@ bool TDynamicObject::Update(double dt, double dt1)
|
||||
&& ( ctOwner != nullptr ) ) {
|
||||
MoverParameters->MainCtrlPos = ctOwner->Controlling()->MainCtrlPos*MoverParameters->MainCtrlPosNo / std::max(1, ctOwner->Controlling()->MainCtrlPosNo);
|
||||
MoverParameters->SpeedCtrlValue = ctOwner->Controlling()->SpeedCtrlValue;
|
||||
MoverParameters->SpeedCtrlUnit.IsActive = ctOwner->Controlling()->SpeedCtrlUnit.IsActive;
|
||||
}
|
||||
MoverParameters->CheckEIMIC(dt1);
|
||||
MoverParameters->CheckSpeedCtrl(dt1);
|
||||
|
||||
@@ -688,7 +688,7 @@ struct speed_control {
|
||||
bool BrakeIntervention = false;
|
||||
bool BrakeInterventionBraking = false;
|
||||
bool BrakeInterventionUnbraking = false;
|
||||
bool Standby = true;
|
||||
bool Standby = false;
|
||||
bool Parking = false;
|
||||
double InitialPower = 1.0;
|
||||
double FullPowerVelocity = -1;
|
||||
|
||||
@@ -2215,17 +2215,12 @@ bool TMoverParameters::IncScndCtrl(int CtrlSpeed)
|
||||
|
||||
if ((OK) && (EngineType == TEngineType::ElectricInductionMotor) && (ScndCtrlPosNo == 1) && (MainCtrlPos>0))
|
||||
{
|
||||
// NOTE: round() already adds 0.5, are the ones added here as well correct?
|
||||
if ((Vmax < 250))
|
||||
SpeedCtrlValue = Round(Vel);
|
||||
else
|
||||
SpeedCtrlValue = Round(Vel * 0.5);
|
||||
SpeedCtrlValue = Vel;
|
||||
if ((EIMCtrlType == 0)&&(SpeedCtrlAutoTurnOffFlag == 1))
|
||||
{
|
||||
MainCtrlActualPos = MainCtrlPos;
|
||||
}
|
||||
SpeedCtrlUnit.IsActive = true;
|
||||
SendCtrlToNext("SpeedCntrl", SpeedCtrlValue, CabNo);
|
||||
}
|
||||
|
||||
if ((OK) && (SpeedCtrl) && (ScndCtrlPos == 1) && (EngineType == TEngineType::DieselEngine))
|
||||
@@ -2286,7 +2281,6 @@ bool TMoverParameters::DecScndCtrl(int CtrlSpeed)
|
||||
if ((OK) && (EngineType == TEngineType::ElectricInductionMotor) && (ScndCtrlPosNo == 1))
|
||||
{
|
||||
SpeedCtrlValue = 0;
|
||||
SendCtrlToNext("SpeedCntrl", SpeedCtrlValue, CabNo);
|
||||
SpeedCtrlUnit.IsActive = false;
|
||||
if (SpeedCtrlUnit.ManualStateOverride) {
|
||||
eimic = 0.0;
|
||||
@@ -5560,6 +5554,7 @@ double TMoverParameters::TractionForce( double dt ) {
|
||||
//tempomat
|
||||
if (ScndCtrlPosNo == 4 && SpeedCtrlTypeTime)
|
||||
{
|
||||
SpeedCtrlUnit.IsActive = ( SpeedCtrlValue > 0 );
|
||||
switch (ScndCtrlPos) {
|
||||
case 0:
|
||||
NewSpeed = 0;
|
||||
@@ -5608,7 +5603,7 @@ double TMoverParameters::TractionForce( double dt ) {
|
||||
SpeedCtrlTimer += dt;
|
||||
if (SpeedCtrlTimer > SpeedCtrlDelay)
|
||||
{
|
||||
int NewSCAP = (Vmax < 250 ? 1 : 0.5) * (float)ScndCtrlPos / (float)ScndCtrlPosNo * Vmax;
|
||||
int NewSCAP = (float)ScndCtrlPos / (float)ScndCtrlPosNo * Vmax;
|
||||
if (NewSCAP != SpeedCtrlValue)
|
||||
{
|
||||
SpeedCtrlValue = NewSCAP;
|
||||
@@ -5616,6 +5611,7 @@ double TMoverParameters::TractionForce( double dt ) {
|
||||
}
|
||||
}
|
||||
}
|
||||
SpeedCtrlUnit.IsActive = ( SpeedCtrlValue > 0 );
|
||||
}
|
||||
double edBCP = Hamulec->GetEDBCP();
|
||||
if( ( false == Doors.instances[ side::left ].is_closed )
|
||||
|
||||
Reference in New Issue
Block a user