V1.7
This commit is contained in:
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
+676
-406
File diff suppressed because it is too large
Load Diff
+146
-36
@@ -4,43 +4,29 @@ interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, ExtCtrls, StdCtrls , verif_version, jpeg ;
|
||||
Dialogs, ExtCtrls, StdCtrls , verif_version, jpeg, ComCtrls ;
|
||||
|
||||
type
|
||||
TFormConfig = class(TForm)
|
||||
GroupBox1: TGroupBox;
|
||||
Label1: TLabel;
|
||||
EditAdrIPCDM: TEdit;
|
||||
Label2: TLabel;
|
||||
EditPortCDM: TEdit;
|
||||
GroupBox2: TGroupBox;
|
||||
Label3: TLabel;
|
||||
EditcomUSB: TEdit;
|
||||
Label4: TLabel;
|
||||
EditTempoOctetUSB: TEdit;
|
||||
Label5: TLabel;
|
||||
EditTempoReponse: TEdit;
|
||||
ButtonAppliquerEtFermer: TButton;
|
||||
GroupBox3: TGroupBox;
|
||||
Label7: TLabel;
|
||||
EditIPLenz: TEdit;
|
||||
Label8: TLabel;
|
||||
EditportLenz: TEdit;
|
||||
GroupBox4: TGroupBox;
|
||||
RadioButton1: TRadioButton;
|
||||
RadioButton2: TRadioButton;
|
||||
RadioButton3: TRadioButton;
|
||||
LabelInfo: TLabel;
|
||||
Button2: TButton;
|
||||
Label11: TLabel;
|
||||
Label12: TLabel;
|
||||
Image1: TImage;
|
||||
PageControl: TPageControl;
|
||||
TabSheetCDM: TTabSheet;
|
||||
TabSheetAutonome: TTabSheet;
|
||||
GroupBox1: TGroupBox;
|
||||
Label1: TLabel;
|
||||
Label2: TLabel;
|
||||
EditAdrIPCDM: TEdit;
|
||||
EditPortCDM: TEdit;
|
||||
GroupBox5: TGroupBox;
|
||||
Label13: TLabel;
|
||||
CheckVerifVersion: TCheckBox;
|
||||
CheckInfoVersion: TCheckBox;
|
||||
CheckLanceCDM: TCheckBox;
|
||||
CheckAvecTCO: TCheckBox;
|
||||
EditNomLay: TEdit;
|
||||
Label13: TLabel;
|
||||
GroupBox6: TGroupBox;
|
||||
RadioButton4: TRadioButton;
|
||||
RadioButton5: TRadioButton;
|
||||
@@ -52,19 +38,60 @@ type
|
||||
RadioButton11: TRadioButton;
|
||||
RadioButton12: TRadioButton;
|
||||
GroupBox7: TGroupBox;
|
||||
Label10: TLabel;
|
||||
RadioButton13: TRadioButton;
|
||||
RadioButton14: TRadioButton;
|
||||
RadioButton15: TRadioButton;
|
||||
RadioButton16: TRadioButton;
|
||||
RadioButton17: TRadioButton;
|
||||
RadioButton18: TRadioButton;
|
||||
Label14: TLabel;
|
||||
GroupBox2: TGroupBox;
|
||||
Label3: TLabel;
|
||||
Label4: TLabel;
|
||||
Label5: TLabel;
|
||||
EditcomUSB: TEdit;
|
||||
EditTempoOctetUSB: TEdit;
|
||||
EditTempoReponse: TEdit;
|
||||
GroupBox4: TGroupBox;
|
||||
RadioButton1: TRadioButton;
|
||||
RadioButton2: TRadioButton;
|
||||
RadioButton3: TRadioButton;
|
||||
GroupBox3: TGroupBox;
|
||||
Label7: TLabel;
|
||||
Label8: TLabel;
|
||||
EditIPLenz: TEdit;
|
||||
EditportLenz: TEdit;
|
||||
GroupBox8: TGroupBox;
|
||||
CheckBoxServAig: TCheckBox;
|
||||
CheckBoxServDet: TCheckBox;
|
||||
CheckBoxServAct: TCheckBox;
|
||||
CheckServPosTrains: TCheckBox;
|
||||
Label6: TLabel;
|
||||
Label9: TLabel;
|
||||
Label10: TLabel;
|
||||
Image1: TImage;
|
||||
Label11: TLabel;
|
||||
TabSheet1: TTabSheet;
|
||||
MemoAig: TMemo;
|
||||
Label12: TLabel;
|
||||
TabSheet2: TTabSheet;
|
||||
Label14: TLabel;
|
||||
MemoBranches: TMemo;
|
||||
TabSheet3: TTabSheet;
|
||||
MemoSignaux: TMemo;
|
||||
Label15: TLabel;
|
||||
TabSheet4: TTabSheet;
|
||||
Label16: TLabel;
|
||||
MemoAct: TMemo;
|
||||
CheckBoxSrvSig: TCheckBox;
|
||||
Memo1: TMemo;
|
||||
Memo2: TMemo;
|
||||
Memo3: TMemo;
|
||||
Memo4: TMemo;
|
||||
GroupBox9: TGroupBox;
|
||||
CheckBoxRazSignaux: TCheckBox;
|
||||
procedure ButtonAppliquerEtFermerClick(Sender: TObject);
|
||||
procedure Button2Click(Sender: TObject);
|
||||
procedure FormActivate(Sender: TObject);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
private
|
||||
{ Déclarations privées }
|
||||
public
|
||||
@@ -120,8 +147,45 @@ begin
|
||||
place_id:=s;
|
||||
end;
|
||||
|
||||
function services_CDM : boolean;
|
||||
var s,ss : string;
|
||||
i : integer;
|
||||
begin
|
||||
//s:=place_id('C-C-00-0002-RQSERV-RTSIM|030|03|SRV=ATNT;SRV=ADET;SRV=AACT;');
|
||||
s:=place_id('C-C-00-0002-RQSERV-RTSIM|xxx|xx|');
|
||||
i:=0;
|
||||
if Srvc_Aig then begin s:=s+'SRV=ATNT;';inc(i);end;
|
||||
if Srvc_Act then begin s:=s+'SRV=AACT;';inc(i);end;
|
||||
if Srvc_Det then begin s:=s+'SRV=ADET;';inc(i);end;
|
||||
if Srvc_PosTrain then begin s:=s+'SRV=TSXY;';inc(i);end ;
|
||||
if Srvc_Sig then begin s:=s+'SRV=ASIG;';inc(i);end;
|
||||
|
||||
// insère le nombre de paramètres
|
||||
ss:=format('%.*d',[2,i]) ;
|
||||
delete(s,30,2);
|
||||
insert(ss,s,30);
|
||||
// insère la longueur des paramètres
|
||||
i:=length(s)-29;
|
||||
ss:=format('%.*d',[3,i]) ;
|
||||
delete(s,26,3);
|
||||
insert(ss,s,26);
|
||||
//Affiche(s,clyellow);
|
||||
envoi_CDM(s);sleep(100);
|
||||
if pos('_ACK',recuCDM)<>0 then
|
||||
begin
|
||||
s:='Services acceptés: ';
|
||||
if Srvc_Aig then s:=s+'- aiguillages ';
|
||||
if Srvc_Act then s:=s+'- actionneurs ';
|
||||
if Srvc_Det then s:=s+'- détecteurs ';
|
||||
if Srvc_PosTrain then s:=s+'- position des trains ';
|
||||
if Srvc_sig then s:=s+'- état des signaux ';
|
||||
Affiche(s,clYellow);
|
||||
end;
|
||||
services_CDM:=pos('_ACK',recuCDM)<>0;
|
||||
end;
|
||||
|
||||
procedure connecte_CDM;
|
||||
var s : string;
|
||||
var s , ss : string;
|
||||
i : integer;
|
||||
begin
|
||||
// déconnexion de l'ancienne liaison éventuelle
|
||||
@@ -158,10 +222,9 @@ begin
|
||||
Affiche(s,clYellow);
|
||||
AfficheDebug(s,clyellow);
|
||||
|
||||
// demande des services : ATNT=aiguillages, ADET=détecteurs AACT=actionneurs
|
||||
s:=place_id('C-C-00-0002-RQSERV-RTSIM|030|03|SRV=ATNT;SRV=ADET;SRV=AACT;');
|
||||
envoi_CDM(s);
|
||||
if pos('_ACK',recuCDM)<>0 then Affiche('Services acceptés: aiguillages - détecteurs - actionneurs',clYellow);
|
||||
// demande des services
|
||||
services_CDM;
|
||||
|
||||
// demande les trains
|
||||
s:=place_id('C-C-01-0002-DSCTRN-DLOAD|000|');
|
||||
envoi_CDM(s);
|
||||
@@ -410,7 +473,7 @@ begin
|
||||
copie_commentaire;
|
||||
|
||||
closefile(fichier);
|
||||
closefile(fichierN);
|
||||
closefile(fichierN);
|
||||
|
||||
deletefile('config.cfg');
|
||||
deletefile('client-GL.cfg');
|
||||
@@ -423,7 +486,7 @@ end;
|
||||
procedure TFormConfig.ButtonAppliquerEtFermerClick(Sender: TObject);
|
||||
var i,erreur : integer;
|
||||
s : string;
|
||||
ChangeCDM,changeInterface,changeUSB : boolean;
|
||||
ChangeCDM,changeInterface,changeUSB,change_srv : boolean;
|
||||
begin
|
||||
// contrôle adresse IP CDM
|
||||
s:=EditAdrIPCDM.text;
|
||||
@@ -492,6 +555,7 @@ begin
|
||||
notificationVersion:=CheckInfoVersion.Checked;
|
||||
|
||||
LanceCDM:=CheckLanceCDM.Checked;
|
||||
|
||||
AvecTCO:=CheckAvecTCO.checked;
|
||||
Lay:=EditNomLay.Text;
|
||||
if RadioButton4.Checked then ServeurInterfaceCDM:=0;
|
||||
@@ -511,7 +575,23 @@ begin
|
||||
if RadioButton17.Checked then ServeurRetroCDM:=5;
|
||||
if RadioButton18.Checked then ServeurRetroCDM:=6;
|
||||
|
||||
// générer le fichier clieng-GL.cfg
|
||||
// changement sur les services CDM ?
|
||||
change_srv:=Srvc_Aig<>CheckBoxServAig.checked;
|
||||
change_srv:=Srvc_Det<>CheckBoxServDet.checked or change_srv;
|
||||
change_srv:=Srvc_Act<>CheckBoxServAct.checked or change_srv;
|
||||
change_srv:=Srvc_PosTrain<>CheckServPosTrains.checked or change_srv;
|
||||
change_srv:=Srvc_Sig<>CheckBoxSrvSig.checked or change_srv;
|
||||
|
||||
Srvc_Aig:=CheckBoxServAig.checked;
|
||||
Srvc_Det:=CheckBoxServDet.checked;
|
||||
Srvc_Act:=CheckBoxServAct.checked;
|
||||
Srvc_PosTrain:=CheckServPosTrains.checked;
|
||||
Srvc_Sig:=CheckBoxSrvSig.checked;
|
||||
Raz_Acc_signaux:=CheckBoxRazSignaux.checked;
|
||||
|
||||
if change_srv then services_CDM;
|
||||
|
||||
// générer le fichiers config.cfg et clieng-GL.cfg
|
||||
genere_config2;
|
||||
formConfig.close;
|
||||
end;
|
||||
@@ -522,6 +602,7 @@ begin
|
||||
end;
|
||||
|
||||
procedure TFormConfig.FormActivate(Sender: TObject);
|
||||
var i : integer;
|
||||
begin
|
||||
EditAdrIPCDM.text:=adresseIPCDM;
|
||||
EditPortCDM.Text:=IntToSTR(portCDM);
|
||||
@@ -563,8 +644,37 @@ begin
|
||||
RadioButton16.Checked:=ServeurRetroCDM=4;
|
||||
RadioButton17.Checked:=ServeurRetroCDM=5;
|
||||
RadioButton18.Checked:=ServeurRetroCDM=6;
|
||||
|
||||
CheckBoxServAig.checked:=Srvc_Aig;
|
||||
CheckBoxServDet.checked:=Srvc_Det;
|
||||
CheckBoxServAct.checked:=Srvc_Act;
|
||||
CheckServPosTrains.checked:=Srvc_PosTrain;
|
||||
CheckBoxRazSignaux.checked:=Raz_Acc_signaux;
|
||||
|
||||
end;
|
||||
|
||||
|
||||
|
||||
procedure TFormConfig.FormCreate(Sender: TObject);
|
||||
var i : integer;
|
||||
begin
|
||||
// remplit les 4 fenêtres de config des aiguillages branches signaux, actionneurs
|
||||
for i:=1 to MaxAiguillage do
|
||||
MemoAig.Lines.Add(mod_aiguillages[i]);
|
||||
for i:=1 to NbreBranches do
|
||||
MemoBranches.Lines.Add(mod_Branches[i]);
|
||||
for i:=1 to NbreFeux do
|
||||
MemoSignaux.Lines.Add(mod_Signaux[i]);
|
||||
for i:=1 to maxTablo_act do
|
||||
MemoAct.Lines.Add(mod_Act[i]);
|
||||
PageControl.ActivePage:=TabSheetCDM; // force le premier onglet sur la page
|
||||
end;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
end.
|
||||
|
||||
Binary file not shown.
+1
-1
@@ -4,7 +4,7 @@ interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, StdCtrls , UnitTCO, ExtCtrls;
|
||||
Dialogs, StdCtrls , UnitTCO, ExtCtrls, Menus;
|
||||
|
||||
type
|
||||
TFormConfigTCO = class(TForm)
|
||||
|
||||
Binary file not shown.
+21
-6
@@ -48,9 +48,9 @@ object FormDebug: TFormDebug
|
||||
end
|
||||
object Label3: TLabel
|
||||
Left = 448
|
||||
Top = 136
|
||||
Top = 168
|
||||
Width = 97
|
||||
Height = 225
|
||||
Height = 193
|
||||
AutoSize = False
|
||||
Caption = 'Label3'
|
||||
Color = clGray
|
||||
@@ -80,7 +80,7 @@ object FormDebug: TFormDebug
|
||||
end
|
||||
object MemoEvtDet: TMemo
|
||||
Left = 552
|
||||
Top = 376
|
||||
Top = 408
|
||||
Width = 233
|
||||
Height = 221
|
||||
Color = clBlack
|
||||
@@ -132,8 +132,8 @@ object FormDebug: TFormDebug
|
||||
OnClick = CheckAffSigClick
|
||||
end
|
||||
object ButtonRazTampon: TButton
|
||||
Left = 688
|
||||
Top = 600
|
||||
Left = 448
|
||||
Top = 576
|
||||
Width = 97
|
||||
Height = 33
|
||||
Caption = 'Raz Tampon Ev'#232'nements'
|
||||
@@ -202,7 +202,7 @@ object FormDebug: TFormDebug
|
||||
end
|
||||
object RichEdit: TRichEdit
|
||||
Left = 552
|
||||
Top = 136
|
||||
Top = 168
|
||||
Width = 233
|
||||
Height = 233
|
||||
HideScrollBars = False
|
||||
@@ -266,6 +266,21 @@ object FormDebug: TFormDebug
|
||||
TabOrder = 15
|
||||
OnClick = CheckBoxAffFDClick
|
||||
end
|
||||
object CheckBoxAffDebDecSig: TCheckBox
|
||||
Left = 448
|
||||
Top = 128
|
||||
Width = 321
|
||||
Height = 17
|
||||
Caption = 'Affichage du pilotage des d'#233'codeurs de signaux'
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clBlack
|
||||
Font.Height = -11
|
||||
Font.Name = 'MS Sans Serif'
|
||||
Font.Style = []
|
||||
ParentFont = False
|
||||
TabOrder = 16
|
||||
OnClick = CheckBoxAffDebDecSigClick
|
||||
end
|
||||
object SaveDialog: TSaveDialog
|
||||
Left = 760
|
||||
Top = 56
|
||||
|
||||
+9
-1
@@ -30,6 +30,7 @@ type
|
||||
CheckBoxAct: TCheckBox;
|
||||
CheckBoxEvtDetAig: TCheckBox;
|
||||
CheckBoxAffFD: TCheckBox;
|
||||
CheckBoxAffDebDecSig: TCheckBox;
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure ButtonEcrLogClick(Sender: TObject);
|
||||
@@ -46,6 +47,7 @@ type
|
||||
procedure CheckBoxActClick(Sender: TObject);
|
||||
procedure CheckBoxEvtDetAigClick(Sender: TObject);
|
||||
procedure CheckBoxAffFDClick(Sender: TObject);
|
||||
procedure CheckBoxAffDebDecSigClick(Sender: TObject);
|
||||
private
|
||||
{ Déclarations privées }
|
||||
public
|
||||
@@ -60,7 +62,7 @@ Max_Trains=50;
|
||||
var
|
||||
FormDebug: TFormDebug;
|
||||
NivDebug : integer;
|
||||
AffSignal,AffAffect,initform,AffFD : boolean;
|
||||
AffSignal,AffAffect,initform,AffFD,debug_dec_sig : boolean;
|
||||
N_event_det : integer; // index du dernier évènement (de 1 à 20)
|
||||
event_det : array[1..Max_event_det] of integer;
|
||||
event_det_train : array[1..Max_Trains] of record
|
||||
@@ -295,4 +297,10 @@ begin
|
||||
AffFD:=CheckBoxAffFD.checked;
|
||||
end;
|
||||
|
||||
procedure TFormDebug.CheckBoxAffDebDecSigClick(Sender: TObject);
|
||||
begin
|
||||
debug_dec_sig:=CheckBoxAffDebDecSig.checked;
|
||||
end;
|
||||
|
||||
|
||||
end.
|
||||
|
||||
Binary file not shown.
+1
-1
@@ -135,7 +135,7 @@ object FormPilote: TFormPilote
|
||||
Top = 160
|
||||
Width = 177
|
||||
Height = 17
|
||||
Caption = 'Violet (cible '#224' 2 feux uniquement)'
|
||||
Caption = 'Violet'
|
||||
TabOrder = 9
|
||||
OnClick = RadioVioletClick
|
||||
end
|
||||
|
||||
@@ -227,6 +227,7 @@ begin
|
||||
begin
|
||||
EtatSignalCplx[AdrPilote]:=EtatSignalCplx[0];
|
||||
//Affiche(IntToSTR(EtatSignalCplx[AdrPilote]),clyellow);
|
||||
feux[i].EtatSignal:=EtatSignalCplx[0];
|
||||
envoi_signal(AdrPilote);
|
||||
end
|
||||
else
|
||||
|
||||
Binary file not shown.
+439
-377
File diff suppressed because it is too large
Load Diff
BIN
Binary file not shown.
@@ -847,6 +847,15 @@ object FormTCO: TFormTCO
|
||||
WordWrap = True
|
||||
OnClick = ButtonMasquerClick
|
||||
end
|
||||
object ButtonConstruit: TButton
|
||||
Left = 880
|
||||
Top = 88
|
||||
Width = 89
|
||||
Height = 33
|
||||
Caption = 'Construit TCO'
|
||||
TabOrder = 12
|
||||
OnClick = ButtonConstruitClick
|
||||
end
|
||||
end
|
||||
object ButtonAfficheBandeau: TButton
|
||||
Left = 1051
|
||||
|
||||
+47
-16
@@ -93,6 +93,7 @@ type
|
||||
Label29: TLabel;
|
||||
ImagePalette22: TImage;
|
||||
Label30: TLabel;
|
||||
ButtonConstruit: TButton;
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure ImageTCOClick(Sender: TObject);
|
||||
procedure FormActivate(Sender: TObject);
|
||||
@@ -245,6 +246,7 @@ type
|
||||
Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||
procedure EditAdrElementKeyDown(Sender: TObject; var Key: Word;
|
||||
Shift: TShiftState);
|
||||
procedure ButtonConstruitClick(Sender: TObject);
|
||||
|
||||
private
|
||||
{ Déclarations privées }
|
||||
@@ -1242,7 +1244,7 @@ begin
|
||||
Brush.Color:=clVoies;
|
||||
pen.color:=clVoies;
|
||||
|
||||
// aiguillage dévié (sans inversion)
|
||||
// aiguillage dévié (sans inversion) ou position inconnue (9)
|
||||
if ((inverse=false) and (position=const_Devie)) or
|
||||
((inverse=true) and (position=const_Droit)) or
|
||||
(position=9) then
|
||||
@@ -1252,7 +1254,7 @@ begin
|
||||
horz;
|
||||
if mode=1 then
|
||||
begin
|
||||
// morceau de diag à tracer en clAllume
|
||||
// morceau de diagonale à tracer en clAllume
|
||||
x1:=x0+largeurCell-round(3*frXGlob);y1:=y0;
|
||||
x2:=x0+largeurCell;y2:=y0+round(4*FryGlob);
|
||||
x3:=x0+(largeurCell div 2)+round(4*frXGlob);y3:=jy2;
|
||||
@@ -1260,9 +1262,10 @@ begin
|
||||
canvas.PolyGon([point(x1,y1),point(x2,y2),point(x3,y3),point(x4,y4)]);
|
||||
end;
|
||||
|
||||
// efface le morceau
|
||||
// efface le morceau
|
||||
if ((inverse=false) and (position=const_Devie)) or
|
||||
((inverse=true) and (position=const_Droit)) then
|
||||
((inverse=true) and (position=const_Droit)) then
|
||||
begin
|
||||
// efface le morceau
|
||||
x1:=x0+round(12*frXGlob);y1:=jy2;
|
||||
x2:=x1+round(20*frxGlob);y2:=y1;
|
||||
@@ -1272,6 +1275,7 @@ begin
|
||||
Brush.Color:=fond;
|
||||
Polygon([point(x1,y1),Point(x2,y2),Point(x3,y3),Point(x4,y4)]);
|
||||
end;
|
||||
end;
|
||||
|
||||
// aiguillage droit (sans inversion) ou dévie (avec inversion)
|
||||
if ((inverse=false) and (position=const_Droit)) or
|
||||
@@ -1282,7 +1286,6 @@ begin
|
||||
diagonale;
|
||||
|
||||
// efface le morceau
|
||||
if (position=const_Droit) then
|
||||
x1:=x0+round(19*frXGlob);y1:=jy1;
|
||||
x2:=x1+round(6*frxGlob);y2:=y1;
|
||||
x3:=x2-round(12*FrxGlob);y3:=y2+round(12*fryGlob);
|
||||
@@ -1291,7 +1294,7 @@ begin
|
||||
Brush.Color:=fond;
|
||||
Polygon([point(x1,y1),Point(x2,y2),Point(x3,y3),Point(x4,y4)]);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
// Element 14
|
||||
@@ -2262,12 +2265,12 @@ end;
|
||||
// transforme les branches en TCO
|
||||
// trop compliqué. Il faudra dessiner son TCO soit meme
|
||||
procedure construit_TCO;
|
||||
var x,y,i,j,Max,indexMax : integer;
|
||||
var x,y,i,j,Max,indexMax,Btype,Adresse,ligne,AdrSuiv,Bimage : integer;
|
||||
begin
|
||||
// étape 0 Raz du TCO
|
||||
for y:=1 to 20 do
|
||||
for x:=1 to 20 do
|
||||
begin
|
||||
for y:=1 to NbreCellY do
|
||||
for x:=1 to NbreCellX do
|
||||
begin
|
||||
TCO[x,y].Adresse:=0;
|
||||
TCO[x,y].Btype:=0;
|
||||
end;
|
||||
@@ -2285,10 +2288,33 @@ begin
|
||||
Affiche('La branche la plus grande a pour index '+IntToSTR(IndexMax),clOrange);
|
||||
|
||||
// stocker cette branche au milieu du TCO (en 5)
|
||||
ligne:=5;
|
||||
for i:=1 to Max do
|
||||
begin
|
||||
TCO[i,5].Adresse:=BrancheN[IndexMax,i].Adresse;
|
||||
TCO[i,5].Btype:=BrancheN[IndexMax,i].Btype;
|
||||
Adresse:=BrancheN[IndexMax,i].Adresse;
|
||||
Btype:=BrancheN[IndexMax,i].Btype;
|
||||
TCO[i,ligne].Adresse:=Adresse;
|
||||
TCO[i,ligne].Btype:=Btype;
|
||||
// Btype 1= détecteur 2= aiguillage 3=bis 4=Buttoir
|
||||
if Btype=1 then TCO[i,ligne].BImage:=1;
|
||||
if Btype=2 then
|
||||
begin
|
||||
// A20,547,561,A22,A24,A26,515,518,A31,A29,A28,A30,539,522,A3,A1,A2,A4,A6B,545,A5B,A3
|
||||
//20,P8P,D547,S548 // 22,P24P,S561,D25S
|
||||
// on se réfère au suivant
|
||||
AdrSuiv:=BrancheN[IndexMax,i+1].Adresse;
|
||||
// connecté sur position droite : la pointe est à gauche
|
||||
if aiguillage[adresse].Adroit=AdrSuiv then
|
||||
Bimage:=3; // ou 4
|
||||
// connecté sur position déviée : la pointe est à gauche, mais il faut changer de ligne
|
||||
if aiguillage[adresse].Adevie=AdrSuiv then
|
||||
Bimage:=4; // ou 4
|
||||
// connecté sur pointe : la pointe est à droite
|
||||
if aiguillage[adresse].Apointe=AdrSuiv then
|
||||
Bimage:=5; // ou 2
|
||||
TCO[i,ligne].BImage:=Bimage;
|
||||
end;
|
||||
|
||||
end;
|
||||
end;
|
||||
|
||||
@@ -2307,8 +2333,9 @@ begin
|
||||
// récupérer la position de l'aiguillage
|
||||
if (bImage>=2) and (btype<=14) then
|
||||
begin
|
||||
if Adresse<>0 then pos:=Aiguillage[adresse].position
|
||||
else pos:=9;
|
||||
if Adresse<>0 then pos:=Aiguillage[adresse].position
|
||||
|
||||
else pos:=9;
|
||||
end;
|
||||
|
||||
Xorg:=(x-1)*LargeurCell;
|
||||
@@ -3868,8 +3895,8 @@ end;
|
||||
|
||||
procedure TFormTCO.Button1Click(Sender: TObject);
|
||||
begin
|
||||
Detecteur[569]:=true;
|
||||
Maj_tco(569);
|
||||
Detecteur[569]:=true;
|
||||
Maj_tco(569);
|
||||
end;
|
||||
|
||||
|
||||
@@ -4181,6 +4208,10 @@ begin
|
||||
ScrollBox.Height:=ClientHeight-Panel1.Height-40;
|
||||
end;
|
||||
|
||||
procedure TFormTCO.ButtonConstruitClick(Sender: TObject);
|
||||
begin
|
||||
construit_TCO;
|
||||
end;
|
||||
|
||||
begin
|
||||
|
||||
|
||||
Binary file not shown.
+1
-1
@@ -23,7 +23,7 @@ var
|
||||
Lance_verif : integer;
|
||||
verifVersion,notificationVersion : boolean;
|
||||
|
||||
Const Version='1.61'; //Version='1.2';// sert à la comparaison de la version publiée
|
||||
Const Version='1.7'; //Version='1.2';// sert à la comparaison de la version publiée
|
||||
|
||||
implementation
|
||||
|
||||
|
||||
+2
-1
@@ -19,5 +19,6 @@ Version 1.44 : Gestion trains avec voitures
|
||||
Version 1.45 : Rejette les n° d'objets supérieurs aiguillages à la même adresse
|
||||
Version 1.5 : Nouvel algorithme de suivi des trains - Gestion des feux provenant de voies en buttoir
|
||||
Version 1.6 : Implémentation du TCO. Ouverture de CDM rail au démarrage avec LAY à la demande
|
||||
|
||||
Version 1.7 : Sauvegarde de la configuration dans les fichier client_gl.cfg et config.cfg si modification des paramètres depuis le menu de configuration.
|
||||
Feu violet disponible sur signaux à 5, 7 et 9 feux.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user