This commit is contained in:
f1iwq2
2022-02-13 11:04:32 +01:00
parent 950310ba04
commit 864a101dc5
9 changed files with 337 additions and 166 deletions

Binary file not shown.

View File

@@ -1,9 +1,9 @@
object FormDebug: TFormDebug object FormDebug: TFormDebug
Left = 285 Left = 219
Top = 142 Top = 67
Width = 842 Width = 842
Height = 784 Height = 784
VertScrollBar.Position = 7 VertScrollBar.Position = 39
Caption = 'Fen'#234'tre de d'#233'bug' Caption = 'Fen'#234'tre de d'#233'bug'
Color = clWindow Color = clWindow
TransparentColorValue = clTeal TransparentColorValue = clTeal
@@ -22,7 +22,7 @@ object FormDebug: TFormDebug
TextHeight = 13 TextHeight = 13
object Label1: TLabel object Label1: TLabel
Left = 642 Left = 642
Top = -3 Top = -35
Width = 108 Width = 108
Height = 13 Height = 13
Anchors = [akTop, akRight] Anchors = [akTop, akRight]
@@ -38,7 +38,7 @@ object FormDebug: TFormDebug
end end
object Label2: TLabel object Label2: TLabel
Left = 474 Left = 474
Top = -5 Top = -37
Width = 131 Width = 131
Height = 18 Height = 18
Anchors = [akTop, akRight] Anchors = [akTop, akRight]
@@ -52,7 +52,7 @@ object FormDebug: TFormDebug
end end
object EditNivDebug: TEdit object EditNivDebug: TEdit
Left = 754 Left = 754
Top = -5 Top = -37
Width = 49 Width = 49
Height = 21 Height = 21
Anchors = [akTop, akRight] Anchors = [akTop, akRight]
@@ -68,7 +68,7 @@ object FormDebug: TFormDebug
end end
object MemoEvtDet: TMemo object MemoEvtDet: TMemo
Left = 570 Left = 570
Top = 329 Top = 297
Width = 239 Width = 239
Height = 201 Height = 201
Anchors = [akTop, akRight] Anchors = [akTop, akRight]
@@ -89,7 +89,7 @@ object FormDebug: TFormDebug
end end
object ButtonEcrLog: TButton object ButtonEcrLog: TButton
Left = 466 Left = 466
Top = 321 Top = 289
Width = 97 Width = 97
Height = 29 Height = 29
Anchors = [akTop, akRight] Anchors = [akTop, akRight]
@@ -99,7 +99,7 @@ object FormDebug: TFormDebug
end end
object ButtonRazTampon: TButton object ButtonRazTampon: TButton
Left = 466 Left = 466
Top = 353 Top = 321
Width = 97 Width = 97
Height = 33 Height = 33
Anchors = [akTop, akRight] Anchors = [akTop, akRight]
@@ -110,7 +110,7 @@ object FormDebug: TFormDebug
end end
object ButtonCherche: TButton object ButtonCherche: TButton
Left = 466 Left = 466
Top = 289 Top = 257
Width = 97 Width = 97
Height = 25 Height = 25
Anchors = [akTop, akRight] Anchors = [akTop, akRight]
@@ -120,7 +120,7 @@ object FormDebug: TFormDebug
end end
object ButtonAffEvtChrono: TButton object ButtonAffEvtChrono: TButton
Left = 466 Left = 466
Top = 249 Top = 217
Width = 97 Width = 97
Height = 33 Height = 33
Anchors = [akTop, akRight] Anchors = [akTop, akRight]
@@ -131,7 +131,7 @@ object FormDebug: TFormDebug
end end
object ButtonCop: TButton object ButtonCop: TButton
Left = 466 Left = 466
Top = 201 Top = 169
Width = 97 Width = 97
Height = 41 Height = 41
Anchors = [akTop, akRight] Anchors = [akTop, akRight]
@@ -148,7 +148,7 @@ object FormDebug: TFormDebug
end end
object RichEdit: TRichEdit object RichEdit: TRichEdit
Left = 570 Left = 570
Top = 169 Top = 137
Width = 239 Width = 239
Height = 153 Height = 153
Anchors = [akTop, akRight] Anchors = [akTop, akRight]
@@ -167,7 +167,7 @@ object FormDebug: TFormDebug
end end
object ButtonRazLog: TButton object ButtonRazLog: TButton
Left = 466 Left = 466
Top = 393 Top = 361
Width = 97 Width = 97
Height = 33 Height = 33
Anchors = [akTop, akRight] Anchors = [akTop, akRight]
@@ -178,9 +178,9 @@ object FormDebug: TFormDebug
end end
object GroupBox1: TGroupBox object GroupBox1: TGroupBox
Left = 464 Left = 464
Top = 601 Top = 569
Width = 345 Width = 345
Height = 145 Height = 177
Anchors = [akTop, akRight] Anchors = [akTop, akRight]
Caption = 'Fonctions primitives' Caption = 'Fonctions primitives'
Color = cl3DLight Color = cl3DLight
@@ -273,8 +273,8 @@ object FormDebug: TFormDebug
Left = 8 Left = 8
Top = 88 Top = 88
Width = 329 Width = 329
Height = 49 Height = 81
Caption = 'D'#233'tecteur suivant' Caption = 'D'#233'tecteur/'#233'l'#233'ment suivant'
TabOrder = 1 TabOrder = 1
object ButtonDetSuiv: TButton object ButtonDetSuiv: TButton
Left = 16 Left = 16
@@ -282,8 +282,8 @@ object FormDebug: TFormDebug
Width = 185 Width = 185
Height = 25 Height = 25
Hint = Hint =
'Renvoie l'#39#233'l'#233'ment suivant aux deux '#233'l'#233'ments (d'#233'tecteurs ou aigui' + 'Renvoie le d'#233'tecteur suivant aux deux '#233'l'#233'ments (d'#233'tecteurs ou ai' +
'llages) ' 'guillages) '
Caption = 'D'#233'tecteur suivant aux '#233'l'#233'ments' Caption = 'D'#233'tecteur suivant aux '#233'l'#233'ments'
ParentShowHint = False ParentShowHint = False
ShowHint = True ShowHint = True
@@ -292,7 +292,7 @@ object FormDebug: TFormDebug
end end
object EditPrec: TEdit object EditPrec: TEdit
Left = 208 Left = 208
Top = 18 Top = 34
Width = 49 Width = 49
Height = 21 Height = 21
Hint = 'Element pr'#233'c'#233'dent' Hint = 'Element pr'#233'c'#233'dent'
@@ -302,7 +302,7 @@ object FormDebug: TFormDebug
end end
object EditActuel: TEdit object EditActuel: TEdit
Left = 264 Left = 264
Top = 18 Top = 34
Width = 49 Width = 49
Height = 21 Height = 21
Hint = 'Element actuel' Hint = 'Element actuel'
@@ -310,11 +310,23 @@ object FormDebug: TFormDebug
ShowHint = True ShowHint = True
TabOrder = 2 TabOrder = 2
end end
object ButtonElSuiv: TButton
Left = 16
Top = 48
Width = 185
Height = 25
Hint =
'Renvoie l'#39#233'l'#233'ment suivant aux deux '#233'l'#233'ments (d'#233'tecteurs ou aigui' +
'llages) '
Caption = 'Element suivant aux '#233'l'#233'ments'
TabOrder = 3
OnClick = ButtonElSuivClick
end
end end
end end
object GroupBox2: TGroupBox object GroupBox2: TGroupBox
Left = 464 Left = 464
Top = 13 Top = -19
Width = 345 Width = 345
Height = 149 Height = 149
Anchors = [akTop, akRight] Anchors = [akTop, akRight]
@@ -486,7 +498,7 @@ object FormDebug: TFormDebug
end end
object RichDebug: TRichEdit object RichDebug: TRichEdit
Left = 8 Left = 8
Top = 1 Top = -31
Width = 457 Width = 457
Height = 743 Height = 743
Anchors = [akLeft, akTop, akRight, akBottom] Anchors = [akLeft, akTop, akRight, akBottom]
@@ -500,7 +512,7 @@ object FormDebug: TFormDebug
end end
object GroupBox5: TGroupBox object GroupBox5: TGroupBox
Left = 464 Left = 464
Top = 537 Top = 505
Width = 345 Width = 345
Height = 57 Height = 57
Anchors = [akTop, akRight] Anchors = [akTop, akRight]
@@ -567,7 +579,7 @@ object FormDebug: TFormDebug
end end
object ButtonRazTout: TButton object ButtonRazTout: TButton
Left = 467 Left = 467
Top = 169 Top = 137
Width = 97 Width = 97
Height = 25 Height = 25
Anchors = [akTop, akRight] Anchors = [akTop, akRight]

