Skip to content

Commit

Permalink
Ochrana proti JC na okruhu.
Browse files Browse the repository at this point in the history
  • Loading branch information
horacekj committed Jul 25, 2018
1 parent 144cefb commit b4333dd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 5 additions & 1 deletion src/bloky/TBloky.pas
Original file line number Diff line number Diff line change
Expand Up @@ -845,14 +845,15 @@ function TBlky.GetBlkWithSpr(spr:Integer):TBlksList;
// predpovidani soupravy na bloky v jizdni ceste

procedure TBlky.SprPrediction(Nav:TBlk);
var Usek:TBlk;
var Usek, startUsek:TBlk;
Trat:TBlk;
spr:Integer;
JC:TJC;
begin
try
// zjistime soupravu pred navestidlem
Usek := (Nav as TBlkSCom).UsekPred;
startUsek := Usek;
spr := (Nav as TBlkSCom).GetSoupravaIndex(usek);

if ((Nav as TBlkSCom).Navest > 0) then begin
Expand All @@ -870,6 +871,9 @@ procedure TBlky.SprPrediction(Nav:TBlk);
// zjistime posledni usek jizdni cesty
Blky.GetBlkByID(JC.data.Useky[JC.data.Useky.Count-1], Usek);

if (usek = startUsek) then
break; // ochrana proti JC na ovalu

if ((Usek.typ = _BLK_TU) and ((Usek as TBlkTU).InTrat > -1)) then
begin
// pokud je usek v trati, zmenime usek na usek na druhem konci trati
Expand Down
4 changes: 2 additions & 2 deletions src/hJOPserver.dproj
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@
<VersionInfo Name="AutoIncBuild">True</VersionInfo>
<VersionInfo Name="MajorVer">4</VersionInfo>
<VersionInfo Name="MinorVer">13</VersionInfo>
<VersionInfo Name="Release">0</VersionInfo>
<VersionInfo Name="Release">1</VersionInfo>
<VersionInfo Name="Build">0</VersionInfo>
<VersionInfo Name="Debug">False</VersionInfo>
<VersionInfo Name="PreRelease">False</VersionInfo>
Expand All @@ -307,7 +307,7 @@
<VersionInfoKeys>
<VersionInfoKeys Name="CompanyName">Jan Horáček</VersionInfoKeys>
<VersionInfoKeys Name="FileDescription">hJOP technologicky server</VersionInfoKeys>
<VersionInfoKeys Name="FileVersion">4.13.0.0</VersionInfoKeys>
<VersionInfoKeys Name="FileVersion">4.13.1.0</VersionInfoKeys>
<VersionInfoKeys Name="InternalName">hJOPserver</VersionInfoKeys>
<VersionInfoKeys Name="LegalCopyright">Jan Horáček 2008-2018</VersionInfoKeys>
<VersionInfoKeys Name="LegalTrademarks"/>
Expand Down

0 comments on commit b4333dd

Please sign in to comment.