mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-23 21:29:18 +02:00
@@ -986,8 +986,10 @@ TCommandType TController::TableUpdate(double &fVelDes, double &fDist, double &fN
|
||||
|
||||
if (TrainParams->IsTimeToGo(GlobalTime->hh, GlobalTime->mm))
|
||||
{ // 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 =
|
||||
@@ -1151,6 +1153,10 @@ TCommandType TController::TableUpdate(double &fVelDes, double &fDist, double &fN
|
||||
iDrivigFlags |= moveSemaphorFound; //jeśli z przodu to dajemy falgę, że jest
|
||||
d_to_next_sem = Min0R(sSpeedTable[i].fDist, d_to_next_sem);
|
||||
}
|
||||
if (sSpeedTable[i].fDist <= d_to_next_sem)
|
||||
{
|
||||
VelSignalNext = sSpeedTable[i].fVelNext;
|
||||
}
|
||||
}
|
||||
else if (sSpeedTable[i].iFlags & spRoadVel)
|
||||
{ // to W6
|
||||
@@ -1376,7 +1382,7 @@ void TController::TablePurger()
|
||||
{ // odtykacz: usuwa mniej istotne pozycje ze środka tabelki, aby uniknąć zatkania
|
||||
//(np. brak ograniczenia pomiędzy zwrotnicami, usunięte sygnały, minięte odcinki łuku)
|
||||
if (Global::iWriteLogEnabled & 8)
|
||||
WriteLog("TablePurger: Czyszczenie tableki.");
|
||||
WriteLog("TablePurger: Czyszczenie tabelki.");
|
||||
int i, j, k = iLast - iFirst; // może być 15 albo 16 pozycji, ostatniej nie ma co sprawdzać
|
||||
if (k < 0)
|
||||
k += iSpeedTableSize; // ilość pozycji do przeanalizowania
|
||||
|
||||
1
Driver.h
1
Driver.h
@@ -242,6 +242,7 @@ class TController
|
||||
double VelLimit; // predkość zadawana przez event jednokierunkowego ograniczenia prędkości
|
||||
public:
|
||||
double VelSignalLast; // prędkość zadana na ostatnim semaforze
|
||||
double VelSignalNext; // prędkość zadana na następnym semaforze
|
||||
double VelLimitLast; // prędkość zadana przez ograniczenie
|
||||
double VelRoad; // aktualna prędkość drogowa (ze znaku W27)
|
||||
// (PutValues albo komendą)
|
||||
|
||||
27
DynObj.cpp
27
DynObj.cpp
@@ -3372,24 +3372,24 @@ bool TDynamicObject::Update(double dt, double dt1)
|
||||
// NBMX Obsluga drzwi, MC: zuniwersalnione
|
||||
if ((dDoorMoveL < MoverParameters->DoorMaxShiftL) && (MoverParameters->DoorLeftOpened))
|
||||
{
|
||||
rsDoorOpen.Play(vol, 0, MechInside, vPosition);
|
||||
rsDoorOpen.Play(1, 0, MechInside, vPosition);
|
||||
dDoorMoveL += dt1 * 0.5 * MoverParameters->DoorOpenSpeed;
|
||||
}
|
||||
if ((dDoorMoveL > 0) && (!MoverParameters->DoorLeftOpened))
|
||||
{
|
||||
rsDoorClose.Play(vol, 0, MechInside, vPosition);
|
||||
rsDoorClose.Play(1, 0, MechInside, vPosition);
|
||||
dDoorMoveL -= dt1 * MoverParameters->DoorCloseSpeed;
|
||||
if (dDoorMoveL < 0)
|
||||
dDoorMoveL = 0;
|
||||
}
|
||||
if ((dDoorMoveR < MoverParameters->DoorMaxShiftR) && (MoverParameters->DoorRightOpened))
|
||||
{
|
||||
rsDoorOpen.Play(vol, 0, MechInside, vPosition);
|
||||
rsDoorOpen.Play(1, 0, MechInside, vPosition);
|
||||
dDoorMoveR += dt1 * 0.5 * MoverParameters->DoorOpenSpeed;
|
||||
}
|
||||
if ((dDoorMoveR > 0) && (!MoverParameters->DoorRightOpened))
|
||||
{
|
||||
rsDoorClose.Play(vol, 0, MechInside, vPosition);
|
||||
rsDoorClose.Play(1, 0, MechInside, vPosition);
|
||||
dDoorMoveR -= dt1 * MoverParameters->DoorCloseSpeed;
|
||||
if (dDoorMoveR < 0)
|
||||
dDoorMoveR = 0;
|
||||
@@ -5189,20 +5189,12 @@ void TDynamicObject::LoadMMediaFile(AnsiString BaseDir, AnsiString TypeName,
|
||||
str = Parser->GetNextSymbol();
|
||||
sPantUp.Init(str.c_str(), 50, GetPosition().x, GetPosition().y, GetPosition().z,
|
||||
true);
|
||||
sPantUp.AM = 50000;
|
||||
sPantUp.AA = -1 * (105 - random(10)) / 100;
|
||||
sPantUp.FM = 1.0;
|
||||
sPantUp.FA = 0.0;
|
||||
}
|
||||
if (str == AnsiString("pantographdown:")) // pliki dzwiekow pantografow
|
||||
{
|
||||
str = Parser->GetNextSymbol();
|
||||
sPantDown.Init(str.c_str(), 50, GetPosition().x, GetPosition().y,
|
||||
GetPosition().z, true);
|
||||
sPantDown.AM = 50000;
|
||||
sPantDown.AA = -1 * (105 - random(10)) / 100;
|
||||
sPantDown.FM = 1.0;
|
||||
sPantDown.FA = 0.0;
|
||||
}
|
||||
else if (str == AnsiString("compressor:")) // pliki ze sprezarka
|
||||
{
|
||||
@@ -5225,22 +5217,13 @@ void TDynamicObject::LoadMMediaFile(AnsiString BaseDir, AnsiString TypeName,
|
||||
else if (str == AnsiString("dooropen:"))
|
||||
{
|
||||
str = Parser->GetNextSymbol();
|
||||
rsDoorOpen.Init(str.c_str(), 50, GetPosition().x, GetPosition().y,
|
||||
GetPosition().z, true);
|
||||
rsDoorOpen.AM = 50000;
|
||||
rsDoorOpen.AA = -1 * (105 - random(10)) / 100;
|
||||
rsDoorOpen.FM = 1.0;
|
||||
rsDoorOpen.FA = 0.0;
|
||||
rsDoorOpen.Init(str.c_str(), 50, GetPosition().x, GetPosition().y, GetPosition().z, true);
|
||||
}
|
||||
else if (str == AnsiString("doorclose:"))
|
||||
{
|
||||
str = Parser->GetNextSymbol();
|
||||
rsDoorClose.Init(str.c_str(), 50, GetPosition().x, GetPosition().y,
|
||||
GetPosition().z, true);
|
||||
rsDoorClose.AM = 50000;
|
||||
rsDoorClose.AA = -1 * (105 - random(10)) / 100;
|
||||
rsDoorClose.FM = 1.0;
|
||||
rsDoorClose.FA = 0.0;
|
||||
}
|
||||
else if (str == AnsiString("sand:")) // pliki z piasecznica
|
||||
{
|
||||
|
||||
11
EU07.bpr
11
EU07.bpr
@@ -60,7 +60,7 @@ AutoIncBuild=0
|
||||
MajorVer=16
|
||||
MinorVer=0
|
||||
Release=1173
|
||||
Build=481
|
||||
Build=482
|
||||
Debug=1
|
||||
PreRelease=0
|
||||
Special=0
|
||||
@@ -72,7 +72,7 @@ CodePage=1250
|
||||
[Version Info Keys]
|
||||
CompanyName=EU07 Team
|
||||
FileDescription=MaSzyna EU07-424
|
||||
FileVersion=16.0.1173.481
|
||||
FileVersion=16.0.1173.482
|
||||
InternalName=DP+SPKS+asynch+python
|
||||
LegalCopyright=
|
||||
LegalTrademarks=
|
||||
@@ -81,13 +81,6 @@ ProductName=MaSzyna EU07-424
|
||||
ProductVersion=16.0
|
||||
Comments=
|
||||
|
||||
[Excluded Packages]
|
||||
$(BCB)\Bin\bcbsmp50.bpl=Borland C++ Sample Components
|
||||
$(BCB)\Bin\dclqrt50.bpl=QuickReport Components
|
||||
C:\WINDOWS\system32\ibsmp50.bpl=Borland C++ InterBase Alerter Component
|
||||
$(BCB)\Bin\dcltee50.bpl=TeeChart 5.0 Components
|
||||
$(BCB)\Bin\applet50.bpl=Borland Control Panel Applet Package
|
||||
|
||||
[HistoryLists\hlIncludePath]
|
||||
Count=2
|
||||
Item0=Console;opengl;McZapkie;$(BCB)\include;$(BCB)\include\vcl;python\include
|
||||
|
||||
@@ -49,9 +49,9 @@ double Global::fLuminance = 1.0; // jasno
|
||||
int Global::iReCompile = 0; // zwiêkszany, gdy trzeba odœwie¿yæ siatki
|
||||
HWND Global::hWnd = NULL; // uchwyt okna
|
||||
int Global::iCameraLast = -1;
|
||||
AnsiString Global::asRelease = "16.0.1172.481";
|
||||
AnsiString Global::asRelease = "16.0.1172.482";
|
||||
AnsiString Global::asVersion =
|
||||
"Compilation 2016-08-24, release " + Global::asRelease + "."; // tutaj, bo wysy³any
|
||||
"Compilation 2017-01-10, release " + Global::asRelease + "."; // tutaj, bo wysy³any
|
||||
int Global::iViewMode = 0; // co aktualnie widaæ: 0-kabina, 1-latanie, 2-sprzêgi, 3-dokumenty
|
||||
int Global::iTextMode = 0; // tryb pracy wyœwietlacza tekstowego
|
||||
int Global::iScreenMode[12] = {0, 0, 0, 0, 0, 0,
|
||||
|
||||
@@ -4085,7 +4085,7 @@ begin
|
||||
if (EngineType=ElectricSeriesMotor) then
|
||||
begin
|
||||
case RVentType of {wentylatory rozruchowe}
|
||||
1: if ActiveDir<>0 then
|
||||
1: if (ActiveDir<>0) and (RList[MainCtrlActualPos].R>RVentCutOff) then
|
||||
RventRot:=RventRot+(RVentnmax-RventRot)*RVentSpeed*dt
|
||||
else
|
||||
RventRot:=RventRot*(1-RVentSpeed*dt);
|
||||
|
||||
30
Train.cpp
30
Train.cpp
@@ -349,6 +349,15 @@ PyObject *TTrain::GetTrainState()
|
||||
PyDict_SetItemString(dict, "manual_brake", PyGetBool(mvOccupied->ManualBrakePos > 0));
|
||||
PyDict_SetItemString(dict, "pantpress", PyGetFloat(mvControlled->PantPress));
|
||||
PyDict_SetItemString(dict, "trainnumber", PyGetString(DynamicObject->Mechanik->TrainName().c_str()));
|
||||
PyDict_SetItemString(dict, "velnext", PyGetFloat(DynamicObject->Mechanik->VelNext));
|
||||
PyDict_SetItemString(dict, "actualproximitydist", PyGetFloat(DynamicObject->Mechanik->ActualProximityDist));
|
||||
PyDict_SetItemString(dict, "velsignallast", PyGetFloat(DynamicObject->Mechanik->VelSignalLast));
|
||||
PyDict_SetItemString(dict, "vellimitlast", PyGetFloat(DynamicObject->Mechanik->VelLimitLast));
|
||||
PyDict_SetItemString(dict, "velroad", PyGetFloat(DynamicObject->Mechanik->VelRoad));
|
||||
PyDict_SetItemString(dict, "velsignalnext", PyGetFloat(DynamicObject->Mechanik->VelSignalNext));
|
||||
PyDict_SetItemString(dict, "battery", PyGetBool(mvControlled->Battery));
|
||||
PyDict_SetItemString(dict, "tractionforce", PyGetFloat(DynamicObject->MoverParameters->Ft));
|
||||
|
||||
|
||||
return dict;
|
||||
}
|
||||
@@ -459,6 +468,10 @@ void TTrain::OnKeyDown(int cKey)
|
||||
if (mvOccupied->BatterySwitch(true)) // bateria potrzebna np. do zapalenia œwiate³
|
||||
{
|
||||
dsbSwitch->Play(0, 0, 0);
|
||||
if (ggBatteryButton.SubModel)
|
||||
{
|
||||
ggBatteryButton.PutValue(1);
|
||||
}
|
||||
if (mvOccupied->LightsPosNo > 0)
|
||||
{
|
||||
SetLights();
|
||||
@@ -1500,6 +1513,10 @@ void TTrain::OnKeyDown(int cKey)
|
||||
{ // ewentualnie zablokowaæ z FIZ,
|
||||
// np. w samochodach siê nie
|
||||
// od³¹cza akumulatora
|
||||
if (ggBatteryButton.SubModel)
|
||||
{
|
||||
ggBatteryButton.PutValue(0);
|
||||
}
|
||||
dsbSwitch->Play(0, 0, 0);
|
||||
// mvOccupied->SecuritySystem.Status=0;
|
||||
mvControlled->PantFront(false);
|
||||
@@ -3665,6 +3682,7 @@ bool TTrain::Update()
|
||||
(mvOccupied->EpFuse)); // napiecie na nastawniku hamulcowym
|
||||
btLampkaForward.Turn(mvControlled->ActiveDir > 0); // jazda do przodu
|
||||
btLampkaBackward.Turn(mvControlled->ActiveDir < 0); // jazda do ty³u
|
||||
btLampkaED.Turn(mvControlled->DynamicBrakeFlag); //hamulec ED
|
||||
}
|
||||
else
|
||||
{ // gdy bateria wy³¹czona
|
||||
@@ -3678,6 +3696,7 @@ bool TTrain::Update()
|
||||
btLampkaNapNastHam.TurnOff();
|
||||
btLampkaForward.TurnOff();
|
||||
btLampkaBackward.TurnOff();
|
||||
btLampkaED.TurnOff();
|
||||
}
|
||||
// McZapkie-080602: obroty (albo translacje) regulatorow
|
||||
if (ggMainCtrl.SubModel)
|
||||
@@ -4950,6 +4969,7 @@ bool TTrain::Update()
|
||||
// hunter-091012
|
||||
ggCabLightButton.Update();
|
||||
ggCabLightDimButton.Update();
|
||||
ggBatteryButton.Update();
|
||||
//------
|
||||
if (ActiveUniversal4)
|
||||
ggUniversal4Button.PermIncValue(dt);
|
||||
@@ -5429,6 +5449,7 @@ bool TTrain::InitializeCab(int NewCabNo, AnsiString asFileName)
|
||||
// hunter-091012
|
||||
ggCabLightButton.Clear();
|
||||
ggCabLightDimButton.Clear();
|
||||
ggBatteryButton.Clear();
|
||||
//-------
|
||||
ggUniversal4Button.Clear();
|
||||
ggFuseButton.Clear();
|
||||
@@ -5514,6 +5535,7 @@ bool TTrain::InitializeCab(int NewCabNo, AnsiString asFileName)
|
||||
btLampkaWylSzybkiB.Clear();
|
||||
btLampkaForward.Clear();
|
||||
btLampkaBackward.Clear();
|
||||
btLampkaED.Clear();
|
||||
btCabLight.Clear(); // hunter-171012
|
||||
ggLeftLightButton.Clear();
|
||||
ggRightLightButton.Clear();
|
||||
@@ -5649,9 +5671,9 @@ bool TTrain::InitializeCab(int NewCabNo, AnsiString asFileName)
|
||||
else if (str == AnsiString("cablight_sw:")) // hunter-091012: swiatlo w kabinie
|
||||
ggCabLightButton.Load(Parser, DynamicObject->mdKabina);
|
||||
else if (str == AnsiString("cablightdim_sw:"))
|
||||
ggCabLightDimButton.Load(
|
||||
Parser,
|
||||
DynamicObject->mdKabina); // hunter-091012: przyciemnienie swiatla w kabinie
|
||||
ggCabLightDimButton.Load(Parser, DynamicObject->mdKabina); // hunter-091012: przyciemnienie swiatla w kabinie
|
||||
else if (str == AnsiString("battery_sw:"))
|
||||
ggBatteryButton.Load(Parser, DynamicObject->mdKabina);
|
||||
// ABu 090305: uniwersalne przyciski lub inne rzeczy
|
||||
else if (str == AnsiString("universal1:"))
|
||||
ggUniversal1Button.Load(Parser, DynamicObject->mdKabina, DynamicObject->mdModel);
|
||||
@@ -5911,6 +5933,8 @@ bool TTrain::InitializeCab(int NewCabNo, AnsiString asFileName)
|
||||
btLampkaBocznik4.Load(Parser, DynamicObject->mdKabina);
|
||||
else if (str == AnsiString("i-braking:"))
|
||||
btLampkaHamienie.Load(Parser, DynamicObject->mdKabina);
|
||||
else if (str == AnsiString("i-dynamicbrake:"))
|
||||
btLampkaED.Load(Parser, DynamicObject->mdKabina);
|
||||
else if (str == AnsiString("i-braking-ezt:"))
|
||||
btLampkaHamowanie1zes.Load(Parser, DynamicObject->mdKabina);
|
||||
else if (str == AnsiString("i-braking-ezt2:"))
|
||||
|
||||
2
Train.h
2
Train.h
@@ -189,6 +189,7 @@ class TTrain
|
||||
|
||||
TGauge ggCabLightButton; // hunter-091012: przelacznik oswietlania kabiny
|
||||
TGauge ggCabLightDimButton; // hunter-091012: przelacznik przyciemnienia
|
||||
TGauge ggBatteryButton; // Stele 161228 hebelek baterii
|
||||
// oswietlenia kabiny
|
||||
|
||||
// NBMX wrzesien 2003 - obsluga drzwi
|
||||
@@ -255,6 +256,7 @@ class TTrain
|
||||
TButton btLampkaBocznik4;
|
||||
TButton btLampkaRadiotelefon;
|
||||
TButton btLampkaHamienie;
|
||||
TButton btLampkaED; //Stele 161228 hamowanie elektrodynamiczne
|
||||
TButton btLampkaJazda; // Ra: nie u篡wane
|
||||
// KURS90
|
||||
TButton btLampkaBoczniki;
|
||||
|
||||
Reference in New Issue
Block a user