View File

@@ -55,6 +55,7 @@ type
ButtonSimuAct0: TButton; ButtonSimuAct0: TButton;
ButtonSimuAct1: TButton; ButtonSimuAct1: TButton;
CheckDebugTrames: TCheckBox; CheckDebugTrames: TCheckBox;
ButtonElSuiv: TButton;
procedure FormCreate(Sender: TObject); procedure FormCreate(Sender: TObject);
procedure ButtonEcrLogClick(Sender: TObject); procedure ButtonEcrLogClick(Sender: TObject);
procedure EditNivDebugKeyPress(Sender: TObject; var Key: Char); procedure EditNivDebugKeyPress(Sender: TObject; var Key: Char);
@@ -88,6 +89,7 @@ type
procedure ButtonSimuAct1Click(Sender: TObject); procedure ButtonSimuAct1Click(Sender: TObject);
procedure ButtonSimuAct0Click(Sender: TObject); procedure ButtonSimuAct0Click(Sender: TObject);
procedure CheckDebugTramesClick(Sender: TObject); procedure CheckDebugTramesClick(Sender: TObject);
procedure ButtonElSuivClick(Sender: TObject);
private private
{ Déclarations privées } { Déclarations privées }
public public
@@ -499,4 +501,37 @@ begin
debugtrames:=checkDebugTrames.checked; debugtrames:=checkDebugTrames.checked;
end; end;
procedure TFormDebug.ButtonElSuivClick(Sender: TObject);
var Adr,Prec,Actuel,erreur,ancdebug : integer ;
type1,type2 : tequipement;
s1,s2,s : string;
begin
ancdebug:=NivDebug;
NivDebug:=3;
s1:=EditPrec.Text;
s2:=EditActuel.Text;
if (s1='') or (s2='') then exit;
if s1[1]='A' then begin type1:=aig;delete(s1,1,1);end else type1:=det;
if s2[1]='A' then begin type2:=aig;delete(s2,1,1);end else type2:=det;
Val(s1,prec,erreur); if erreur<>0 then exit;
Val(s2,Actuel,erreur); if erreur<>0 then exit;
Adr:=suivant_Alg3(prec,type1,actuel,type2,1);
if Adr<9996 then
begin
s:='L''élément suivant aux éléments '+IntToSTR(prec)+'/'+IntToSTR(actuel)+' est '+IntToSTR(Adr)+' ';
case typeGen of
aig : s:=s+'aiguillage';
tjd : s:=s+'tjd';
tjs : s:=s+'tjs';
triple : s:=s+'triple';
det : s:=s+'détecteur';
buttoir : s:=s+'buttoir';
end;
AfficheDebug(s,clYellow);
end
else AfficheDebug('Pas trouvé d''élement suvant aux éléments '+IntToSTR(prec)+'/'+IntToSTR(actuel),clyellow);
NivDebug:=AncDebug;
end;
end. end.

Binary file not shown.

View File

