V1.75
This commit is contained in:
BIN
Binary file not shown.
Binary file not shown.
+36
-10
@@ -1536,6 +1536,13 @@ object FormConfig: TFormConfig
|
|||||||
Height = 13
|
Height = 13
|
||||||
Caption = 'LabelTrain'
|
Caption = 'LabelTrain'
|
||||||
end
|
end
|
||||||
|
object Label10: TLabel
|
||||||
|
Left = 80
|
||||||
|
Top = 120
|
||||||
|
Width = 105
|
||||||
|
Height = 13
|
||||||
|
Caption = 'Verrouillable au carr'#233' :'
|
||||||
|
end
|
||||||
object ButtonAppliquerEtFermer: TButton
|
object ButtonAppliquerEtFermer: TButton
|
||||||
Left = 384
|
Left = 384
|
||||||
Top = 440
|
Top = 440
|
||||||
@@ -1561,7 +1568,7 @@ object FormConfig: TFormConfig
|
|||||||
Top = 8
|
Top = 8
|
||||||
Width = 585
|
Width = 585
|
||||||
Height = 417
|
Height = 417
|
||||||
ActivePage = TabSheetCDM
|
ActivePage = TabSheet3
|
||||||
Font.Charset = DEFAULT_CHARSET
|
Font.Charset = DEFAULT_CHARSET
|
||||||
Font.Color = clBackground
|
Font.Color = clBackground
|
||||||
Font.Height = -11
|
Font.Height = -11
|
||||||
@@ -2348,6 +2355,7 @@ object FormConfig: TFormConfig
|
|||||||
ReadOnly = True
|
ReadOnly = True
|
||||||
ScrollBars = ssVertical
|
ScrollBars = ssVertical
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
|
WordWrap = False
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
object TabSheet3: TTabSheet
|
object TabSheet3: TTabSheet
|
||||||
@@ -2375,22 +2383,23 @@ object FormConfig: TFormConfig
|
|||||||
Font.Style = []
|
Font.Style = []
|
||||||
ParentFont = False
|
ParentFont = False
|
||||||
ReadOnly = True
|
ReadOnly = True
|
||||||
ScrollBars = ssVertical
|
ScrollBars = ssBoth
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
|
WordWrap = False
|
||||||
OnClick = MemoSignauxClick
|
OnClick = MemoSignauxClick
|
||||||
end
|
end
|
||||||
object GroupBox12: TGroupBox
|
object GroupBox12: TGroupBox
|
||||||
Left = 304
|
Left = 304
|
||||||
Top = 40
|
Top = 40
|
||||||
Width = 257
|
Width = 257
|
||||||
Height = 257
|
Height = 313
|
||||||
Caption = 'Description du signal'
|
Caption = 'Description du signal'
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
object ImageSignal: TImage
|
object ImageSignal: TImage
|
||||||
Left = 8
|
Left = 8
|
||||||
Top = 72
|
Top = 72
|
||||||
Width = 65
|
Width = 65
|
||||||
Height = 137
|
Height = 105
|
||||||
end
|
end
|
||||||
object LabelAdrSig: TLabel
|
object LabelAdrSig: TLabel
|
||||||
Left = 13
|
Left = 13
|
||||||
@@ -2433,6 +2442,22 @@ object FormConfig: TFormConfig
|
|||||||
Height = 13
|
Height = 13
|
||||||
Caption = 'Verrouillable au carr'#233' :'
|
Caption = 'Verrouillable au carr'#233' :'
|
||||||
end
|
end
|
||||||
|
object Label17: TLabel
|
||||||
|
Left = 80
|
||||||
|
Top = 144
|
||||||
|
Width = 131
|
||||||
|
Height = 26
|
||||||
|
Caption = 'Conditions suppl'#233'mentaires d'#39'affichage du carr'#233' :'
|
||||||
|
WordWrap = True
|
||||||
|
end
|
||||||
|
object MemoCarre: TMemo
|
||||||
|
Left = 8
|
||||||
|
Top = 184
|
||||||
|
Width = 241
|
||||||
|
Height = 97
|
||||||
|
ReadOnly = True
|
||||||
|
TabOrder = 0
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
object TabSheet4: TTabSheet
|
object TabSheet4: TTabSheet
|
||||||
@@ -2462,6 +2487,7 @@ object FormConfig: TFormConfig
|
|||||||
ReadOnly = True
|
ReadOnly = True
|
||||||
ScrollBars = ssVertical
|
ScrollBars = ssVertical
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
|
WordWrap = False
|
||||||
OnClick = MemoActClick
|
OnClick = MemoActClick
|
||||||
end
|
end
|
||||||
object GroupBox13: TGroupBox
|
object GroupBox13: TGroupBox
|
||||||
@@ -2503,15 +2529,15 @@ object FormConfig: TFormConfig
|
|||||||
Caption = 'Actionneur fonction de locomotive '
|
Caption = 'Actionneur fonction de locomotive '
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
object LabelActionneur: TLabel
|
object LabelActionneur: TLabel
|
||||||
Left = 56
|
Left = 48
|
||||||
Top = 44
|
Top = 24
|
||||||
Width = 51
|
Width = 51
|
||||||
Height = 13
|
Height = 13
|
||||||
Caption = 'Actionneur'
|
Caption = 'Actionneur'
|
||||||
end
|
end
|
||||||
object LabelTrain: TLabel
|
object LabelTrain: TLabel
|
||||||
Left = 72
|
Left = 72
|
||||||
Top = 20
|
Top = 46
|
||||||
Width = 24
|
Width = 24
|
||||||
Height = 13
|
Height = 13
|
||||||
Caption = 'Train'
|
Caption = 'Train'
|
||||||
@@ -2525,14 +2551,14 @@ object FormConfig: TFormConfig
|
|||||||
end
|
end
|
||||||
object LabelFonction: TLabel
|
object LabelFonction: TLabel
|
||||||
Left = 56
|
Left = 56
|
||||||
Top = 68
|
Top = 70
|
||||||
Width = 41
|
Width = 41
|
||||||
Height = 13
|
Height = 13
|
||||||
Caption = 'Fonction'
|
Caption = 'Fonction'
|
||||||
end
|
end
|
||||||
object LabelTempo: TLabel
|
object LabelTempo: TLabel
|
||||||
Left = 40
|
Left = 40
|
||||||
Top = 84
|
Top = 94
|
||||||
Width = 55
|
Width = 55
|
||||||
Height = 13
|
Height = 13
|
||||||
Caption = 'Tempo (ms)'
|
Caption = 'Tempo (ms)'
|
||||||
@@ -2548,7 +2574,7 @@ object FormConfig: TFormConfig
|
|||||||
object EditTrain: TEdit
|
object EditTrain: TEdit
|
||||||
Left = 112
|
Left = 112
|
||||||
Top = 44
|
Top = 44
|
||||||
Width = 121
|
Width = 105
|
||||||
Height = 21
|
Height = 21
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
Text = 'EditTrain'
|
Text = 'EditTrain'
|
||||||
|
|||||||
+27
-1
@@ -153,6 +153,9 @@ type
|
|||||||
EditV1O: TEdit;
|
EditV1O: TEdit;
|
||||||
EditV2O: TEdit;
|
EditV2O: TEdit;
|
||||||
EditV3O: TEdit;
|
EditV3O: TEdit;
|
||||||
|
Label10: TLabel;
|
||||||
|
Label17: TLabel;
|
||||||
|
MemoCarre: TMemo;
|
||||||
procedure ButtonAppliquerEtFermerClick(Sender: TObject);
|
procedure ButtonAppliquerEtFermerClick(Sender: TObject);
|
||||||
procedure Button2Click(Sender: TObject);
|
procedure Button2Click(Sender: TObject);
|
||||||
procedure FormActivate(Sender: TObject);
|
procedure FormActivate(Sender: TObject);
|
||||||
@@ -928,7 +931,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
Procedure aff_champs_sig;
|
Procedure aff_champs_sig;
|
||||||
var i,d, ligne, adresse,erreur : integer;
|
var i,d,l,k, ligne, adresse,erreur,condCarre : integer;
|
||||||
s,ss : string;
|
s,ss : string;
|
||||||
begin
|
begin
|
||||||
with formConfig.MemoSignaux do
|
with formConfig.MemoSignaux do
|
||||||
@@ -973,6 +976,27 @@ begin
|
|||||||
LabelVerrou.caption:='';
|
LabelVerrou.caption:='';
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
// conditions de carré
|
||||||
|
formConfig.MemoCarre.Lines.clear;
|
||||||
|
CondCarre:=Length(feux[i].condcarre[1]);
|
||||||
|
|
||||||
|
l:=1;
|
||||||
|
while condCarre<>0 do
|
||||||
|
begin
|
||||||
|
if condcarre<>0 then dec(condcarre);
|
||||||
|
ss:='';
|
||||||
|
for k:=1 to condCarre do
|
||||||
|
begin
|
||||||
|
ss:=ss+'A'+IntToSTR(feux[i].condcarre[l][k].Adresse);
|
||||||
|
if feux[i].condcarre[l][k].PosAig='S' then ss:=ss+' dévié ' else ss:=ss+' droit ';
|
||||||
|
if k<CondCarre then ss:=ss+'et ';
|
||||||
|
end;
|
||||||
|
formConfig.MemoCarre.Lines.add(ss);
|
||||||
|
inc(l);
|
||||||
|
CondCarre:=Length(feux[i].condcarre[l]);
|
||||||
|
if condCarre<>0 then formConfig.MemoCarre.Lines.add('ou');
|
||||||
|
end;
|
||||||
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@@ -1116,4 +1140,6 @@ end;
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
|||||||
Binary file not shown.
+5
-5
@@ -202,15 +202,15 @@ begin
|
|||||||
begin
|
begin
|
||||||
i:=0;
|
i:=0;
|
||||||
repeat
|
repeat
|
||||||
trouve:=pos('erreur',Lines[i])<>0;
|
trouve:=pos('erreur',uppercase(Lines[i]))<>0;
|
||||||
inc(i);
|
inc(i);
|
||||||
until (i>=Lines.Count) or trouve;
|
until (i>=Lines.Count) or trouve;
|
||||||
if trouve then
|
if trouve then
|
||||||
begin
|
begin
|
||||||
Lines.Add('trouvé en '+intToSTR(i));
|
Affiche('trouvé en '+intToSTR(i),clyellow);
|
||||||
SelStart:=Perform(EM_LINEINDEX,5,0);
|
SelStart := I - 1;
|
||||||
perform(EM_SCROLLCARET,0,0);
|
SelLength := Length('erreur');
|
||||||
setfocus;
|
SetFocus;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|||||||
Binary file not shown.
+154
-29
@@ -309,11 +309,15 @@ var ancien_tablo_signalCplx,EtatsignalCplx : array[0..MaxAcc] of word;
|
|||||||
VerrouCarre : boolean ; // si vrai, le feu se verrouille au carré si pas de train avant le signal
|
VerrouCarre : boolean ; // si vrai, le feu se verrouille au carré si pas de train avant le signal
|
||||||
EtatSignal : word ; // comme EtatSignalCplx
|
EtatSignal : word ; // comme EtatSignalCplx
|
||||||
UniSemaf : integer ; // définition supplémentaire de la cible pour les décodeurs UNISEMAF
|
UniSemaf : integer ; // définition supplémentaire de la cible pour les décodeurs UNISEMAF
|
||||||
AigDirection : array[1..6] of array of record // pour les signaux directionnels : contient la liste des aiguillages associés
|
AigDirection : array[1..6] of array of record // pour les signaux directionnels : contient la liste des aiguillages associés
|
||||||
Adresse : integer; // 6 feux max associés à un tableau dynamique décrivant les aiguillages
|
Adresse : integer; // 6 feux max associés à un tableau dynamique décrivant les aiguillages
|
||||||
posAig : char;
|
posAig : char;
|
||||||
end;
|
end;
|
||||||
end;
|
CondCarre : array[1..6] of array of record // conditions supplémentaires d'aiguillages en position pour le carré
|
||||||
|
Adresse : integer; // aiguillage
|
||||||
|
posAig : char;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
Fimage : Timage;
|
Fimage : Timage;
|
||||||
|
|
||||||
BrancheN : array[1..100,1..200] of TBranche;
|
BrancheN : array[1..100,1..200] of TBranche;
|
||||||
@@ -1503,6 +1507,7 @@ begin
|
|||||||
envoi(s); // envoi de la trame et attente Ack
|
envoi(s); // envoi de la trame et attente Ack
|
||||||
// si l'accessoire est un feu et sans raz des signaux, sortir
|
// si l'accessoire est un feu et sans raz des signaux, sortir
|
||||||
if (acc=feu) and not(Raz_Acc_signaux) then exit;
|
if (acc=feu) and not(Raz_Acc_signaux) then exit;
|
||||||
|
|
||||||
|
|
||||||
// si aiguillage, faire une temporisation
|
// si aiguillage, faire une temporisation
|
||||||
//if (index_feu(adresse)=0) or (Acc=aig) then
|
//if (index_feu(adresse)=0) or (Acc=aig) then
|
||||||
@@ -3888,7 +3893,7 @@ begin
|
|||||||
begin
|
begin
|
||||||
sa:=copy(s,1,j-1);
|
sa:=copy(s,1,j-1);
|
||||||
if sa[1]='D' then
|
if sa[1]='D' then
|
||||||
// feu directionnel
|
// feu directionnel ------------------------------------------
|
||||||
begin
|
begin
|
||||||
delete(sa,1,1);
|
delete(sa,1,1);
|
||||||
j:=pos(',',s);
|
j:=pos(',',s);
|
||||||
@@ -3920,7 +3925,7 @@ begin
|
|||||||
delete(s,1,1);
|
delete(s,1,1);
|
||||||
val(s,adr,erreur); // adresse
|
val(s,adr,erreur); // adresse
|
||||||
c:=s[erreur]; // type
|
c:=s[erreur]; // type
|
||||||
setlength(feux[i].AigDirection[k],j+1); // auglenter le tableau dynamique
|
setlength(feux[i].AigDirection[k],j+1); // augmenter le tableau dynamique
|
||||||
feux[i].AigDirection[k][j].PosAig:=c;
|
feux[i].AigDirection[k][j].PosAig:=c;
|
||||||
feux[i].AigDirection[k][j].Adresse:=adr;
|
feux[i].AigDirection[k][j].Adresse:=adr;
|
||||||
|
|
||||||
@@ -3943,7 +3948,7 @@ begin
|
|||||||
|
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
// feu de signalisation
|
// feu de signalisation---------------------------------
|
||||||
begin
|
begin
|
||||||
k:=StrToInt(sa); //aspect
|
k:=StrToInt(sa); //aspect
|
||||||
feux[i].aspect:=k;Delete(s,1,j);
|
feux[i].aspect:=k;Delete(s,1,j);
|
||||||
@@ -3956,7 +3961,7 @@ begin
|
|||||||
feux[i].Adr_el_suiv1:=0;feux[i].Adr_el_suiv2:=0;feux[i].Adr_el_suiv3:=0;feux[i].Adr_el_suiv4:=0;
|
feux[i].Adr_el_suiv1:=0;feux[i].Adr_el_suiv2:=0;feux[i].Adr_el_suiv3:=0;feux[i].Adr_el_suiv4:=0;
|
||||||
feux[i].Btype_Suiv1:=0;feux[i].Btype_Suiv2:=0;feux[i].Btype_Suiv3:=0;feux[i].Btype_Suiv4:=0;
|
feux[i].Btype_Suiv1:=0;feux[i].Btype_Suiv2:=0;feux[i].Btype_Suiv3:=0;feux[i].Btype_Suiv4:=0;
|
||||||
feux[i].Adr_det1:=0;feux[i].Adr_det2:=0;feux[i].Adr_det3:=0;feux[i].Adr_det4:=0;
|
feux[i].Adr_det1:=0;feux[i].Adr_det2:=0;feux[i].Adr_det3:=0;feux[i].Adr_det4:=0;
|
||||||
// éléments optionnels
|
// éléments optionnels des voies supplémentaires
|
||||||
if j<>0 then
|
if j<>0 then
|
||||||
begin
|
begin
|
||||||
//Affiche('Entrée:s='+s,clyellow);
|
//Affiche('Entrée:s='+s,clyellow);
|
||||||
@@ -4055,6 +4060,45 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
// voir si conditions supplémentaires de carré
|
||||||
|
l:=1; // nombre de parenthèses
|
||||||
|
repeat
|
||||||
|
t:=pos('(',s);
|
||||||
|
if t<>0 then
|
||||||
|
begin
|
||||||
|
//Affiche('Conditions supplémentaires pour le feu '+IntToSTR(adresse)+' parenthèse '+intToSTR(l),clyellow);
|
||||||
|
k:=pos(')',s);
|
||||||
|
sa:=copy(s,t+1,k-t-1); // contient l'intérieur des parenthèses sans les parenthèses
|
||||||
|
//Affiche(sa,clRed);
|
||||||
|
delete(s,1,k);//Affiche(s,clYellow);
|
||||||
|
// boucle dans la parenthèse
|
||||||
|
bd:=0;
|
||||||
|
repeat
|
||||||
|
inc(bd);
|
||||||
|
setlength(feux[i].condCarre[l],bd+1); // une condition en plus
|
||||||
|
k:=pos(',',sa);
|
||||||
|
if k<>0 then
|
||||||
|
chaine:=copy(sa,1,k-1)
|
||||||
|
else
|
||||||
|
chaine:=sa;
|
||||||
|
|
||||||
|
if chaine[1]='A' then
|
||||||
|
begin
|
||||||
|
delete(chaine,1,1);
|
||||||
|
val(chaine,adresse,erreur);
|
||||||
|
feux[i].condCarre[l][bd].Adresse:=adresse;
|
||||||
|
if erreur<>0 then feux[i].condCarre[l][bd].PosAig:=chaine[erreur] else
|
||||||
|
Affiche('Définition du feu '+IntToSTR(adresse)+': erreur dans les conditions de carré des aiguillages',clred);
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
k:=pos(',',sa);if k<>0 then delete(sa,1,k);
|
||||||
|
//Affiche(sa,clyellow);
|
||||||
|
until k=0;
|
||||||
|
//Affiche('Longueur tableau '+IntToSTR(l)+':'+intToSTR(length(feux[i].condCarre[l])),clyellow);
|
||||||
|
inc(l);
|
||||||
|
end;
|
||||||
|
until t=0;
|
||||||
end;
|
end;
|
||||||
inc(i);
|
inc(i);
|
||||||
end;
|
end;
|
||||||
@@ -4293,19 +4337,22 @@ end;
|
|||||||
// 2=arret sur aiguillage en talon mal positionné
|
// 2=arret sur aiguillage en talon mal positionné
|
||||||
// 3=arret sur un aiguillage pris en pointe dévié et AdrDevie contient l'adresse de l'aiguillage dévié ainsi que typeGen
|
// 3=arret sur un aiguillage pris en pointe dévié et AdrDevie contient l'adresse de l'aiguillage dévié ainsi que typeGen
|
||||||
// code de sortie : élément suivant ou:
|
// code de sortie : élément suivant ou:
|
||||||
// 9999=erreur fatale
|
// 9999=erreur fatale ou itération trop longue
|
||||||
// 9998= arret sur aiguillage en talon mal positionnée
|
// 9998= arret sur aiguillage en talon mal positionnée
|
||||||
// 9997: arrêt sur aiguillage dévié
|
// 9997: arrêt sur aiguillage dévié
|
||||||
|
// 9996: arrêt sur position inconnue d'aiguillage
|
||||||
// typeGen : 1=detecteur 2=aiguillage 3=aiguillage bis
|
// typeGen : 1=detecteur 2=aiguillage 3=aiguillage bis
|
||||||
function suivant_alg3(prec : integer;typeELprec : integer;actuel : integer;typeElActuel : integer;alg : integer) : integer;
|
function suivant_alg3(prec : integer;typeELprec : integer;actuel : integer;typeElActuel : integer;alg : integer) : integer;
|
||||||
var Btype,Adr,AdrPrec,BtypePrec,indexBranche_prec,branche_trouve_prec,indexBranche_actuel,branche_trouve_actuel,
|
var Btype,Adr,AdrPrec,BtypePrec,indexBranche_prec,branche_trouve_prec,indexBranche_actuel,branche_trouve_actuel,
|
||||||
tjsc1,tjsc2,AdrTjdP,Adr2,Abis,TypeEl : integer;
|
tjsc1,tjsc2,AdrTjdP,Adr2,Abis,TypeEl,N_iteration : integer;
|
||||||
tjscourbe1,tjscourbe2,tjd,tjs : boolean;
|
tjscourbe1,tjscourbe2,tjd,tjs : boolean;
|
||||||
A,Aprec,tjsc1B,tjsc2B: char;
|
A,Aprec,tjsc1B,tjsc2B: char;
|
||||||
s : string;
|
s : string;
|
||||||
label recommence;
|
label recommence;
|
||||||
begin
|
begin
|
||||||
|
n_iteration:=0;
|
||||||
recommence:
|
recommence:
|
||||||
|
if (prec=29) and (actuel=31) then NivDebug:=3;
|
||||||
if (TypeELPrec=0) or (typeElActuel=0) then
|
if (TypeELPrec=0) or (typeElActuel=0) then
|
||||||
begin
|
begin
|
||||||
s:='Erreur 800 - Types nuls : '+intToSTR(prec)+'/'+intToSTR(TypeElPrec)+' '+IntToSTr(actuel)+'/'+IntToSTR(typeElActuel) ;
|
s:='Erreur 800 - Types nuls : '+intToSTR(prec)+'/'+intToSTR(TypeElPrec)+' '+IntToSTr(actuel)+'/'+IntToSTR(typeElActuel) ;
|
||||||
@@ -4385,6 +4432,15 @@ begin
|
|||||||
if NivDebug=3 then AfficheDebug('Le précedent est une TJD/S - substitution du precédent par la pointe de la TJD',clYellow);
|
if NivDebug=3 then AfficheDebug('Le précedent est une TJD/S - substitution du precédent par la pointe de la TJD',clYellow);
|
||||||
// changer l'adresse du précédent par l'autre adresse de la TJD/S
|
// changer l'adresse du précédent par l'autre adresse de la TJD/S
|
||||||
prec:=Aiguillage[prec].APointe;
|
prec:=Aiguillage[prec].APointe;
|
||||||
|
inc(n_iteration);
|
||||||
|
if n_iteration>50 then
|
||||||
|
begin
|
||||||
|
s:='Erreur fatale 9999, trop d''itérations';
|
||||||
|
Affiche(s,clRed);
|
||||||
|
AfficheDebug(s,clRed);
|
||||||
|
suivant_alg3:=9999;
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
goto recommence;
|
goto recommence;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@@ -4646,8 +4702,9 @@ begin
|
|||||||
suivant_alg3:=adr;
|
suivant_alg3:=adr;
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
//Affiche('Erreur 1021 adrTJD='+IntToSTR(Adr)+' adrTJDPointe='+intToSTR(AdrTJDP)+' prec='+IntTOSTR(prec),clred);
|
s:='Erreur 1021, TJD '+IntToSTR(Adr)+'/'+IntToSTR(AdrTjdP)+' mal positionnée';
|
||||||
if nivDebug=3 then AfficheDebug('TJD mal positionnée',clred);
|
if nivDebug=3 then AfficheDebug(s,clred);
|
||||||
|
Affiche(s,clred);
|
||||||
Suivant_alg3:=9998;exit;
|
Suivant_alg3:=9998;exit;
|
||||||
end;
|
end;
|
||||||
// cas 2 TJD
|
// cas 2 TJD
|
||||||
@@ -4673,11 +4730,13 @@ begin
|
|||||||
if Abis=1 then typeGen:=3;
|
if Abis=1 then typeGen:=3;
|
||||||
suivant_alg3:=adr;exit;
|
suivant_alg3:=adr;exit;
|
||||||
end;
|
end;
|
||||||
if nivDebug=3 then AfficheDebug('TJD mal positionnée',clred);
|
s:='Erreur 1022, TJD '+IntToSTR(Adr)+'/'+IntToSTR(AdrTjdP)+' mal positionnée';
|
||||||
|
if nivDebug=3 then AfficheDebug(s,clred);
|
||||||
|
Affiche(s,clred);
|
||||||
Suivant_alg3:=9998;exit;
|
Suivant_alg3:=9998;exit;
|
||||||
end;
|
end;
|
||||||
// cas 3 TJD
|
// cas 3 TJD
|
||||||
if (aiguillage[Adr].position=const_droit)
|
if (aiguillage[Adr].position=const_droit)
|
||||||
and (aiguillage[AdrTjdP].position<>const_droit) and tjd then
|
and (aiguillage[AdrTjdP].position<>const_droit) and tjd then
|
||||||
begin
|
begin
|
||||||
if NivDebug=3 then AfficheDebug('cas3 tjd',clYellow);
|
if NivDebug=3 then AfficheDebug('cas3 tjd',clYellow);
|
||||||
@@ -4699,7 +4758,9 @@ begin
|
|||||||
if Abis=1 then typeGen:=3;
|
if Abis=1 then typeGen:=3;
|
||||||
suivant_alg3:=adr;exit;
|
suivant_alg3:=adr;exit;
|
||||||
end;
|
end;
|
||||||
if nivDebug=3 then AfficheDebug('TJD mal positionnée',clred);
|
s:='Erreur 1023, TJD '+IntToSTR(Adr)+'/'+IntToSTR(AdrTjdP)+' mal positionnée';
|
||||||
|
if nivDebug=3 then AfficheDebug(s,clred);
|
||||||
|
Affiche(s,clred);
|
||||||
Suivant_alg3:=9998;exit;
|
Suivant_alg3:=9998;exit;
|
||||||
end;
|
end;
|
||||||
// cas 4 tjd
|
// cas 4 tjd
|
||||||
@@ -4725,7 +4786,9 @@ begin
|
|||||||
if Abis=1 then typeGen:=3;
|
if Abis=1 then typeGen:=3;
|
||||||
suivant_alg3:=adr;exit;
|
suivant_alg3:=adr;exit;
|
||||||
end;
|
end;
|
||||||
if nivDebug=3 then AfficheDebug('TJD mal positionnée',clred);
|
s:='Erreur 1025, TJD '+IntToSTR(Adr)+'/'+IntToSTR(AdrTjdP)+' mal positionnée';
|
||||||
|
if nivDebug=3 then AfficheDebug(s,clred);
|
||||||
|
Affiche(s,clred);
|
||||||
Suivant_alg3:=9998;exit;
|
Suivant_alg3:=9998;exit;
|
||||||
end;
|
end;
|
||||||
// cas TJS prise dans sa position courbe
|
// cas TJS prise dans sa position courbe
|
||||||
@@ -4801,7 +4864,7 @@ begin
|
|||||||
suivant_alg3:=adr;exit;
|
suivant_alg3:=adr;exit;
|
||||||
end;
|
end;
|
||||||
begin
|
begin
|
||||||
if aiguillage[Adr].position=9 then begin suivant_alg3:=9999;exit;end; // pour échappement
|
if aiguillage[Adr].position=9 then begin suivant_alg3:=9996;exit;end; // pour échappement
|
||||||
s:='Aiguillage triple '+IntToSTR(Adr)+' : configuration des aiguilles interdite';
|
s:='Aiguillage triple '+IntToSTR(Adr)+' : configuration des aiguilles interdite';
|
||||||
if CDM_connecte then s:=s+': '+IntToSTR(aiguillage[Adr].position);
|
if CDM_connecte then s:=s+': '+IntToSTR(aiguillage[Adr].position);
|
||||||
AfficheDebug(s,clYellow);
|
AfficheDebug(s,clYellow);
|
||||||
@@ -4905,7 +4968,7 @@ begin
|
|||||||
actuelCalc:=AdrSuiv;
|
actuelCalc:=AdrSuiv;
|
||||||
BisActuelCalc:=typeGen;
|
BisActuelCalc:=typeGen;
|
||||||
//Affiche('Suivant signalaig='+IntToSTR(AdrSuiv),clyellow);
|
//Affiche('Suivant signalaig='+IntToSTR(AdrSuiv),clyellow);
|
||||||
until (j=10) or (typeGen=1) or (AdrSuiv=0) or (AdrSuiv>=9998); // arret si détecteur
|
until (j=10) or (typeGen=1) or (AdrSuiv=0) or (AdrSuiv>=9998); // arret si détecteur zizi
|
||||||
// si trouvé le sens, trouver le suivant
|
// si trouvé le sens, trouver le suivant
|
||||||
if AdrSuiv=actuel then
|
if AdrSuiv=actuel then
|
||||||
begin
|
begin
|
||||||
@@ -5108,6 +5171,42 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function cond_carre(adresse : integer) : boolean;
|
||||||
|
var i,l,k,NCondCarre,adrAig : integer;
|
||||||
|
resultatET,resultatOU: boolean;
|
||||||
|
s : string;
|
||||||
|
begin
|
||||||
|
i:=index_feu(adresse);
|
||||||
|
NCondCarre:=Length(feux[i].condcarre[1]);
|
||||||
|
|
||||||
|
l:=1;
|
||||||
|
resultatOU:=false;
|
||||||
|
|
||||||
|
while NcondCarre<>0 do
|
||||||
|
begin
|
||||||
|
if Ncondcarre<>0 then dec(Ncondcarre);
|
||||||
|
resultatET:=true;
|
||||||
|
for k:=1 to NcondCarre do
|
||||||
|
begin
|
||||||
|
//s2:=s2+'A'+IntToSTR(feux[i].condcarre[l][k].Adresse)+feux[i].condcarre[l][k].PosAig+' ';
|
||||||
|
AdrAig:=feux[i].condcarre[l][k].Adresse;
|
||||||
|
resultatET:=((aiguillage[AdrAig].position=const_devie) and (feux[i].condcarre[l][k].PosAig='S') or (aiguillage[AdrAig].position=const_droit) and (feux[i].condcarre[l][k].PosAig='D'))
|
||||||
|
and resultatET;
|
||||||
|
end;
|
||||||
|
//if resultatET then Affiche('VRAI',clyellow) else affiche('FAUX',clred);
|
||||||
|
inc(l);
|
||||||
|
resultatOU:=resultatOU or resultatET;
|
||||||
|
NCondCarre:=Length(feux[i].condcarre[l]);
|
||||||
|
end;
|
||||||
|
//if resultatOU then Affiche('VRAI final',clyellow) else affiche('FAUX final',clred);
|
||||||
|
if NivDebug=3 then
|
||||||
|
begin
|
||||||
|
s:='Conditions de carré suivant aiguillages: ';
|
||||||
|
if ResultatOU then s:=s+'vrai' else s:=s+'faux';
|
||||||
|
AfficheDebug(s,clyellow);
|
||||||
|
end;
|
||||||
|
cond_carre:=ResultatOU;
|
||||||
|
end;
|
||||||
|
|
||||||
// renvoi vrai si les aiguillages au delà du signal sont mal positionnés
|
// renvoi vrai si les aiguillages au delà du signal sont mal positionnés
|
||||||
function carre_signal(adresse : integer) : boolean;
|
function carre_signal(adresse : integer) : boolean;
|
||||||
@@ -5138,7 +5237,7 @@ begin
|
|||||||
repeat
|
repeat
|
||||||
inc(j);
|
inc(j);
|
||||||
AdrSuiv:=suivant_alg3(prec,typeElPrec,actuel,typeELActuel,2);
|
AdrSuiv:=suivant_alg3(prec,typeElPrec,actuel,typeELActuel,2);
|
||||||
if AdrSuiv=9999 then // élément non trouvé
|
if (AdrSuiv=9999) or (AdrSuiv=9996) then // élément non trouvé ou position aiguillage inconnu
|
||||||
begin
|
begin
|
||||||
carre_signal:=true;
|
carre_signal:=true;
|
||||||
exit;
|
exit;
|
||||||
@@ -5234,7 +5333,7 @@ begin
|
|||||||
prec:=actuel;TypePrec:=TypeActuel;
|
prec:=actuel;TypePrec:=TypeActuel;
|
||||||
actuel:=AdrSuiv;TypeActuel:=typeGen;
|
actuel:=AdrSuiv;TypeActuel:=typeGen;
|
||||||
end;
|
end;
|
||||||
if (AdrSuiv=9999) then
|
if (AdrSuiv=9999) or (AdrSuiv=9996) then
|
||||||
begin
|
begin
|
||||||
Etat_signal_suivant:=0;
|
Etat_signal_suivant:=0;
|
||||||
AdresseFeuSuivant:=0;
|
AdresseFeuSuivant:=0;
|
||||||
@@ -5483,9 +5582,14 @@ begin
|
|||||||
AdrSuiv:=suivant_alg3(prec,TypePrec,actuel,TypeActuel,1);
|
AdrSuiv:=suivant_alg3(prec,TypePrec,actuel,TypeActuel,1);
|
||||||
prec:=actuel;TypePrec:=TypeActuel;
|
prec:=actuel;TypePrec:=TypeActuel;
|
||||||
actuel:=AdrSuiv;TypeActuel:=typeGen;
|
actuel:=AdrSuiv;TypeActuel:=typeGen;
|
||||||
|
if AdrSuiv>9990 then
|
||||||
|
begin
|
||||||
|
test_memoire_zones:=false;exit;
|
||||||
|
end;
|
||||||
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
if NivDebug=3 then AfficheDebug('A suivant='+IntToSTR(adrsuiv),clred);
|
if NivDebug=3 then AfficheDebug('suivant='+IntToSTR(adrsuiv),clred);
|
||||||
if actuel=0 then
|
if actuel=0 then
|
||||||
begin
|
begin
|
||||||
// si c'est un buttoir
|
// si c'est un buttoir
|
||||||
@@ -5702,7 +5806,7 @@ begin
|
|||||||
if Feux[i].VerrouCarre then
|
if Feux[i].VerrouCarre then
|
||||||
begin
|
begin
|
||||||
if AffSignal then AfficheDebug('Le feu est verrouillable au carré',clyellow);
|
if AffSignal then AfficheDebug('Le feu est verrouillable au carré',clyellow);
|
||||||
// un feu peut être associé à 4 détecteurs (pour 4 voies)
|
// **** un feu peut être associé à 4 détecteurs (pour 4 voies convergentes) *****
|
||||||
// il faut donc explorer les 4 détecteurs probables
|
// il faut donc explorer les 4 détecteurs probables
|
||||||
PresTrain:=FALSE;
|
PresTrain:=FALSE;
|
||||||
|
|
||||||
@@ -5713,20 +5817,20 @@ begin
|
|||||||
begin det_initial:=feux[i].Adr_det1;Adr_El_Suiv:=feux[i].Adr_el_suiv1;
|
begin det_initial:=feux[i].Adr_det1;Adr_El_Suiv:=feux[i].Adr_el_suiv1;
|
||||||
if feux[i].Btype_suiv1=1 then Btype_el_suivant:=1;
|
if feux[i].Btype_suiv1=1 then Btype_el_suivant:=1;
|
||||||
if feux[i].Btype_suiv1=2 then Btype_el_suivant:=2;
|
if feux[i].Btype_suiv1=2 then Btype_el_suivant:=2;
|
||||||
if feux[i].Btype_suiv1=5 then Btype_el_suivant:=3; // le type du feu 1=détécteur 2=aig 5=bis
|
if feux[i].Btype_suiv1=5 then Btype_el_suivant:=3; // 1=détécteur 2=aig 5=bis
|
||||||
end;
|
end;
|
||||||
if (j=2) then
|
if (j=2) then
|
||||||
begin
|
begin
|
||||||
det_initial:=feux[i].Adr_det2;Adr_El_Suiv:=feux[i].Adr_el_suiv2;
|
det_initial:=feux[i].Adr_det2;Adr_El_Suiv:=feux[i].Adr_el_suiv2;
|
||||||
if feux[i].Btype_suiv1=1 then Btype_el_suivant:=1;
|
if feux[i].Btype_suiv1=1 then Btype_el_suivant:=1;
|
||||||
if feux[i].Btype_suiv1=2 then Btype_el_suivant:=2;
|
if feux[i].Btype_suiv1=2 then Btype_el_suivant:=2;
|
||||||
if feux[i].Btype_suiv1=5 then Btype_el_suivant:=3; // le type du feu 1=détécteur 2=aig 5=bis
|
if feux[i].Btype_suiv1=5 then Btype_el_suivant:=3; // 1=détécteur 2=aig 5=bis
|
||||||
end;
|
end;
|
||||||
if (j=3) then
|
if (j=3) then
|
||||||
begin det_initial:=feux[i].Adr_det3;Adr_El_Suiv:=feux[i].Adr_el_suiv3;
|
begin det_initial:=feux[i].Adr_det3;Adr_El_Suiv:=feux[i].Adr_el_suiv3;
|
||||||
if feux[i].Btype_suiv1=1 then Btype_el_suivant:=1;
|
if feux[i].Btype_suiv1=1 then Btype_el_suivant:=1;
|
||||||
if feux[i].Btype_suiv1=2 then Btype_el_suivant:=2;
|
if feux[i].Btype_suiv1=2 then Btype_el_suivant:=2;
|
||||||
if feux[i].Btype_suiv1=5 then Btype_el_suivant:=3; // le type du feu 1=détécteur 2=aig 5=bis
|
if feux[i].Btype_suiv1=5 then Btype_el_suivant:=3; // 1=détécteur 2=aig 5=bis
|
||||||
end;
|
end;
|
||||||
if (j=4) then
|
if (j=4) then
|
||||||
begin
|
begin
|
||||||
@@ -5771,6 +5875,8 @@ begin
|
|||||||
// si le signal peut afficher un carré et les aiguillages après le signal sont mal positionnées ou que pas présence train avant signal et signal
|
// si le signal peut afficher un carré et les aiguillages après le signal sont mal positionnées ou que pas présence train avant signal et signal
|
||||||
// verrouillable au carré, afficher un carré
|
// verrouillable au carré, afficher un carré
|
||||||
car:=carre_signal(AdrFeu);
|
car:=carre_signal(AdrFeu);
|
||||||
|
// conditions supplémentaires de carré en fonction des aiguillages décrits
|
||||||
|
car:=cond_carre(AdrFeu) or car;
|
||||||
if AffSignal and car then AfficheDebug('le signal a des aiguilles en talon aval mal positionnées',clYellow);
|
if AffSignal and car then AfficheDebug('le signal a des aiguilles en talon aval mal positionnées',clYellow);
|
||||||
if (NivDebug>=1) and car then AfficheDebug('le signal a des aiguilles en talon aval mal positionnées',clYellow);
|
if (NivDebug>=1) and car then AfficheDebug('le signal a des aiguilles en talon aval mal positionnées',clYellow);
|
||||||
if (Feux[i].aspect>=4) and ( (not(PresTrain) and Feux[i].VerrouCarre) or car) then Maj_Etat_Signal(AdrFeu,carre)
|
if (Feux[i].aspect>=4) and ( (not(PresTrain) and Feux[i].VerrouCarre) or car) then Maj_Etat_Signal(AdrFeu,carre)
|
||||||
@@ -5907,6 +6013,7 @@ begin
|
|||||||
det3:=event_det[N_event_det]; // c'est le nouveau détecteur
|
det3:=event_det[N_event_det]; // c'est le nouveau détecteur
|
||||||
FormDebug.MemoEvtDet.lines.add('Le nouveau détecteur est '+IntToSTR(det3)) ;
|
FormDebug.MemoEvtDet.lines.add('Le nouveau détecteur est '+IntToSTR(det3)) ;
|
||||||
if TraceListe then AfficheDebug('Le nouveau détecteur est '+IntToSTR(det3),clyellow) ;
|
if TraceListe then AfficheDebug('Le nouveau détecteur est '+IntToSTR(det3),clyellow) ;
|
||||||
|
|
||||||
// évaluer d'abord la route du nouveau détecteur sur tous les tableau déja rempli de 2 éléments
|
// évaluer d'abord la route du nouveau détecteur sur tous les tableau déja rempli de 2 éléments
|
||||||
for i:=1 to N_trains do
|
for i:=1 to N_trains do
|
||||||
begin
|
begin
|
||||||
@@ -5980,7 +6087,7 @@ begin
|
|||||||
if traceListe then AfficheDebug('traitement Train n°'+intToSTR(i)+' 1 détecteur',clyellow);
|
if traceListe then AfficheDebug('traitement Train n°'+intToSTR(i)+' 1 détecteur',clyellow);
|
||||||
// vérifier si l'élément du tableau et le nouveau sont contigus
|
// vérifier si l'élément du tableau et le nouveau sont contigus
|
||||||
det1:=event_det_train[i].det[1];
|
det1:=event_det_train[i].det[1];
|
||||||
Det_Adj(det1);
|
Det_Adj(det1); // renvoie les adresses des détecteurs adjacents au détecteur "det1" résultat dans adj1 et adj2
|
||||||
if (Adj1=det3) or (Adj2=det3) then
|
if (Adj1=det3) or (Adj2=det3) then
|
||||||
begin
|
begin
|
||||||
event_det_train[i].det[2]:=det3;
|
event_det_train[i].det[2]:=det3;
|
||||||
@@ -7011,7 +7118,7 @@ begin
|
|||||||
TempoAct:=0;
|
TempoAct:=0;
|
||||||
DebugOuv:=True;
|
DebugOuv:=True;
|
||||||
|
|
||||||
AvecInit:=true; //&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
|
AvecInit:=false; //&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
|
||||||
Diffusion:=AvecInit;
|
Diffusion:=AvecInit;
|
||||||
|
|
||||||
Application.processMessages;
|
Application.processMessages;
|
||||||
@@ -7833,11 +7940,11 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
inc(k);
|
inc(k);
|
||||||
sort:=(k>70) or (posST=0) and (posDT=0) and (posAC=0) and (posSG=0);
|
sort:=(k>100) or (posST=0) and (posDT=0) and (posAC=0) and (posSG=0);
|
||||||
until (sort);
|
until (sort);
|
||||||
|
|
||||||
//Affiche('Ligne traitée'+recuCDM,clLime);
|
//Affiche('Ligne traitée'+recuCDM,clLime);
|
||||||
if k>=70 then begin Affiche('Erreur 90 : Longrestante='+IntToSTR(length(recuCDM)),clred); Affiche(recuCDM,clred); end;
|
if k>=100 then begin Affiche('Erreur 90 : Longrestante='+IntToSTR(length(recuCDM)),clred); Affiche(recuCDM,clred); end;
|
||||||
Nbre_recu_cdm:=0;
|
Nbre_recu_cdm:=0;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@@ -7878,8 +7985,8 @@ end;
|
|||||||
|
|
||||||
|
|
||||||
procedure TFormPrinc.Codificationdesfeux1Click(Sender: TObject);
|
procedure TFormPrinc.Codificationdesfeux1Click(Sender: TObject);
|
||||||
var i,j,k,NfeuxDir,adresse : integer;
|
var i,j,k,l,CondCarre,NfeuxDir,adresse : integer;
|
||||||
s : string;
|
s,s2 : string;
|
||||||
begin
|
begin
|
||||||
Affiche('Codification interne des feux',Cyan);
|
Affiche('Codification interne des feux',Cyan);
|
||||||
|
|
||||||
@@ -7901,6 +8008,23 @@ begin
|
|||||||
end;
|
end;
|
||||||
if feux[i].decodeur=6 then
|
if feux[i].decodeur=6 then
|
||||||
s:=s+' Cible unisemaf='+intToSTR(feux[i].Unisemaf);
|
s:=s+' Cible unisemaf='+intToSTR(feux[i].Unisemaf);
|
||||||
|
|
||||||
|
// conditions sur carré
|
||||||
|
CondCarre:=Length(feux[i].condcarre[1]);
|
||||||
|
l:=1;
|
||||||
|
s2:='';
|
||||||
|
while condCarre<>0 do
|
||||||
|
begin
|
||||||
|
if condcarre<>0 then dec(condcarre);
|
||||||
|
for k:=1 to condCarre do
|
||||||
|
begin
|
||||||
|
s2:=s2+'A'+IntToSTR(feux[i].condcarre[l][k].Adresse)+feux[i].condcarre[l][k].PosAig+' ';
|
||||||
|
end;
|
||||||
|
s2:=s2+'/';
|
||||||
|
inc(l);
|
||||||
|
CondCarre:=Length(feux[i].condcarre[l]);
|
||||||
|
end;
|
||||||
|
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
// feu directionnel
|
// feu directionnel
|
||||||
@@ -7918,6 +8042,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
Affiche(s,clYellow);
|
Affiche(s,clYellow);
|
||||||
|
if s2<>'' then Affiche('Conditions de carré : '+s2,clYellow);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|||||||
BIN
Binary file not shown.
Binary file not shown.
+1
-1
@@ -23,7 +23,7 @@ var
|
|||||||
Lance_verif : integer;
|
Lance_verif : integer;
|
||||||
verifVersion,notificationVersion : boolean;
|
verifVersion,notificationVersion : boolean;
|
||||||
|
|
||||||
Const Version='1.74'; //Version='1.2';// sert à la comparaison de la version publiée
|
Const Version='1.75'; // sert à la comparaison de la version publiée
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
|
|||||||
@@ -27,6 +27,8 @@ version 1.72 : affichage message si configuration erronn
|
|||||||
version 1.73 : Amélioration du couper du TCO - Ajout de détecteurs sur les élements de voies 1 10 11 et 20 pour le TCO
|
version 1.73 : Amélioration du couper du TCO - Ajout de détecteurs sur les élements de voies 1 10 11 et 20 pour le TCO
|
||||||
Affichage d'aide sur les éléments décrits dans le panneau de configuration
|
Affichage d'aide sur les éléments décrits dans le panneau de configuration
|
||||||
version 1.74 : Amélioration des affichages du TCO - Pilotage des aiguillages depuis le TCO - Amélioration du séquençage d'ouverture de CDM Rail
|
version 1.74 : Amélioration des affichages du TCO - Pilotage des aiguillages depuis le TCO - Amélioration du séquençage d'ouverture de CDM Rail
|
||||||
|
Version 1.75 : conditions supplémentaires permettant l'affichage d'un carré sur un signal en fonction des aiguillages dans le fichier config.cfg
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user