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
|
uses
|
||||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||||
Dialogs, ExtCtrls, StdCtrls , verif_version, jpeg ;
|
Dialogs, ExtCtrls, StdCtrls , verif_version, jpeg, ComCtrls ;
|
||||||
|
|
||||||
type
|
type
|
||||||
TFormConfig = class(TForm)
|
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;
|
ButtonAppliquerEtFermer: TButton;
|
||||||
GroupBox3: TGroupBox;
|
|
||||||
Label7: TLabel;
|
|
||||||
EditIPLenz: TEdit;
|
|
||||||
Label8: TLabel;
|
|
||||||
EditportLenz: TEdit;
|
|
||||||
GroupBox4: TGroupBox;
|
|
||||||
RadioButton1: TRadioButton;
|
|
||||||
RadioButton2: TRadioButton;
|
|
||||||
RadioButton3: TRadioButton;
|
|
||||||
LabelInfo: TLabel;
|
LabelInfo: TLabel;
|
||||||
Button2: TButton;
|
Button2: TButton;
|
||||||
Label11: TLabel;
|
Image1: TImage;
|
||||||
Label12: TLabel;
|
PageControl: TPageControl;
|
||||||
|
TabSheetCDM: TTabSheet;
|
||||||
|
TabSheetAutonome: TTabSheet;
|
||||||
|
GroupBox1: TGroupBox;
|
||||||
|
Label1: TLabel;
|
||||||
|
Label2: TLabel;
|
||||||
|
EditAdrIPCDM: TEdit;
|
||||||
|
EditPortCDM: TEdit;
|
||||||
GroupBox5: TGroupBox;
|
GroupBox5: TGroupBox;
|
||||||
|
Label13: TLabel;
|
||||||
CheckVerifVersion: TCheckBox;
|
CheckVerifVersion: TCheckBox;
|
||||||
CheckInfoVersion: TCheckBox;
|
CheckInfoVersion: TCheckBox;
|
||||||
CheckLanceCDM: TCheckBox;
|
CheckLanceCDM: TCheckBox;
|
||||||
CheckAvecTCO: TCheckBox;
|
CheckAvecTCO: TCheckBox;
|
||||||
EditNomLay: TEdit;
|
EditNomLay: TEdit;
|
||||||
Label13: TLabel;
|
|
||||||
GroupBox6: TGroupBox;
|
GroupBox6: TGroupBox;
|
||||||
RadioButton4: TRadioButton;
|
RadioButton4: TRadioButton;
|
||||||
RadioButton5: TRadioButton;
|
RadioButton5: TRadioButton;
|
||||||
@@ -52,19 +38,60 @@ type
|
|||||||
RadioButton11: TRadioButton;
|
RadioButton11: TRadioButton;
|
||||||
RadioButton12: TRadioButton;
|
RadioButton12: TRadioButton;
|
||||||
GroupBox7: TGroupBox;
|
GroupBox7: TGroupBox;
|
||||||
|
Label10: TLabel;
|
||||||
RadioButton13: TRadioButton;
|
RadioButton13: TRadioButton;
|
||||||
RadioButton14: TRadioButton;
|
RadioButton14: TRadioButton;
|
||||||
RadioButton15: TRadioButton;
|
RadioButton15: TRadioButton;
|
||||||
RadioButton16: TRadioButton;
|
RadioButton16: TRadioButton;
|
||||||
RadioButton17: TRadioButton;
|
RadioButton17: TRadioButton;
|
||||||
RadioButton18: 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;
|
Label9: TLabel;
|
||||||
Label10: TLabel;
|
Label11: TLabel;
|
||||||
Image1: TImage;
|
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 ButtonAppliquerEtFermerClick(Sender: TObject);
|
||||||
procedure Button2Click(Sender: TObject);
|
procedure Button2Click(Sender: TObject);
|
||||||
procedure FormActivate(Sender: TObject);
|
procedure FormActivate(Sender: TObject);
|
||||||
|
procedure FormCreate(Sender: TObject);
|
||||||
private
|
private
|
||||||
{ Déclarations privées }
|
{ Déclarations privées }
|
||||||
public
|
public
|
||||||
@@ -120,8 +147,45 @@ begin
|
|||||||
place_id:=s;
|
place_id:=s;
|
||||||
end;
|
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;
|
procedure connecte_CDM;
|
||||||
var s : string;
|
var s , ss : string;
|
||||||
i : integer;
|
i : integer;
|
||||||
begin
|
begin
|
||||||
// déconnexion de l'ancienne liaison éventuelle
|
// déconnexion de l'ancienne liaison éventuelle
|
||||||
@@ -158,10 +222,9 @@ begin
|
|||||||
Affiche(s,clYellow);
|
Affiche(s,clYellow);
|
||||||
AfficheDebug(s,clyellow);
|
AfficheDebug(s,clyellow);
|
||||||
|
|
||||||
// demande des services : ATNT=aiguillages, ADET=détecteurs AACT=actionneurs
|
// demande des services
|
||||||
s:=place_id('C-C-00-0002-RQSERV-RTSIM|030|03|SRV=ATNT;SRV=ADET;SRV=AACT;');
|
services_CDM;
|
||||||
envoi_CDM(s);
|
|
||||||
if pos('_ACK',recuCDM)<>0 then Affiche('Services acceptés: aiguillages - détecteurs - actionneurs',clYellow);
|
|
||||||
// demande les trains
|
// demande les trains
|
||||||
s:=place_id('C-C-01-0002-DSCTRN-DLOAD|000|');
|
s:=place_id('C-C-01-0002-DSCTRN-DLOAD|000|');
|
||||||
envoi_CDM(s);
|
envoi_CDM(s);
|
||||||
@@ -410,7 +473,7 @@ begin
|
|||||||
copie_commentaire;
|
copie_commentaire;
|
||||||
|
|
||||||
closefile(fichier);
|
closefile(fichier);
|
||||||
closefile(fichierN);
|
closefile(fichierN);
|
||||||
|
|
||||||
deletefile('config.cfg');
|
deletefile('config.cfg');
|
||||||
deletefile('client-GL.cfg');
|
deletefile('client-GL.cfg');
|
||||||
@@ -423,7 +486,7 @@ end;
|
|||||||
procedure TFormConfig.ButtonAppliquerEtFermerClick(Sender: TObject);
|
procedure TFormConfig.ButtonAppliquerEtFermerClick(Sender: TObject);
|
||||||
var i,erreur : integer;
|
var i,erreur : integer;
|
||||||
s : string;
|
s : string;
|
||||||
ChangeCDM,changeInterface,changeUSB : boolean;
|
ChangeCDM,changeInterface,changeUSB,change_srv : boolean;
|
||||||
begin
|
begin
|
||||||
// contrôle adresse IP CDM
|
// contrôle adresse IP CDM
|
||||||
s:=EditAdrIPCDM.text;
|
s:=EditAdrIPCDM.text;
|
||||||
@@ -492,6 +555,7 @@ begin
|
|||||||
notificationVersion:=CheckInfoVersion.Checked;
|
notificationVersion:=CheckInfoVersion.Checked;
|
||||||
|
|
||||||
LanceCDM:=CheckLanceCDM.Checked;
|
LanceCDM:=CheckLanceCDM.Checked;
|
||||||
|
|
||||||
AvecTCO:=CheckAvecTCO.checked;
|
AvecTCO:=CheckAvecTCO.checked;
|
||||||
Lay:=EditNomLay.Text;
|
Lay:=EditNomLay.Text;
|
||||||
if RadioButton4.Checked then ServeurInterfaceCDM:=0;
|
if RadioButton4.Checked then ServeurInterfaceCDM:=0;
|
||||||
@@ -511,7 +575,23 @@ begin
|
|||||||
if RadioButton17.Checked then ServeurRetroCDM:=5;
|
if RadioButton17.Checked then ServeurRetroCDM:=5;
|
||||||
if RadioButton18.Checked then ServeurRetroCDM:=6;
|
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;
|
genere_config2;
|
||||||
formConfig.close;
|
formConfig.close;
|
||||||
end;
|
end;
|
||||||
@@ -522,6 +602,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TFormConfig.FormActivate(Sender: TObject);
|
procedure TFormConfig.FormActivate(Sender: TObject);
|
||||||
|
var i : integer;
|
||||||
begin
|
begin
|
||||||
EditAdrIPCDM.text:=adresseIPCDM;
|
EditAdrIPCDM.text:=adresseIPCDM;
|
||||||
EditPortCDM.Text:=IntToSTR(portCDM);
|
EditPortCDM.Text:=IntToSTR(portCDM);
|
||||||
@@ -563,8 +644,37 @@ begin
|
|||||||
RadioButton16.Checked:=ServeurRetroCDM=4;
|
RadioButton16.Checked:=ServeurRetroCDM=4;
|
||||||
RadioButton17.Checked:=ServeurRetroCDM=5;
|
RadioButton17.Checked:=ServeurRetroCDM=5;
|
||||||
RadioButton18.Checked:=ServeurRetroCDM=6;
|
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;
|
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.
|
end.
|
||||||
|
|||||||
Binary file not shown.
+1
-1
@@ -4,7 +4,7 @@ interface
|
|||||||
|
|
||||||
uses
|
uses
|
||||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||||
Dialogs, StdCtrls , UnitTCO, ExtCtrls;
|
Dialogs, StdCtrls , UnitTCO, ExtCtrls, Menus;
|
||||||
|
|
||||||
type
|
type
|
||||||
TFormConfigTCO = class(TForm)
|
TFormConfigTCO = class(TForm)
|
||||||
|
|||||||
Binary file not shown.
+21
-6
@@ -48,9 +48,9 @@ object FormDebug: TFormDebug
|
|||||||
end
|
end
|
||||||
object Label3: TLabel
|
object Label3: TLabel
|
||||||
Left = 448
|
Left = 448
|
||||||
Top = 136
|
Top = 168
|
||||||
Width = 97
|
Width = 97
|
||||||
Height = 225
|
Height = 193
|
||||||
AutoSize = False
|
AutoSize = False
|
||||||
Caption = 'Label3'
|
Caption = 'Label3'
|
||||||
Color = clGray
|
Color = clGray
|
||||||
@@ -80,7 +80,7 @@ object FormDebug: TFormDebug
|
|||||||
end
|
end
|
||||||
object MemoEvtDet: TMemo
|
object MemoEvtDet: TMemo
|
||||||
Left = 552
|
Left = 552
|
||||||
Top = 376
|
Top = 408
|
||||||
Width = 233
|
Width = 233
|
||||||
Height = 221
|
Height = 221
|
||||||
Color = clBlack
|
Color = clBlack
|
||||||
@@ -132,8 +132,8 @@ object FormDebug: TFormDebug
|
|||||||
OnClick = CheckAffSigClick
|
OnClick = CheckAffSigClick
|
||||||
end
|
end
|
||||||
object ButtonRazTampon: TButton
|
object ButtonRazTampon: TButton
|
||||||
Left = 688
|
Left = 448
|
||||||
Top = 600
|
Top = 576
|
||||||
Width = 97
|
Width = 97
|
||||||
Height = 33
|
Height = 33
|
||||||
Caption = 'Raz Tampon Ev'#232'nements'
|
Caption = 'Raz Tampon Ev'#232'nements'
|
||||||
@@ -202,7 +202,7 @@ object FormDebug: TFormDebug
|
|||||||
end
|
end
|
||||||
object RichEdit: TRichEdit
|
object RichEdit: TRichEdit
|
||||||
Left = 552
|
Left = 552
|
||||||
Top = 136
|
Top = 168
|
||||||
Width = 233
|
Width = 233
|
||||||
Height = 233
|
Height = 233
|
||||||
HideScrollBars = False
|
HideScrollBars = False
|
||||||
@@ -266,6 +266,21 @@ object FormDebug: TFormDebug
|
|||||||
TabOrder = 15
|
TabOrder = 15
|
||||||
OnClick = CheckBoxAffFDClick
|
OnClick = CheckBoxAffFDClick
|
||||||
end
|
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
|
object SaveDialog: TSaveDialog
|
||||||
Left = 760
|
Left = 760
|
||||||
Top = 56
|
Top = 56
|
||||||
|
|||||||
+9
-1
@@ -30,6 +30,7 @@ type
|
|||||||
CheckBoxAct: TCheckBox;
|
CheckBoxAct: TCheckBox;
|
||||||
CheckBoxEvtDetAig: TCheckBox;
|
CheckBoxEvtDetAig: TCheckBox;
|
||||||
CheckBoxAffFD: TCheckBox;
|
CheckBoxAffFD: TCheckBox;
|
||||||
|
CheckBoxAffDebDecSig: TCheckBox;
|
||||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
procedure FormCreate(Sender: TObject);
|
procedure FormCreate(Sender: TObject);
|
||||||
procedure ButtonEcrLogClick(Sender: TObject);
|
procedure ButtonEcrLogClick(Sender: TObject);
|
||||||
@@ -46,6 +47,7 @@ type
|
|||||||
procedure CheckBoxActClick(Sender: TObject);
|
procedure CheckBoxActClick(Sender: TObject);
|
||||||
procedure CheckBoxEvtDetAigClick(Sender: TObject);
|
procedure CheckBoxEvtDetAigClick(Sender: TObject);
|
||||||
procedure CheckBoxAffFDClick(Sender: TObject);
|
procedure CheckBoxAffFDClick(Sender: TObject);
|
||||||
|
procedure CheckBoxAffDebDecSigClick(Sender: TObject);
|
||||||
private
|
private
|
||||||
{ Déclarations privées }
|
{ Déclarations privées }
|
||||||
public
|
public
|
||||||
@@ -60,7 +62,7 @@ Max_Trains=50;
|
|||||||
var
|
var
|
||||||
FormDebug: TFormDebug;
|
FormDebug: TFormDebug;
|
||||||
NivDebug : integer;
|
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)
|
N_event_det : integer; // index du dernier évènement (de 1 à 20)
|
||||||
event_det : array[1..Max_event_det] of integer;
|
event_det : array[1..Max_event_det] of integer;
|
||||||
event_det_train : array[1..Max_Trains] of record
|
event_det_train : array[1..Max_Trains] of record
|
||||||
@@ -295,4 +297,10 @@ begin
|
|||||||
AffFD:=CheckBoxAffFD.checked;
|
AffFD:=CheckBoxAffFD.checked;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TFormDebug.CheckBoxAffDebDecSigClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
debug_dec_sig:=CheckBoxAffDebDecSig.checked;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
|||||||
Binary file not shown.
+1
-1
@@ -135,7 +135,7 @@ object FormPilote: TFormPilote
|
|||||||
Top = 160
|
Top = 160
|
||||||
Width = 177
|
Width = 177
|
||||||
Height = 17
|
Height = 17
|
||||||
Caption = 'Violet (cible '#224' 2 feux uniquement)'
|
Caption = 'Violet'
|
||||||
TabOrder = 9
|
TabOrder = 9
|
||||||
OnClick = RadioVioletClick
|
OnClick = RadioVioletClick
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -227,6 +227,7 @@ begin
|
|||||||
begin
|
begin
|
||||||
EtatSignalCplx[AdrPilote]:=EtatSignalCplx[0];
|
EtatSignalCplx[AdrPilote]:=EtatSignalCplx[0];
|
||||||
//Affiche(IntToSTR(EtatSignalCplx[AdrPilote]),clyellow);
|
//Affiche(IntToSTR(EtatSignalCplx[AdrPilote]),clyellow);
|
||||||
|
feux[i].EtatSignal:=EtatSignalCplx[0];
|
||||||
envoi_signal(AdrPilote);
|
envoi_signal(AdrPilote);
|
||||||
end
|
end
|
||||||
else
|
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
|
WordWrap = True
|
||||||
OnClick = ButtonMasquerClick
|
OnClick = ButtonMasquerClick
|
||||||
end
|
end
|
||||||
|
object ButtonConstruit: TButton
|
||||||
|
Left = 880
|
||||||
|
Top = 88
|
||||||
|
Width = 89
|
||||||
|
Height = 33
|
||||||
|
Caption = 'Construit TCO'
|
||||||
|
TabOrder = 12
|
||||||
|
OnClick = ButtonConstruitClick
|
||||||
|
end
|
||||||
end
|
end
|
||||||
object ButtonAfficheBandeau: TButton
|
object ButtonAfficheBandeau: TButton
|
||||||
Left = 1051
|
Left = 1051
|
||||||
|
|||||||
+47
-16
@@ -93,6 +93,7 @@ type
|
|||||||
Label29: TLabel;
|
Label29: TLabel;
|
||||||
ImagePalette22: TImage;
|
ImagePalette22: TImage;
|
||||||
Label30: TLabel;
|
Label30: TLabel;
|
||||||
|
ButtonConstruit: TButton;
|
||||||
procedure FormCreate(Sender: TObject);
|
procedure FormCreate(Sender: TObject);
|
||||||
procedure ImageTCOClick(Sender: TObject);
|
procedure ImageTCOClick(Sender: TObject);
|
||||||
procedure FormActivate(Sender: TObject);
|
procedure FormActivate(Sender: TObject);
|
||||||
@@ -245,6 +246,7 @@ type
|
|||||||
Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||||
procedure EditAdrElementKeyDown(Sender: TObject; var Key: Word;
|
procedure EditAdrElementKeyDown(Sender: TObject; var Key: Word;
|
||||||
Shift: TShiftState);
|
Shift: TShiftState);
|
||||||
|
procedure ButtonConstruitClick(Sender: TObject);
|
||||||
|
|
||||||
private
|
private
|
||||||
{ Déclarations privées }
|
{ Déclarations privées }
|
||||||
@@ -1242,7 +1244,7 @@ begin
|
|||||||
Brush.Color:=clVoies;
|
Brush.Color:=clVoies;
|
||||||
pen.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
|
if ((inverse=false) and (position=const_Devie)) or
|
||||||
((inverse=true) and (position=const_Droit)) or
|
((inverse=true) and (position=const_Droit)) or
|
||||||
(position=9) then
|
(position=9) then
|
||||||
@@ -1252,7 +1254,7 @@ begin
|
|||||||
horz;
|
horz;
|
||||||
if mode=1 then
|
if mode=1 then
|
||||||
begin
|
begin
|
||||||
// morceau de diag à tracer en clAllume
|
// morceau de diagonale à tracer en clAllume
|
||||||
x1:=x0+largeurCell-round(3*frXGlob);y1:=y0;
|
x1:=x0+largeurCell-round(3*frXGlob);y1:=y0;
|
||||||
x2:=x0+largeurCell;y2:=y0+round(4*FryGlob);
|
x2:=x0+largeurCell;y2:=y0+round(4*FryGlob);
|
||||||
x3:=x0+(largeurCell div 2)+round(4*frXGlob);y3:=jy2;
|
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)]);
|
canvas.PolyGon([point(x1,y1),point(x2,y2),point(x3,y3),point(x4,y4)]);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
// efface le morceau
|
// efface le morceau
|
||||||
if ((inverse=false) and (position=const_Devie)) or
|
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
|
// efface le morceau
|
||||||
x1:=x0+round(12*frXGlob);y1:=jy2;
|
x1:=x0+round(12*frXGlob);y1:=jy2;
|
||||||
x2:=x1+round(20*frxGlob);y2:=y1;
|
x2:=x1+round(20*frxGlob);y2:=y1;
|
||||||
@@ -1272,6 +1275,7 @@ begin
|
|||||||
Brush.Color:=fond;
|
Brush.Color:=fond;
|
||||||
Polygon([point(x1,y1),Point(x2,y2),Point(x3,y3),Point(x4,y4)]);
|
Polygon([point(x1,y1),Point(x2,y2),Point(x3,y3),Point(x4,y4)]);
|
||||||
end;
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
// aiguillage droit (sans inversion) ou dévie (avec inversion)
|
// aiguillage droit (sans inversion) ou dévie (avec inversion)
|
||||||
if ((inverse=false) and (position=const_Droit)) or
|
if ((inverse=false) and (position=const_Droit)) or
|
||||||
@@ -1282,7 +1286,6 @@ begin
|
|||||||
diagonale;
|
diagonale;
|
||||||
|
|
||||||
// efface le morceau
|
// efface le morceau
|
||||||
if (position=const_Droit) then
|
|
||||||
x1:=x0+round(19*frXGlob);y1:=jy1;
|
x1:=x0+round(19*frXGlob);y1:=jy1;
|
||||||
x2:=x1+round(6*frxGlob);y2:=y1;
|
x2:=x1+round(6*frxGlob);y2:=y1;
|
||||||
x3:=x2-round(12*FrxGlob);y3:=y2+round(12*fryGlob);
|
x3:=x2-round(12*FrxGlob);y3:=y2+round(12*fryGlob);
|
||||||
@@ -1291,7 +1294,7 @@ begin
|
|||||||
Brush.Color:=fond;
|
Brush.Color:=fond;
|
||||||
Polygon([point(x1,y1),Point(x2,y2),Point(x3,y3),Point(x4,y4)]);
|
Polygon([point(x1,y1),Point(x2,y2),Point(x3,y3),Point(x4,y4)]);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
// Element 14
|
// Element 14
|
||||||
@@ -2262,12 +2265,12 @@ end;
|
|||||||
// transforme les branches en TCO
|
// transforme les branches en TCO
|
||||||
// trop compliqué. Il faudra dessiner son TCO soit meme
|
// trop compliqué. Il faudra dessiner son TCO soit meme
|
||||||
procedure construit_TCO;
|
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
|
begin
|
||||||
// étape 0 Raz du TCO
|
// étape 0 Raz du TCO
|
||||||
for y:=1 to 20 do
|
for y:=1 to NbreCellY do
|
||||||
for x:=1 to 20 do
|
for x:=1 to NbreCellX do
|
||||||
begin
|
begin
|
||||||
TCO[x,y].Adresse:=0;
|
TCO[x,y].Adresse:=0;
|
||||||
TCO[x,y].Btype:=0;
|
TCO[x,y].Btype:=0;
|
||||||
end;
|
end;
|
||||||
@@ -2285,10 +2288,33 @@ begin
|
|||||||
Affiche('La branche la plus grande a pour index '+IntToSTR(IndexMax),clOrange);
|
Affiche('La branche la plus grande a pour index '+IntToSTR(IndexMax),clOrange);
|
||||||
|
|
||||||
// stocker cette branche au milieu du TCO (en 5)
|
// stocker cette branche au milieu du TCO (en 5)
|
||||||
|
ligne:=5;
|
||||||
for i:=1 to Max do
|
for i:=1 to Max do
|
||||||
begin
|
begin
|
||||||
TCO[i,5].Adresse:=BrancheN[IndexMax,i].Adresse;
|
Adresse:=BrancheN[IndexMax,i].Adresse;
|
||||||
TCO[i,5].Btype:=BrancheN[IndexMax,i].Btype;
|
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;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@@ -2307,8 +2333,9 @@ begin
|
|||||||
// récupérer la position de l'aiguillage
|
// récupérer la position de l'aiguillage
|
||||||
if (bImage>=2) and (btype<=14) then
|
if (bImage>=2) and (btype<=14) then
|
||||||
begin
|
begin
|
||||||
if Adresse<>0 then pos:=Aiguillage[adresse].position
|
if Adresse<>0 then pos:=Aiguillage[adresse].position
|
||||||
else pos:=9;
|
|
||||||
|
else pos:=9;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
Xorg:=(x-1)*LargeurCell;
|
Xorg:=(x-1)*LargeurCell;
|
||||||
@@ -3868,8 +3895,8 @@ end;
|
|||||||
|
|
||||||
procedure TFormTCO.Button1Click(Sender: TObject);
|
procedure TFormTCO.Button1Click(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
Detecteur[569]:=true;
|
Detecteur[569]:=true;
|
||||||
Maj_tco(569);
|
Maj_tco(569);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@@ -4181,6 +4208,10 @@ begin
|
|||||||
ScrollBox.Height:=ClientHeight-Panel1.Height-40;
|
ScrollBox.Height:=ClientHeight-Panel1.Height-40;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TFormTCO.ButtonConstruitClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
construit_TCO;
|
||||||
|
end;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
|
|
||||||
|
|||||||
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.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
|
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.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.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.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