@@ -3,7 +3,7 @@ Unit UnitPrinc;
programme signaux complexes Graphique Lenz programme signaux complexes Graphique Lenz
delphi 7 + activeX Tmscomm + clientSocket delphi 7 + activeX Tmscomm + clientSocket
******************************************** ********************************************
8/2/2022 14h 13/2/2022 11h00
note sur le pilotage des accessoires: note sur le pilotage des accessoires:
raquette octet sortie raquette octet sortie
+ 2 = aiguillage droit = sortie 2 de l'adresse d'accessoire + 2 = aiguillage droit = sortie 2 de l'adresse d'accessoire
@@ -377,7 +377,7 @@ var
Aig_supprime,Aig_sauve : TAiguillage; Aig_supprime,Aig_sauve : TAiguillage;
Fimage : Timage; Fimage : Timage;
BrancheN : array[1..100,1..200] of TBranche; // BrancheN : array[1..100,1..200] of TBranche;
{$R *.dfm} {$R *.dfm}
@@ -409,7 +409,7 @@ function etat_signal_suivant(Adresse,rang : integer) : integer;
function suivant_alg3(prec : integer;typeELprec : TEquipement;actuel : integer;typeElActuel : TEquipement;alg : integer) : integer; function suivant_alg3(prec : integer;typeELprec : TEquipement;actuel : integer;typeElActuel : TEquipement;alg : integer) : integer;
function detecteur_suivant_El(el1: integer;TypeDet1 : TEquipement;el2 : integer;TypeDet2 : TEquipement;alg : integer) : integer ; function detecteur_suivant_El(el1: integer;TypeDet1 : TEquipement;el2 : integer;TypeDet2 : TEquipement;alg : integer) : integer ;
function test_memoire_zones(adresse : integer) : boolean; function test_memoire_zones(adresse : integer) : boolean;
function PresTrainPrec(AdrFeu : integer) : boolean; function PresTrainPrec(Adresse : integer) : boolean;
function cond_carre(adresse : integer) : boolean; function cond_carre(adresse : integer) : boolean;
function carre_signal(adresse : integer) : boolean; function carre_signal(adresse : integer) : boolean;
procedure Event_Detecteur(Adresse : integer;etat : boolean;train : string); procedure Event_Detecteur(Adresse : integer;etat : boolean;train : string);
@@ -665,7 +665,7 @@ begin
Temp:=HtImage-ySem; YSem:=XSem;XSem:=Temp; Temp:=HtImage-ySem; YSem:=XSem;XSem:=Temp;
Temp:=HtImage-yvert; Yvert:=Xvert;Xvert:=Temp; Temp:=HtImage-yvert; Yvert:=Xvert;Xvert:=Temp;
end; end;
if (orientation=3) then if (orientation=3) then
begin begin
//rotation 90° vers la droite des feux //rotation 90° vers la droite des feux
@@ -1743,7 +1743,7 @@ begin
end; end;
// mise à jour de l'état du signal dans le tableau Feux // mise à jour de l'état du signal dans le tableau Feux
i:=Index_feu(adresse); i:=Index_feu(adresse);
feux[i].EtatSignal:=EtatSignalCplx[adresse]; if i<>0 then feux[i].EtatSignal:=EtatSignalCplx[adresse];
end; end;
@@ -2732,9 +2732,9 @@ begin
if ((aspect=2) and (UniSem=2)) or if ((aspect=2) and (UniSem=2)) or
((aspect=3) and (UniSem=3)) or ((aspect=3) and (UniSem=3)) or
((aspect=4) and (UniSem=4)) or ((aspect=4) and (UniSem=4)) or
((aspect=5) and ((UniSem=51) or (UniSem=52))) or ((aspect=5) and ((UniSem=51) or (UniSem=52))) or
((aspect=7) and ((UniSem=71) or (UniSem=72) or (UniSem=73))) or ((aspect=7) and ((UniSem=71) or (UniSem=72) or (UniSem=73))) or
((aspect=9) and ((UniSem>=90) or (UniSem<=99))) ((aspect=9) and ((UniSem>=90) or (UniSem<=99)))
then Verif_unisemaf:=0 then Verif_unisemaf:=0
else Verif_Unisemaf:=2; else Verif_Unisemaf:=2;
end; end;
@@ -2786,6 +2786,7 @@ end;
// renvoie élément suivant entre deux éléments quels qu'ils soient mais contigus // renvoie élément suivant entre deux éléments quels qu'ils soient mais contigus
// attention, si les éléments ne sont pas contigus, le résultat est erronné!!!
// et en variables globales: typeGen le type de l'élément // et en variables globales: typeGen le type de l'élément
// s'ils ne sont pas contigus, on aura une erreur // s'ils ne sont pas contigus, on aura une erreur
// alg= algorithme : // alg= algorithme :
@@ -2811,6 +2812,7 @@ var Adr,AdrPrec,indexBranche_prec,branche_trouve_prec,indexBranche_actuel,branc
if (typeGen=tjd) then // si le précédent est une TJD/S et le suivant aussi , substituer pointe (chgt de actuel en VAR dans la déclaration de alg3) if (typeGen=tjd) then // si le précédent est une TJD/S et le suivant aussi , substituer pointe (chgt de actuel en VAR dans la déclaration de alg3)
begin begin
IndexAdr:=index_aig(Adr); IndexAdr:=index_aig(Adr);
IndexActuel:=index_aig(Actuel); IndexActuel:=index_aig(Actuel);
if ((aiguillage[IndexAdr].modele=tjd) or (aiguillage[indexAdr].modele=tjs)) and if ((aiguillage[IndexAdr].modele=tjd) or (aiguillage[indexAdr].modele=tjs)) and
((aiguillage[indexActuel].modele=tjd) or (aiguillage[indexActuel].modele=tjs)) then ((aiguillage[indexActuel].modele=tjd) or (aiguillage[indexActuel].modele=tjs)) then
@@ -3354,9 +3356,8 @@ begin
substitue; substitue;
exit; exit;
end; end;
s:='1026 - Erreur fatale - position TJD/S '+IntToSTR(Adr)+'/'+intToSTR(AdrTJDP)+' inconnue'; s:='1026 - position TJD/S '+IntToSTR(Adr)+'/'+intToSTR(AdrTJDP)+' inconnue';
Affiche(s,clred); AfficheDebug(s,clOrange);
AfficheDebug(s,clred);
suivant_alg3:=9999;exit; suivant_alg3:=9999;exit;
end; end;
@@ -3492,7 +3493,7 @@ end;
// algo= type d'algorythme pour suivant_alg3 // algo= type d'algorythme pour suivant_alg3
function detecteur_suivant(prec : integer;TypeElPrec : TEquipement;actuel : integer;TypeElActuel : TEquipement;algo : integer) : integer ; function detecteur_suivant(prec : integer;TypeElPrec : TEquipement;actuel : integer;TypeElActuel : TEquipement;algo : integer) : integer ;
var actuelCalc,PrecCalc,j,AdrSuiv ,indexCalc : integer; var actuelCalc,PrecCalc,j,AdrSuiv ,indexCalc : integer;
TypeprecCalc,TypeActuelCalc : TEquipement; TypeprecCalc,TypeActuelCalc : TEquipement;
begin begin
if NivDebug>=2 then if NivDebug>=2 then
AfficheDebug('Proc Detecteur_suivant '+IntToSTR(prec)+','+IntToSTR(BTypeToNum(typeElPrec))+'/'+intToSTR(actuel)+','+ AfficheDebug('Proc Detecteur_suivant '+IntToSTR(prec)+','+IntToSTR(BTypeToNum(typeElPrec))+'/'+intToSTR(actuel)+','+
@@ -3606,7 +3607,7 @@ var IndexBranche_det1,IndexBranche_det2,branche_trouve_det1,branche_trouve_det2,
TypePrec,TypeFonc : Tequipement; TypePrec,TypeFonc : Tequipement;
s : string; s : string;
label reprise; label reprise;
begin begin
if NivDebug>=2 then if NivDebug>=2 then
AfficheDebug('Proc Detecteur_suivant_EL '+intToSTR(el1)+','+intToSTR(BTypeToNum(Typedet1))+'/'+intToSTR(el2)+','+intToSTR(BTypeToNum(Typedet2))+'-------------------------',clLime); AfficheDebug('Proc Detecteur_suivant_EL '+intToSTR(el1)+','+intToSTR(BTypeToNum(Typedet1))+'/'+intToSTR(el2)+','+intToSTR(BTypeToNum(Typedet2))+'-------------------------',clLime);
@@ -3647,7 +3648,7 @@ begin
j:=1; // J=1 test en incrément J=2 test en décrément j:=1; // J=1 test en incrément J=2 test en décrément
// étape 1 : trouver le sens de progression (en incrément ou en décrément) // étape 1 : trouver le sens de progression (en incrément ou en décrément)
repeat repeat
//préparer les variables //préparer les variables
AdrPrec:=el1;TypePrec:=typeDet1; AdrPrec:=el1;TypePrec:=typeDet1;
@@ -3694,7 +3695,7 @@ begin
sortie:=((typeDet2=TypeGen) and (Adr=el2)) or (Adr=0) or (Adr>=9996) or (i=15) or (N_Det=Nb_det_dist); sortie:=((typeDet2=TypeGen) and (Adr=el2)) or (Adr=0) or (Adr>=9996) or (i=15) or (N_Det=Nb_det_dist);
until sortie ; until sortie ;
if (i=15) and (Nivdebug=3) then afficheDebug('Pas trouvé',clyellow); if (i=15) and (Nivdebug=3) then afficheDebug('Pas trouvé',clyellow);
if (N_det=Nb_det_dist) and (Nivdebug=3) then if (N_det=Nb_det_dist) and (Nivdebug=3) then
begin begin
s:='Elements trop distants '+intToStr(el1)+' '+intToSTR(el2); s:='Elements trop distants '+intToStr(el1)+' '+intToSTR(el2);
afficheDebug(s,clorange); afficheDebug(s,clorange);
@@ -3765,7 +3766,7 @@ begin
if i=0 then if i=0 then
begin begin
Affiche('Erreur 602 - feu '+IntToSTR(adresse)+' non trouvé',clred); Affiche('Erreur 602 - feu '+IntToSTR(adresse)+' non trouvé',clred);
if NivDebug=3 then AfficheDebug('Erreur 602 - feu '+IntToSTR(adresse)+' non trouvé',clred); if NivDebug=3 then AfficheDebug('Erreur 602 - feu '+IntToSTR(adresse)+' non trouvé',clred);
cond_carre:=true; cond_carre:=true;
exit; exit;
end; end;
@@ -3816,10 +3817,10 @@ begin
if (NivDebug>=1) then AfficheDebug('Test si signal '+IntToSTR(adresse)+' doit afficher un carré si aiguillage avals mal positionnés',clyellow); if (NivDebug>=1) then AfficheDebug('Test si signal '+IntToSTR(adresse)+' doit afficher un carré si aiguillage avals mal positionnés',clyellow);
i:=Index_feu(adresse); i:=Index_feu(adresse);
if i=0 then if i=0 then
begin begin
Affiche('Erreur 603 - feu '+IntToSTR(adresse)+' non trouvé',clred); Affiche('Erreur 603 - feu '+IntToSTR(adresse)+' non trouvé',clred);
if NivDebug=3 then AfficheDebug('Erreur 603 - feu '+IntToSTR(adresse)+' non trouvé',clred); if NivDebug=3 then AfficheDebug('Erreur 603 - feu '+IntToSTR(adresse)+' non trouvé',clred);
carre_signal:=true; carre_signal:=true;
exit; exit;
end; end;
@@ -3898,6 +3899,12 @@ begin
//traceDet:=true; //traceDet:=true;
if NivDebug>=2 then AfficheDebug('Cherche état du signal suivant au '+IntToSTR(adresse),clyellow); if NivDebug>=2 then AfficheDebug('Cherche état du signal suivant au '+IntToSTR(adresse),clyellow);
i:=Index_feu(adresse); i:=Index_feu(adresse);
if i=0 then
begin
if NivDebug>=2 then AfficheDebug('Feu '+IntToSTR(adresse)+' non trouvé',clyellow);
etat_signal_suivant:=0;
exit;
end;
if feux[i].aspect>10 then if feux[i].aspect>10 then
begin begin
s:='La demande de l''état du signal suivant depuis un feu directionnel '+IntToSTR(Adresse)+' est irrecevable'; s:='La demande de l''état du signal suivant depuis un feu directionnel '+IntToSTR(Adresse)+' est irrecevable';
@@ -3967,9 +3974,9 @@ begin
if (TypeActuel=det) then // détecteur? if (TypeActuel=det) then // détecteur?
begin begin
i:=Index_feu_det(Actuel); // trouve l'index de feu affecté au détecteur "Actuel" i:=Index_feu_det(Actuel); // trouve l'index de feu affecté au détecteur "Actuel"
AdrFeu:=Feux[i].Adresse; if i<>0 then
if adrFeu<>0 then
begin begin
AdrFeu:=Feux[i].Adresse;
if nivdebug=3 then afficheDebug('Détecteur='+IntToSTR(AdrSuiv)+' AdrFeu='+IntToSTR(AdrFeu)+' prec='+IntToSTR(prec),clyellow ); if nivdebug=3 then afficheDebug('Détecteur='+IntToSTR(AdrSuiv)+' AdrFeu='+IntToSTR(AdrFeu)+' prec='+IntToSTR(prec),clyellow );
if (adrFeu=Adresse) then // si on ne reboucle sur le même signal dont on cherche le suivant if (adrFeu=Adresse) then // si on ne reboucle sur le même signal dont on cherche le suivant
begin begin
@@ -4014,6 +4021,11 @@ begin
if NivDebug>=2 then AfficheDebug('Test si aiguille déviée après signal '+IntToSTR(Adresse),clyellow); if NivDebug>=2 then AfficheDebug('Test si aiguille déviée après signal '+IntToSTR(Adresse),clyellow);
j:=0; j:=0;
i:=Index_feu(adresse); i:=Index_feu(adresse);
if i=0 then
begin
Affiche('Erreur 168: signal '+intToSTR(adresse)+' non trouvé',clred);
exit;
end;
prec:=feux[i].Adr_det1; prec:=feux[i].Adr_det1;
TypePrec:=det; TypePrec:=det;
actuel:=feux[i].Adr_el_suiv1; actuel:=feux[i].Adr_el_suiv1;
@@ -4115,13 +4127,13 @@ end;
// adresse=adresse du signal // adresse=adresse du signal
function test_memoire_zones(adresse : integer) : boolean; function test_memoire_zones(adresse : integer) : boolean;
var var
AdrSuiv,prec,ife,actuel,Etat,AdrFeu,i,j,PresTrain01,PrecInitial, AdrSuiv,prec,ife,actuel,i,j,
N_Det : integer; dernierdet,AdrFeu,Nfeux,NFeuxMax : integer;
TypePrec,TypeActuel : TEquipement; TypePrec,TypeActuel : TEquipement;
Pres_train,sort : boolean; Pres_train : boolean;
s : string; s : string;
begin begin
if NivDebug>=1 then AfficheDebug('Proc test_memoire_zones('+intToSTR(adresse)+') au signal suivant ',clyellow); if NivDebug>=1 then AfficheDebug('Proc test_memoire_zones('+intToSTR(adresse)+')',clyellow);
i:=Index_feu(adresse); i:=Index_feu(adresse);
if (i=0) then if (i=0) then
begin begin
@@ -4130,123 +4142,114 @@ begin
test_memoire_zones:=false; test_memoire_zones:=false;
end; end;
Nfeux:=0;
NFeuxMax:=1; // nombre de feux à trouver (nombre de cantons)
Pres_train:=FALSE; Pres_train:=FALSE;
ife:=1; // index feu de 1 à 4 pour explorer les 4 détecteurs d'un feu ife:=1; // index feu de 1 à 4 pour explorer les 4 détecteurs d'un feu
repeat repeat
j:=0; j:=0;
N_Det:=0;
if NivDebug=3 then AfficheDebug('Boucle de test feu '+intToSTR(ife)+'/4',clOrange); if NivDebug=3 then AfficheDebug('Boucle de test feu '+intToSTR(ife)+'/4',clOrange);
if (ife=1) then if (ife=1) then
begin begin
prec:=feux[i].Adr_det1; prec:=feux[i].Adr_det1;
actuel:=feux[i].Adr_el_suiv1; Actuel:=feux[i].Adr_el_suiv1;
TypeActuel:=feux[i].Btype_suiv1; TypeActuel:=feux[i].Btype_suiv1;
end; //détecteur sur le signal courant end; //détecteur sur le signal courant
if (ife=2) then if (ife=2) then
begin begin
prec:=feux[i].Adr_det2; prec:=feux[i].Adr_det2;
actuel:=feux[i].Adr_el_suiv2; Actuel:=feux[i].Adr_el_suiv2;
TypeActuel:=feux[i].Btype_suiv2; TypeActuel:=feux[i].Btype_suiv2;
end; // détecteur sur le signal courant end; // détecteur sur le signal courant
if (ife=3) then if (ife=3) then
begin begin
prec:=feux[i].Adr_det3; prec:=feux[i].Adr_det3;
actuel:=feux[i].Adr_el_suiv3; Actuel:=feux[i].Adr_el_suiv3;
TypeActuel:=feux[i].Btype_suiv3; TypeActuel:=feux[i].Btype_suiv3;
end; // détecteur sur le signal courant end; // détecteur sur le signal courant
if (ife=4) then if (ife=4) then
begin begin
prec:=feux[i].Adr_det4; prec:=feux[i].Adr_det4;
actuel:=feux[i].Adr_el_suiv4; Actuel:=feux[i].Adr_el_suiv4;
TypeActuel:=feux[i].Btype_suiv4; TypeActuel:=feux[i].Btype_suiv4;
end; // détecteur sur le signal courant end; // détecteur sur le signal courant
TypePrec:=det; TypePrec:=det;
if (prec=0) then dernierdet:=prec;
begin
// sortie si aucun détecteur déclaré sur le feu
test_memoire_zones:=Pres_train;
exit;
end;
PrecInitial:=Prec; // purge les aiguillages après le feu
if TypeActuel=aig then
repeat repeat
inc(j); AdrSuiv:=suivant_alg3(prec,TypePrec,actuel,TypeActuel,1);
// à la première itération, si "actuel" est déja un détecteur, ne pas faire de recherche sur le suivant if (AdrSuiv>9900) or (AdrSuiv=0) then
// et chaîner mémoire de zone
if (j=1) and (Typeactuel=det) then // si détecteur
begin begin
Pres_train:=MemZone[Prec,actuel]; test_memoire_zones:=Pres_train;
if Pres_Train and (NivDebug=3) then Affiche('Présence train de '+intToSTR(prec)+' à '+intToSTR(actuel),clyellow);
end
else
begin
AdrSuiv:=suivant_alg3(prec,TypePrec,actuel,TypeActuel,1);
if Typegen=det then inc(N_Det);
prec:=actuel;TypePrec:=TypeActuel;
actuel:=AdrSuiv;TypeActuel:=typeGen;
if AdrSuiv>9990 then
begin
test_memoire_zones:=false;exit;
end;
end;
if NivDebug=3 then AfficheDebug('132 - suivant='+IntToSTR(adrsuiv)+'/'+BtypeToChaine(TypeGen),clYellow);
if actuel=0 then
begin
// si c'est un buttoir
test_memoire_zones:=false;
if NivDebug=3 then AfficheDebug('sortie car buttoir',clyellow);
exit; exit;
end; end;
// si le suivant est un détecteur ; contrôler mémoire de zone et comporte t-il un signal? prec:=actuel;TypePrec:=TypeActuel;
AdrFeu:=0; actuel:=AdrSuiv;TypeActuel:=typeGen;
if (TypeActuel=det) then // détecteur until typeactuel=det;
repeat
inc(j);
if (typeactuel=det) and (dernierdet<>0) then
begin begin
if (NivDebug>0) and MemZone[PrecInitial][actuel] then AfficheDebug('Présence train de '+intToSTR(PrecInitial)+' à '+intToSTR(actuel),clyellow); Pres_train:=MemZone[dernierdet,actuel] or Pres_Train;
if (nivDebug=3) then
Pres_train:=MemZone[PrecInitial][actuel] or Pres_train; // mémoire de zone
if Pres_Train then PresTrain01:=1 else PresTrain01:=0;
if NivDebug=3 then AfficheDebug('de '+IntToSTR(PrecInitial)+' à '+intToSTR(actuel)+'='+IntToSTR(PresTrain01),clyellow);
precInitial:=actuel; // pour préparer le suivant
i:=index_feu_det(AdrSuiv); // renvoie l'index du signal se trouvant au détecteur "AdrSuiv": il peut y avoir 4 détecteurs par signal
AdrFeu:=feux[i].adresse; // adresse du feu
if (AdrFeu=adresse) then // si on ne reboucle sur le même signal dont on cherche le suivant
begin begin
AdrFeu:=0;j:=10; // on ne trouve pas de suivant if Pres_Train then AfficheDebug('Présence train de '+intToSTR(dernierdet)+' à '+intToSTR(actuel),clyellow)
else AfficheDebug('Absence train de '+intToSTR(dernierdet)+' à '+intToSTR(actuel),clyellow)
end; end;
if (AdrFeu<>0) then // si l'adresse est <>0 dernierdet:=actuel;
begin
if (feux[i].Adr_el_suiv1<>prec) then // le feu est-il dans le bon sens de progression?
begin
s:='Trouvé feu '+IntToSTR(AdrFeu);
if (NivDebug>0) And Pres_Train then AfficheDebug(s+' et mémoire de zone à 1',clyellow);
if (NivDebug>0) And (not(Pres_Train)) then AfficheDebug(s+' et sortie proced:Mémoire de zone à 0',clyellow);
test_memoire_zones:=Pres_train;exit;
end i:=index_feu_det(Actuel); // renvoie l'index du signal se trouvant au détecteur "AdrSuiv": il peut y avoir 4 détecteurs par signal
else if i<>0 then
begin
AdrFeu:=feux[i].adresse; // adresse du feu
if (AdrFeu=adresse) then // si on ne reboucle sur le même signal dont on cherche le suivant
begin begin
if NivDebug=3 then AfficheDebug('Trouvé feu '+intToSTR(AdrFeu)+' mais dans le mauvais sens',clOrange); AdrFeu:=0;j:=10; // on ne trouve pas de suivant
AdrFeu:=0; test_memoire_zones:=false;
exit;
end;
if (AdrFeu<>0) then // si l'adresse est <>0
begin
if (feux[i].Adr_el_suiv1<>prec) then // le feu est-il dans le bon sens de progression?
begin
inc(Nfeux);
j:=0;
s:='Trouvé feu ('+IntToSTR(nfeux)+'/'+intToSTR(NFeuxMax)+') '+IntToSTR(AdrFeu);
if (NivDebug>0) And Pres_Train then AfficheDebug(s+' et mémoire de zone à 1',clyellow);
if (NivDebug>0) And (not(Pres_Train)) then AfficheDebug(s+' et mémoire de zone à 0',clOrange);
if nFeux=NFeuxMax then
begin
test_memoire_zones:=Pres_train;
exit;
end;
end
else
begin
if NivDebug=3 then AfficheDebug('Trouvé feu '+intToSTR(AdrFeu)+' mais dans le mauvais sens',clYellow);
AdrFeu:=0;
end;
end; end;
end
else
begin
//if (traceDet) {sprintf(Affiche,"Trouvé détecteur %d mais sans signal\r\n",AdrSuiv,Etat);Display(Affiche);
AdrFeu:=0;
end; end;
end
else
begin
if (NivDebug=3) then AfficheDebug('Trouvé aiguillage '+intToSTR(AdrSuiv),clyellow);
end; end;
sort:=(j=10) or (AdrFeu<>0) or (N_Det>=Nb_det_dist);
until (sort); // on arrete jusqu'à trouver un signal ou si on va trop loin (10 itérations) AdrSuiv:=suivant_alg3(prec,TypePrec,actuel,TypeActuel,1);
if (AdrSuiv=0) or (AdrSuiv>9990) then
begin
test_memoire_zones:=Pres_train;
exit;
end;
prec:=actuel;TypePrec:=TypeActuel;
actuel:=AdrSuiv;TypeActuel:=typeGen;
until (j=10); // on arrete si on va trop loin (10 itérations)
inc(ife); inc(ife);
until ife>=5; until ife>=5;
if (NivDebug>0) and (Etat=0) then AfficheDebug('Pas trouvé de signal suivant au '+intToSTR(adresse),clyellow); if (NivDebug>0) then AfficheDebug('Pas trouvé de signal suivant au '+intToSTR(adresse),clyellow);
test_memoire_zones:=Pres_train; test_memoire_zones:=Pres_train;
end; end;
@@ -4306,7 +4309,7 @@ end;
// trouve le détecteur suivant de det1 à det2 si la route est correcte. (détecteurs en entrée obligatoires) // trouve le détecteur suivant de det1 à det2 si la route est correcte. (détecteurs en entrée obligatoires)
// transmis dans le tableau Event_det // transmis dans le tableau Event_det
// Résultat: // Résultat:
// si >=9996 : pas de route // si 9999 : pas de route
// si 10 : ok route trouvée // si 10 : ok route trouvée
function test_route_valide(det1,det2,det3 : integer) : integer; function test_route_valide(det1,det2,det3 : integer) : integer;
var det_suiv,resultat : integer; var det_suiv,resultat : integer;
@@ -4317,33 +4320,150 @@ begin
test_route_valide:=9999; test_route_valide:=9999;
exit; exit;
end;
if (det_suiv>=9996) or (det3<>det_suiv) then begin resultat:=0; NivDebug:=0;end;
// test sens inverse.... // présence train précédent les 3 cantons du signal (soit 4 feux avant)
if resultat=0 then function PresTrainPrec(Adresse : integer) : boolean;
var
AdrSuiv,prec,ife,actuel,i,j,
dernierdet,AdrFeu,Nfeux,NFeuxMax : integer;
TypePrec,TypeActuel : TEquipement;
Pres_train : boolean;
s : string;
begin
if NivDebug>=1 then AfficheDebug('Proc testTrainPrec('+intToSTR(adresse)+')',clyellow);
i:=Index_feu(adresse);
if (i=0) then
begin begin
test_route_valide:=0;exit; Affiche('Erreur 605 - feu '+IntToSTR(adresse)+' non trouvé',clred);
// si manipulation proche aiguillage AfficheDebug('Erreur 605 - feu '+IntToSTR(adresse)+' non trouvé',clred);
det_suiv:=detecteur_suivant_el(det3,det,det2,det,1); PresTrainPrec:=false;
if (det_suiv>=9996) or (det1<>det_suiv) then begin test_route_valide:=0; NivDebug:=0;exit;end;
end; end;
test_route_valide:=10 ;
Nfeux:=0;
NFeuxMax:=3; // nombre de feux à trouver (nombre de cantons)
Pres_train:=FALSE;
ife:=1; // index feu de 1 à 4 pour explorer les 4 détecteurs d'un feu
repeat
j:=0;
if NivDebug=3 then AfficheDebug('Boucle de test feu '+intToSTR(ife)+'/4',clOrange);
if (ife=1) then
begin
actuel:=feux[i].Adr_det1;
prec:=feux[i].Adr_el_suiv1;
Typeprec:=feux[i].Btype_suiv1;
end; //détecteur sur le signal courant
if (ife=2) then
begin
actuel:=feux[i].Adr_det2;
prec:=feux[i].Adr_el_suiv2;
Typeprec:=feux[i].Btype_suiv2;
end; // détecteur sur le signal courant
if (ife=3) then
begin
actuel:=feux[i].Adr_det3;
prec:=feux[i].Adr_el_suiv3;
Typeprec:=feux[i].Btype_suiv3;
end; // détecteur sur le signal courant
if (ife=4) then
begin
actuel:=feux[i].Adr_det4;
prec:=feux[i].Adr_el_suiv4;
Typeprec:=feux[i].Btype_suiv4;
end; // détecteur sur le signal courant
TypeActuel:=det;
if actuel=0 then
begin
// sortie si aucun détecteur déclaré sur le feu
PresTrainPrec:=Pres_train;
exit;
end;
dernierdet:=actuel;
repeat
inc(j);
AdrSuiv:=suivant_alg3(prec,TypePrec,actuel,TypeActuel,2); // 2 car arrêt sur aiguille en talon mal positionnée
if (AdrSuiv=0) or (AdrSuiv>9990) then
begin
PresTrainPrec:=Pres_train;
exit;
end;
prec:=actuel;TypePrec:=TypeActuel;
actuel:=AdrSuiv;TypeActuel:=typeGen;
if typeactuel=det then
begin
Pres_train:=MemZone[actuel,dernierdet] or Pres_Train;
if (nivDebug=3) then
begin
if Pres_Train then
begin
AfficheDebug('Présence train de '+intToSTR(actuel)+' à '+intToSTR(dernierdet),clyellow);
PresTrainPrec:=Pres_train;
exit;
end
else AfficheDebug('Absence train de '+intToSTR(actuel)+' à '+intToSTR(dernierdet),clyellow)
end;
dernierdet:=actuel;
i:=index_feu_det(Actuel); // renvoie l'index du signal se trouvant au détecteur "AdrSuiv": il peut y avoir 4 détecteurs par signal
if i<>0 then
begin
AdrFeu:=feux[i].adresse; // adresse du feu
if (AdrFeu=adresse) then // si on ne reboucle sur le même signal dont on cherche le suivant
begin
AdrFeu:=0;j:=10; // on ne trouve pas de suivant
PresTrainPrec:=false;
exit;
end;
if (AdrFeu<>0) then // si l'adresse est <>0
begin
if (feux[i].Adr_el_suiv1=prec) then // le feu est-il dans le bon sens de progression?
begin
inc(Nfeux);
j:=0;
s:='Trouvé feu ('+IntToSTR(nfeux)+'/'+intToSTR(NFeuxMax)+') '+IntToSTR(AdrFeu);
if (NivDebug>0) And Pres_Train then AfficheDebug(s+' et mémoire de zone à 1',clyellow);
if (NivDebug>0) And (not(Pres_Train)) then AfficheDebug(s+' et mémoire de zone à 0',clOrange);
if nFeux=NFeuxMax then
begin
PresTrainPrec:=Pres_train;
exit;
end;
end
else
begin
if NivDebug=3 then AfficheDebug('Trouvé feu '+intToSTR(AdrFeu)+' mais dans le mauvais sens',clYellow);
AdrFeu:=0;
end;
end;
end;
end;
until (j=10); // on arrete jusqu'à trouver un signal ou si on va trop loin (10 itérations)
inc(ife);
until ife>=5;
if (NivDebug>0) then AfficheDebug('Pas trouvé de signal suivant au '+intToSTR(adresse),clyellow);
PresTrainPrec:=Pres_train;
end; end;
// présence train 3 détecteurs avant le feu // présence train 3 détecteurs avant le feu
function PresTrainPrec(AdrFeu : integer) : boolean; function PresTrainPrecVieux(AdrFeu : integer) : boolean;
var PresTrain : boolean; var PresTrain : boolean;
j,i,Det_initial,Adr_El_Suiv,DetPrec1,DetPrec2,DetPrec3,DetPrec4 : integer; j,i,Det_initial,Adr_El_Suiv,DetPrec1,DetPrec2,DetPrec3,DetPrec4 : integer;
Btype_el_suivant : TEquipement; Btype_el_suivant : TEquipement;
begin begin
If NivDebug=3 then AfficheDebug('Proc PresTrainPrec('+intToSTR(AdrFeu)+') ---------------',clOrange); If NivDebug=3 then AfficheDebug('Proc PresTrainPrec('+intToSTR(AdrFeu)+') ---------------',clOrange);
i:=index_feu(Adrfeu); i:=index_feu(Adrfeu);
if i=0 then if i=0 then
begin begin
Affiche('Erreur 604 - feu '+IntToSTR(adrFeu)+' non trouvé',clred); Affiche('Erreur 604 - feu '+IntToSTR(adrFeu)+' non trouvé',clred);
if NivDebug=3 then AfficheDebug('Erreur 604 - feu '+IntToSTR(adrFeu)+' non trouvé',clred); if NivDebug=3 then AfficheDebug('Erreur 604 - feu '+IntToSTR(adrFeu)+' non trouvé',clred);
PresTrainPrec:=false; PresTrainPrecVieux:=false;
exit; exit;
end; end;
@@ -4420,7 +4540,7 @@ begin
if presTrain Then afficheDebug('présence train feu '+intToSTR(AdrFeu),clorange) if presTrain Then afficheDebug('présence train feu '+intToSTR(AdrFeu),clorange)
else AfficheDebug('Absence train feu '+intToSTR(AdrFeu),clorange); else AfficheDebug('Absence train feu '+intToSTR(AdrFeu),clorange);
end; end;
PresTrainPrec:=presTrain; PresTrainPrecVieux:=presTrain;
end; end;
@@ -4513,7 +4633,7 @@ begin
PresTrain:=false; PresTrain:=false;
// détecteurs précédent le feu , pour déterminer si leurs mémoires de zones sont à 1 pour libérer le carré // détecteurs précédent le feu , pour déterminer si leurs mémoires de zones sont à 1 pour libérer le carré
if (Feux[index].VerrouCarre) and (Feux[index].aspect>=4) then presTrain:=PresTrainPrec(AdrFeu); if (Feux[index].VerrouCarre) and (Feux[index].aspect>=4) then presTrain:=PresTrainPrec(AdrFeu);
if AffSignal then afficheDebug('Fin de la recherche des 4 détecteurs précédents-----',clOrange); if AffSignal then afficheDebug('Fin de la recherche des 4 détecteurs précédents-----',clOrange);
// 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é
@@ -4666,8 +4786,8 @@ function buttoir_adjacent(adr : integer) : boolean;
begin begin
trouve_element(adr,det,1); // branche_trouve IndexBranche_trouve trouve_element(adr,det,1); // branche_trouve IndexBranche_trouve
if Branche_trouve=0 then begin buttoir_adjacent:=false;exit;end; if Branche_trouve=0 then begin buttoir_adjacent:=false;exit;end;
buttoir_adjacent:=( (BrancheN[branche_trouve,IndexBranche_trouve+1].Adresse=0) and (BrancheN[branche_trouve,IndexBranche_trouve+1].BType=buttoir) or buttoir_adjacent:=( (BrancheN[branche_trouve,IndexBranche_trouve+1].Adresse=0) and (BrancheN[branche_trouve,IndexBranche_trouve+1].BType=buttoir) or
(BrancheN[branche_trouve,IndexBranche_trouve-1].Adresse=0) and (BrancheN[branche_trouve,IndexBranche_trouve-1].BType=buttoir) ) (BrancheN[branche_trouve,IndexBranche_trouve-1].Adresse=0) and (BrancheN[branche_trouve,IndexBranche_trouve-1].BType=buttoir) )
end; end;
// calcul des zones depuis le tableau des fronts descendants des évènements détecteurs // calcul des zones depuis le tableau des fronts descendants des évènements détecteurs
@@ -5190,13 +5310,15 @@ label mise0;
begin begin
//Affiche(IntToSTR(adresse)+' '+intToSTr(octet),clYellow); //Affiche(IntToSTR(adresse)+' '+intToSTr(octet),clYellow);
index:=index_aig(adresse);
// test si pilotage aiguillage inversé // test si pilotage aiguillage inversé
if (acc=aigP) and (aiguillage[index].inversionCDM=1) then if (acc=aigP) then
begin begin
if octet=1 then octet:=2 else octet:=1; index:=index_aig(adresse);
end; if (aiguillage[index].inversionCDM=1) then
begin
if octet=1 then octet:=2 else octet:=1;
end;
end;
// pilotage par CDM rail ----------------- // pilotage par CDM rail -----------------
if CDM_connecte then if CDM_connecte then
@@ -6050,19 +6172,17 @@ begin
Affiche('Fin des initialisations',clyellow); Affiche('Fin des initialisations',clyellow);
LabelEtat.Caption:=' '; LabelEtat.Caption:=' ';
Affiche_memoire; Affiche_memoire;
{ {
aiguillage[index_aig(7)].position:=const_devie; aiguillage[index_aig(1)].position:=const_devie;
aiguillage[index_aig(20)].position:=const_droit; aiguillage[index_aig(3)].position:=const_droit;
aiguillage[index_aig(21)].position:=const_droit; aiguillage[index_aig(4)].position:=const_devie;
aiguillage[index_aig(25)].position:=const_devie; aiguillage[index_aig(25)].position:=const_devie;
aiguillage[index_aig(26)].position:=const_droit; aiguillage[index_aig(26)].position:=const_droit;
aiguillage[index_aig(27)].position:=const_droit; aiguillage[index_aig(27)].position:=const_droit;
aiguillage[index_aig(28)].position:=const_droit; aiguillage[index_aig(28)].position:=const_droit;
aiguillage[index_aig(31)].position:=const_devie; aiguillage[index_aig(31)].position:=const_devie;
} aiguillage[index_aig(9)].position:=const_droit;
//i:=suivant_alg3(520,det,20,aig,1); }
end; end;
@@ -6421,13 +6541,14 @@ var s : string;
i : word; i : word;
coche : boolean; coche : boolean;
begin begin
Cb:=Sender as TcheckBox; Cb:=Sender as TcheckBox;
coche:=cb.Checked; // état de la checkbox coche:=cb.Checked; // état de la checkbox
s:=Cb.Hint; s:=Cb.Hint;
val(s,adresse,erreur); // adresse du signal correspondant au checkbox cliqué val(s,adresse,erreur); // adresse du signal correspondant au checkbox cliqué
if erreur=0 then if erreur=0 then
begin begin
i:=index_feu(adresse); i:=index_feu(adresse);
if i=0 then exit;
etat:=feux[i].EtatSignal; etat:=feux[i].EtatSignal;
affiche(IntToSTR(etat),clyellow); affiche(IntToSTR(etat),clyellow);
// si le feu est vert et que la coche est mise, substituer le blanc // si le feu est vert et que la coche est mise, substituer le blanc
@@ -7386,9 +7507,10 @@ begin
val(s,vit,erreur); val(s,vit,erreur);
if (erreur<>0) or (vit<0) then exit; if (erreur<>0) or (vit<0) then exit;
s:=trains[combotrains.itemindex+1].nom_train; s:=trains[combotrains.itemindex+1].nom_train;
Affiche('Commande vitesse train '+s+ ' à '+IntToSTR(vit)+'%',cllime);
vitesse_loco(s,adr,vit,true); vitesse_loco(s,adr,vit,true);
if s='' then s:=intToSTR(adr);
Affiche('Commande vitesse train '+s+ ' à '+IntToSTR(vit)+'%',cllime);
end; end;
// pour déplacer l'ascenseur de l'affichage automatiquement en bas // pour déplacer l'ascenseur de l'affichage automatiquement en bas

Binary file not shown.

View File

@@ -4,7 +4,7 @@ object FormVersion: TFormVersion
BorderIcons = [] BorderIcons = []
BorderStyle = bsNone BorderStyle = bsNone
Caption = 'V'#233'rification de version' Caption = 'V'#233'rification de version'
ClientHeight = 215 ClientHeight = 234
ClientWidth = 645 ClientWidth = 645
Color = clNavy Color = clNavy
Font.Charset = ANSI_CHARSET Font.Charset = ANSI_CHARSET
@@ -20,7 +20,7 @@ object FormVersion: TFormVersion
Left = 8 Left = 8
Top = 16 Top = 16
Width = 625 Width = 625
Height = 185 Height = 209
Color = clNavy Color = clNavy
Font.Charset = ANSI_CHARSET Font.Charset = ANSI_CHARSET
Font.Color = clYellow Font.Color = clYellow

View File

@@ -23,7 +23,7 @@ var
Lance_verif : integer; Lance_verif : integer;
verifVersion,notificationVersion : boolean; verifVersion,notificationVersion : boolean;
Const Version='3.6'; // sert à la comparaison de la version publiée Const Version='3.62'; // sert à la comparaison de la version publiée
SousVersion=' '; // en cas d'absence de sous version mettre un espace SousVersion=' '; // en cas d'absence de sous version mettre un espace
implementation implementation
@@ -220,8 +220,8 @@ begin
if ncomm>0 then if ncomm>0 then
begin begin
Aff('Nouveautés de la V'+version_p+SV_publie+' de Signaux_Complexes_GL :'); Aff('Nouveautés de la V'+version_p+SV_publie+' de Signaux_Complexes_GL :');
Aff(' '); aff(' ');
for i:=1 to ncomm do aff(comm[i]); for i:=1 to ncomm-1 do aff(comm[i]);
end; end;
if MessageDlg(s+'. Voulez-vous la télécharger?',mtConfirmation,[mbYes,mbNo],0)=mrYes then if MessageDlg(s+'. Voulez-vous la télécharger?',mtConfirmation,[mbYes,mbNo],0)=mrYes then
begin begin

View File

@@ -78,6 +78,8 @@ version 3.6 : Am
Correction d'affichage du TCO. Correction d'affichage du TCO.
Correction des messages transmis de CDM. Correction des messages transmis de CDM.
Changement des vitesses courantes des trains. Changement des vitesses courantes des trains.
version 3.61 : Correction de la non présentation de certains signaux s'ils sont séparés par plus d'un détecteur.
version 3.62 : Correction présence trains 3 cantons avant signaux et 1 canton après signaux.