This commit is contained in:
f1iwq2
2023-01-08 18:53:18 +01:00
parent 49b1926678
commit 1a25d29116
28 changed files with 2071 additions and 1809 deletions
+67 -45
View File
@@ -1,23 +1,27 @@
/ Fichier de configuration de signaux_complexes_GL / Fichier de configuration de signaux_complexes_GL
Algo_localisation=1
Avec_roulage=1
Debug=0
Filtrage_det=3
Fonte=12 Fonte=12
Protocole=2 Protocole=1
IpV4_PC=127.0.0.1:9999 IpV4_PC=127.0.0.1:9999
Ipv4_interface=192.168.1.23:5550 Ipv4_interface=192.168.1.23:5550
MaxCom=30 MaxCom=30
Protocole_serie=COMX:115200,N,8,1,0 Protocole_serie=COM22:115200,N,8,1,0
Inter_car=50 Inter_car=50
Tempo_maxi=7 Tempo_maxi=7
Entete=0 Entete=1
Init_Aig=0 Init_Aig=0
Init_Dem_Aig=0 Init_Dem_Aig=0
Tempo_Aig=200 Tempo_Aig=20
Init_demUSBCOM=0 Init_demUSBCOM=0
Init_demETH=0 Init_demETH=1
Fenetre=0 Fenetre=0
nb_det_dist=3 nb_det_dist=3
verif_version=0 verif_version=0
notif_version=0 notif_version=0
TCO=1 TCO=0
MasqueBandeauTCO=0 MasqueBandeauTCO=0
CDM=0 CDM=0
Lay=RESEAU_GILY_SIGNAL_AJOUTE.LAY Lay=RESEAU_GILY_SIGNAL_AJOUTE.LAY
@@ -29,48 +33,51 @@ Nb_cantons_Sig=3
Alg_Unisemaf=1 Alg_Unisemaf=1
/------------ /------------
[section_aig] [section_aig]
1,P518,D100D,S3P,V30,I0,INIT(2,5) 1,P518,D100D,S3P,V30,I0,INIT(2,3)
2,P12S,D519,S100S,V0,I0,INIT(2,5) 2,P12S,D519,S100S,V0,I0,INIT(1,3)
3,P1S,D4P,S5D,V0,I0,INIT(2,5) 3,P1S,D4P,S5D,V0,I0,INIT(2,2)
4,P3D,D6S,S514,V0,I0,INIT(2,5) 4,P3D,D6S,S514,V0,I0,INIT(1,2)
5,P515,D3S,S100S,V0,I0,INIT(2,5) 5,P515,D3S,S100S,V0,I0,INIT(1,2)
6,P516,D0,S4D,V0,I0,INIT(2,5) 6,P516,D0,S4D,V0,I0,INIT(2,2)
7,P527,D519,S520,V0,I0,INIT(2,5) 7,P527,D519,S520,V0,I0,INIT(2,2)
8,P527,D521,S522,V0,I0,INIT(2,5) 8,P527,D521,S103S,V0,I0,INIT(1,2)
9,P526,D513,S515,V60,I0,INIT(2,5) 9,P526,D103D,S515,V60,I0,INIT(1,2)
10,P101S,D29P,S528,V30,I0,INIT(2,5) 10,P101S,D29P,S528,V30,I0,INIT(1,2)
11,P18P,D30D,S101D,V0,I0,INIT(2,5) 11,P18P,D30D,S101D,V0,I0,INIT(1,2)
12,P517,D20S,S2P,V0,I0,INIT(1,5) 12,P517,D20S,S2P,V0,I0,INIT(1,2)
17,P525,D535,S528,V0,I0,INIT(2,5) 17,P525,D535,S528,V0,I0,INIT(1,4)
18,P11P,D23P,S517,V0,I0,INIT(1,5) 18,P11P,D23P,S102S,V0,I0,INIT(1,2)
19,P101D,D22P,S531,V0,I0,INIT(2,5) 19,P101D,D22P,S531,V0,I0,INIT(1,2)
20,P520,D21P,S12D,V0,I0,INIT(2,5) 20,P520,D21P,S12D,V0,I0,INIT(2,2)
21,P20D,D28D,S28D,V0,I0,INIT(2,5) 21,P20D,D28D,S28D,V0,I0,INIT(2,2)
22,P19D,D537,S32P,V0,I0,INIT(2,5) 22,P19D,D537,S32P,V0,I0,INIT(2,2)
23,P18D,D538,S534,V0,I0,INIT(2,5) 23,P18D,D538,S534,V0,I0,INIT(2,2)
24,P538,D32S,S533,V0,I0,INIT(2,5) 24,P538,D32S,S533,V0,I0,INIT(2,2)
25,P31S,D529,S27P,V0,I0,INIT(2,5) 25,P104S,D529,S27P,V0,I0,INIT(2,2)
26TJD,D(530,28D),S(529,28S),V0,I0,INIT(2,5),E4 26TJD,D(530,28D),S(529,28S),V0,I0,INIT(2,2),E4
27,P25S,D530,S537,V0,I0,INIT(2,5) 27,P25S,D530,S537,V0,I0,INIT(2,2)
28TJD,D(21D,26D),S(21S,26S),V0,I0,INIT(2,5),E4 28TJD,D(21D,26D),S(21S,26S),V0,I0,INIT(2,2),E4
29,P10D,D513,S30S,V60,I0,INIT(2,5) 29,P10D,D513,S30S,V60,I0,INIT(2,2)
30,P524,D11D,S29S,V0,I0,INIT(2,5) 30,P524,D11D,S29S,V0,I0,INIT(2,2)
31,P534,D34D,S25P,V0,I0,INIT(1,5) 31,P534,D34D,S104S,V0,I0,INIT(1,2)
32,P22S,D34S,S24D,V0,I0,INIT(1,5) 32,P22S,D34S,S24D,V0,I0,INIT(1,2)
34,P0,D31D,S32D,V0,I0,INIT(2,5) 34,P0,D31D,S32D,V0,I0,INIT(2,2)
100CROI,D(1D,523Z),S(2S,5S) 100CROI,D(1D,523Z),S(2S,5S)
101CROI,D(11S,525Z),S(19P,10P) 101CROI,D(11S,525Z),S(19P,10P)
102CROI,D(22P,10D),S(517,18S)
103CROI,D(513,9D),S(522,8S)
104CROI,D(0,32D),S(25P,31S)
0 0
/------------ /------------
[section_branches] [section_branches]
A2,A12,517,A18,A11,A30,524,521,A8,527,A7,519,A2 A2,A12,517,A102,A18,A11,A30,524,521,A8,527,A7,519,A2
A7,520,A20,A12 A7,520,A20,A12
A1,A3,A4,514,522,A8 A1,A3,A4,514,522,A103,A8
A1,A100,523,526,A9,513,A29,A10,A101,A19,531,518,A1 A1,A100,523,526,A9,A103,513,A29,A10,A101,A19,531,518,A1
A9,515,A5 A9,515,A5
A11,A101,525,A17,528,A10 A11,A101,525,A17,528,A10
A17,535,533,A24,538,A23 A17,535,533,A24,538,A23
A7,520,A20,A21,A28,A26,530,A27,A25,A31,534,A23,A18 A7,520,A20,A21,A28,A26,530,A27,A25,A104,A31,534,A23,A18
A26,529,A25 A26,529,A25
A22,537,A27 A22,537,A27
A22,A32,A24 A22,A32,A24
@@ -79,21 +86,19 @@ A31,A34,0
0 0
/------------ /------------
[section_sig] [section_sig]
500,4,0,5,(527,A8),0,FVC0,FRC0,(A12S),MOT(90,85,149,153,105,0,0,0,101,165,0,0,0,0,0,0,0,0,0),NA5
510,9,0,2,(530,A26),0,FVC0,FRC0,(A100D,A5S),MOT(8,1,0,4,0,0,0,0,2,0,16,0,0,32,0,0,0,0,0),NA3
176,7,0,1,(520,A20),0,FVC0,FRC0 176,7,0,1,(520,A20),0,FVC0,FRC0
190,7,0,1,(523,526),0,FVC0,FRC0 190,7,0,1,(523,526),0,FVC0,FRC0
204,9,0,1,(527,A7),1,FVC0,FRC0 204,9,0,1,(527,A7),1,FVC0,FRC0
218,7,0,1,(525,A17),0,FVC0,FRC0 218,7,0,1,(525,A17),0,FVC0,FRC0
232,2,1,1,(516,A6),0,FVC0,FRC0 232,2,1,1,(516,A6),0,FVC0,FRC0
260,9,1,1,(518,A1),1,FVC0,FRC0 520,9,1,1,(518,A1),1,FVC0,FRC0
274,3,0,1,(524,521),0,FVC0,FRC0 274,3,0,1,(524,521),0,FVC0,FRC0
288,7,0,1,(522,A8),1,FVC0,FRC0 288,7,0,1,(522,A103),1,FVC0,FRC0
302,9,0,1,(526,A9),1,FVC0,FRC0 302,9,0,1,(526,A9),1,FVC0,FRC0
316,7,1,1,(515,A5),1,FVC0,FRC0 316,7,1,1,(515,A5),1,FVC0,FRC0
330,7,0,1,(519,A2),1,FVC0,FRC0 330,7,0,1,(519,A2),1,FVC0,FRC0
344,9,0,1,(528,A10),1,FVC0,FRC0 344,9,0,1,(528,A10),1,FVC0,FRC0
358,9,0,1,(517,A18),1,FVC0,FRC0 358,9,0,1,(517,A102),1,FVC0,FRC0
372,D3,1,(A10D)(A19S)(A19D,A22D)(A19D,A22S) 372,D3,1,(A10D)(A19S)(A19D,A22D)(A19D,A22S)
382,D3,1,(A29S,A10S)(A19S)(A19D,A22D)(A19D,A22S) 382,D3,1,(A29S,A10S)(A19S)(A19D,A22D)(A19D,A22S)
392,3,0,1,(535,533),1,FVC0,FRC0 392,3,0,1,(535,533),1,FVC0,FRC0
@@ -104,7 +109,6 @@ A31,A34,0
476,9,0,1,(538,A23),1,FVC0,FRC0 476,9,0,1,(538,A23),1,FVC0,FRC0
497,9,0,4,(531,A19),1,FVC0,FRC0 497,9,0,4,(531,A19),1,FVC0,FRC0
600,7,0,0,(521,A8),1,FVC0,FRC0 600,7,0,0,(521,A8),1,FVC0,FRC0
1001,9,0,7,(529,A26),1,FVC0,FRC1,(A21S,A6D),(A1S),(A3D),SR(3,5,2,4,0,0,0,0,0,0,0,0,3,0,0,0)
0 0
/------------ /------------
[section_act] [section_act]
@@ -127,3 +131,21 @@ AdrBaseDetDccpp=513
<Y 8 1> <Y 8 1>
<1> <1>
0 0
/------------
[section_trains]
TrainElectrique,11,110,40,30
BB25531,1,120,50,40
TGV,2,120,50,30
BB16024,3,120,60,50
CC406526,4,120,80,70
CAMERA,10,120,0,0
0
/------------
[section_placement]
TRAINELECTRIQUE,0,0,0
BB25531,0,0,0
TGV,0,0,0
BB16024,523,526,0
CC406526,528,531,0
CAMERA,0,0,0
0
Binary file not shown.
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
+45 -21
View File
@@ -1570,7 +1570,7 @@ object FormConfig: TFormConfig
Top = 8 Top = 8
Width = 633 Width = 633
Height = 505 Height = 505
ActivePage = TabSheetCDM ActivePage = TabSheetAutonome
Font.Charset = DEFAULT_CHARSET Font.Charset = DEFAULT_CHARSET
Font.Color = clBlack Font.Color = clBlack
Font.Height = -11 Font.Height = -11
@@ -2126,41 +2126,38 @@ object FormConfig: TFormConfig
Left = 312 Left = 312
Top = 8 Top = 8
Width = 297 Width = 297
Height = 81 Height = 49
BevelInner = bvLowered BevelInner = bvLowered
BevelKind = bkFlat BevelKind = bkFlat
BorderStyle = bsNone BorderStyle = bsNone
Lines.Strings = ( Lines.Strings = (
'1. Port COM de l'#39'adresse USB de l'#39'interface XpressNet. ' '1. Port COM de l'#39'adresse USB de l'#39'interface XpressNet. '
'Attention de COM1 '#224' 30 - Si le port de l'#39'interface USB>30, il ' 'COM de 1 '#224' 99 - Si COMX : Signaux complexes d'#233'tecte le '
'faut le changer manuellement dans le gestionnaire des ' 'port automatiquement (mais le d'#233'marrage est plus long)'
'p'#233'riph'#233'riques. Si COMX : Signaux complexes d'#233'tecte le' ' ')
'port automatiquement (mais le d'#233'marrage est plus long)')
ReadOnly = True ReadOnly = True
TabOrder = 3 TabOrder = 3
end end
object Memo2: TMemo object Memo2: TMemo
Left = 312 Left = 312
Top = 96 Top = 64
Width = 297 Width = 297
Height = 97 Height = 73
BevelInner = bvLowered BevelInner = bvLowered
BevelKind = bkFlat BevelKind = bkFlat
BorderStyle = bsNone BorderStyle = bsNone
Lines.Strings = ( Lines.Strings = (
'2. Valeur de temporisation entre deux octets transf'#233'r'#233's '#224' ' '2. Valeur de temporisation entre deux octets transf'#233'r'#233's '#224' '
'l'#39'interface. Elle peut '#234'tre nulle. ' 'l'#39'interface. Elle peut '#234'tre nulle. '
'Pour les interfaces s'#233'rie sans protocole (0) comme le ' 'Pour les interfaces s'#233'rie sans protocole (0) comme le GENLI, il '
'GENLI, il est conseill'#233' de la positionner '#224' une valeur de ' 'est conseill'#233' de mettre 30 (ms). Pour les interfaces avec '
'l'#39'ordre de 30 (ms). ' 'protocole mat'#233'riel RTS-CTS (2) cette variable est ignor'#233'e.')
'Pour les interfaces avec protocole mat'#233'riel RTS-CTS (2) '
'cette variable est ignor'#233'e.')
ReadOnly = True ReadOnly = True
TabOrder = 4 TabOrder = 4
end end
object Memo3: TMemo object Memo3: TMemo
Left = 312 Left = 312
Top = 200 Top = 144
Width = 297 Width = 297
Height = 89 Height = 89
BevelInner = bvLowered BevelInner = bvLowered
@@ -2169,8 +2166,8 @@ object FormConfig: TFormConfig
Lines.Strings = ( Lines.Strings = (
'3. Valeur maximale par tranche de 100 ms qui d'#233'finit le temps ' '3. Valeur maximale par tranche de 100 ms qui d'#233'finit le temps '
'd'#39'attente de la r'#233'ponse de l'#39'interface apr'#232's ' 'd'#39'attente de la r'#233'ponse de l'#39'interface apr'#232's '
'une trame qui lui est transf'#233'r'#233'e. ' 'une trame qui lui est transf'#233'r'#233'e. Cette valeur est '#224' tester en '
'Cette valeur est '#224' tester en fonction de votre interface. ' 'fonction de votre interface. '
'En cas de d'#233'passement de la valeur, un message '#171' pas de ' 'En cas de d'#233'passement de la valeur, un message '#171' pas de '
'r'#233'ponse de l'#39'interface '#187' sera affich'#233'.') 'r'#233'ponse de l'#39'interface '#187' sera affich'#233'.')
ReadOnly = True ReadOnly = True
@@ -2178,16 +2175,18 @@ object FormConfig: TFormConfig
end end
object Memo4: TMemo object Memo4: TMemo
Left = 312 Left = 312
Top = 296 Top = 240
Width = 297 Width = 297
Height = 57 Height = 49
BevelInner = bvLowered BevelInner = bvLowered
BevelKind = bkFlat BevelKind = bkFlat
BorderStyle = bsNone BorderStyle = bsNone
Lines.Strings = ( Lines.Strings = (
'4. Pour l'#39'utilisation d'#39'interfaces s'#233'rie (GENLI), cette valeur '
'doit '#234'tre '#224' 0. Pour les interfaces utilisant nativement de ' '4. Pour l'#39'utilisation d'#39'interfaces s'#233'rie (GENLI), cette valeur d' +
'l'#39'USB, cette valeur doit '#234'tre '#224' 1. ') 'oit '
#234'tre '#224' 0. Pour les interfaces utilisant nativement de l'#39'USB, '
'cette valeur doit '#234'tre '#224' 1. ')
ReadOnly = True ReadOnly = True
TabOrder = 6 TabOrder = 6
end end
@@ -2300,6 +2299,31 @@ object FormConfig: TFormConfig
TabOrder = 1 TabOrder = 1
end end
end end
object GroupBox25: TGroupBox
Left = 312
Top = 320
Width = 297
Height = 49
Caption = 'Divers'
TabOrder = 9
object Label58: TLabel
Left = 24
Top = 24
Width = 155
Height = 13
Caption = 'Filtrage des d'#233'tecteurs (x100 ms)'
end
object EditFiltrDet: TEdit
Left = 224
Top = 16
Width = 25
Height = 21
Hint = 'Temps de filtrage d'#39'un d'#233'tecteur qui passe '#224' 0'
ParentShowHint = False
ShowHint = True
TabOrder = 0
end
end
end end
object TabSheetAig: TTabSheet object TabSheetAig: TTabSheet
Caption = 'Aiguillages' Caption = 'Aiguillages'
+32 -7
View File
@@ -318,6 +318,9 @@ type
EditVitNom: TEdit; EditVitNom: TEdit;
LabelInfVitesse: TLabel; LabelInfVitesse: TLabel;
CheckRoulage: TCheckBox; CheckRoulage: TCheckBox;
GroupBox25: TGroupBox;
Label58: TLabel;
EditFiltrDet: TEdit;
procedure ButtonAppliquerEtFermerClick(Sender: TObject); procedure ButtonAppliquerEtFermerClick(Sender: TObject);
procedure FormActivate(Sender: TObject); procedure FormActivate(Sender: TObject);
procedure FormCreate(Sender: TObject); procedure FormCreate(Sender: TObject);
@@ -469,6 +472,7 @@ const
// constantes du fichier de configuration // constantes du fichier de configuration
NomConfig='ConfigGenerale.cfg'; NomConfig='ConfigGenerale.cfg';
Debug_ch='Debug'; Debug_ch='Debug';
Filtrage_det_ch='Filtrage_det';
Algo_localisation_ch='Algo_localisation'; Algo_localisation_ch='Algo_localisation';
Avec_roulage_ch='Avec_roulage'; Avec_roulage_ch='Avec_roulage';
nb_det_dist_ch='nb_det_dist'; nb_det_dist_ch='nb_det_dist';
@@ -677,6 +681,8 @@ begin
envoi_CDM(s); envoi_CDM(s);
sleep(10); sleep(10);
Application.ProcessMessages; Application.ProcessMessages;
SauvefiltrageDet0:=filtrageDet0;
filtrageDet0:=0;
end; end;
end; end;
//else Affiche('CDM Rail non lancé',clOrange); //else Affiche('CDM Rail non lancé',clOrange);
@@ -752,9 +758,10 @@ begin
end; end;
end; end;
i:=pos(':',sa); i:=pos('COM',sa);
val(copy(sa,4,i-1),Numport,erreur); if i<>0 then delete(sa,1,3);
config_com:=not( (copy(sa,1,3)<>'COM') or (NumPort>MaxPortCom) or (prot_serie=-1) or (prot_serie>4) or (i=0) ); val(sa,Numport,erreur);
config_com:=not( (i=0) or (NumPort>MaxPortCom) or (prot_serie=-1) or (prot_serie>4) or (i=0) );
end; end;
// transforme l'aiguillage de la base de données aiguillage en texte // transforme l'aiguillage de la base de données aiguillage en texte
@@ -1381,6 +1388,7 @@ begin
writeln(fichierN,Algo_localisation_ch+'=',Algo_localisation); writeln(fichierN,Algo_localisation_ch+'=',Algo_localisation);
writeln(fichierN,Avec_roulage_ch+'=',avecRoulage); writeln(fichierN,Avec_roulage_ch+'=',avecRoulage);
writeln(fichierN,debug_ch+'=',debug); writeln(fichierN,debug_ch+'=',debug);
writeln(fichierN,Filtrage_det_ch+'=',filtrageDet0);
// taille de la fonte // taille de la fonte
writeln(fichierN,Fonte_ch+'=',TailleFonte); writeln(fichierN,Fonte_ch+'=',TailleFonte);
FormPrinc.FenRich.Font.Size:=TailleFonte; FormPrinc.FenRich.Font.Size:=TailleFonte;
@@ -2310,6 +2318,14 @@ begin
val(s,debug,erreur); val(s,debug,erreur);
end; end;
sa:=uppercase(Filtrage_det_ch)+'=';
i:=pos(sa,s);
if i=1 then
begin
delete(s,i,length(sa));
val(s,filtrageDet0,erreur);
end;
sa:=uppercase(Algo_localisation_ch)+'='; sa:=uppercase(Algo_localisation_ch)+'=';
i:=pos(sa,s); i:=pos(sa,s);
if i=1 then if i=1 then
@@ -2408,6 +2424,7 @@ begin
trouve_PROTOCOLE_SERIE:=true; trouve_PROTOCOLE_SERIE:=true;
delete(s,i,length(sa)); delete(s,i,length(sa));
if not(config_com(s)) then Affiche('Erreur port com mal déclaré : '+s,clred); if not(config_com(s)) then Affiche('Erreur port com mal déclaré : '+s,clred);
if (NumPort>MaxPortCom) then Affiche('Le port com est supérieur au nombre de COMx à explorer dans le fichier de configuraion',clred);
portcom:=s; portcom:=s;
end; end;
@@ -2960,6 +2977,10 @@ begin
changeInterface:=changeInterface or (i<>portinterface); changeInterface:=changeInterface or (i<>portinterface);
portInterface:=i; portInterface:=i;
val(EditFiltrDet.Text,i,erreur);
if (i<0) or (i>10) then i:=3;
filtrageDet0:=i;
Val(editTempoAig.Text,i,erreur); Val(editTempoAig.Text,i,erreur);
if i>3000 then begin labelInfo.Caption:='Temporisation de séquencement incorrecte ';ok:=false;end; if i>3000 then begin labelInfo.Caption:='Temporisation de séquencement incorrecte ';ok:=false;end;
Tempo_Aig:=i; Tempo_Aig:=i;
@@ -3136,10 +3157,6 @@ var i :integer;
s : string; s : string;
begin begin
if affevt then affiche('FormConfig activate',clLime); if affevt then affiche('FormConfig activate',clLime);
Aig_supprime.Adresse:=0;
Feu_Supprime.Adresse:=0;
Feu_sauve.adresse:=0;
clicListe:=false; clicListe:=false;
Edit_HG.Visible:=false; Edit_HG.Visible:=false;
labelHG.Visible:=false; labelHG.Visible:=false;
@@ -3174,6 +3191,7 @@ begin
EditIPLenz.text:=AdresseIP; EditIPLenz.text:=AdresseIP;
EditportLenz.text:=IntToSTR(PortInterface); EditportLenz.text:=IntToSTR(PortInterface);
EditTempoAig.Text:=IntToSTR(Tempo_Aig); EditTempoAig.Text:=IntToSTR(Tempo_Aig);
EditFiltrDet.text:=intToSTR(filtrageDet0);
EditComUSB.Text:=PortCom; EditComUSB.Text:=PortCom;
EditFonte.text:=IntToSTR(TailleFonte); EditFonte.text:=IntToSTR(TailleFonte);
@@ -3370,6 +3388,9 @@ begin
clicListe:=true; clicListe:=true;
if affevt then affiche('FormConfig create',clLime); if affevt then affiche('FormConfig create',clLime);
PageControl.ActivePage:=Formconfig.TabSheetCDM; // force le premier onglet sur la page PageControl.ActivePage:=Formconfig.TabSheetCDM; // force le premier onglet sur la page
Aig_supprime.Adresse:=0;
Feu_Supprime.Adresse:=0;
Feu_sauve.adresse:=0;
clicListe:=false; clicListe:=false;
if AvecRoulage=1 then LabelInfVitesse.Visible:=false else LabelInfVitesse.Visible:=true; if AvecRoulage=1 then LabelInfVitesse.Visible:=false else LabelInfVitesse.Visible:=true;
ConfigPrete:=true; ConfigPrete:=true;
@@ -9254,6 +9275,10 @@ end;
end. end.
Binary file not shown.
+2 -2
View File
@@ -74,13 +74,13 @@ object FormConfCellTCO: TFormConfCellTCO
TabOrder = 1 TabOrder = 1
OnClick = ButtonFonteClick OnClick = ButtonFonteClick
end end
object EditTexte: TEdit object EditTexteCCTCO: TEdit
Left = 8 Left = 8
Top = 16 Top = 16
Width = 209 Width = 209
Height = 24 Height = 24
TabOrder = 2 TabOrder = 2
OnChange = EditTexteChange OnChange = EditTexteCCTCOChange
end end
end end
object GroupBox2: TGroupBox object GroupBox2: TGroupBox
+11 -8
View File
@@ -13,7 +13,7 @@ type
ComboRepr: TComboBox; ComboRepr: TComboBox;
Label1: TLabel; Label1: TLabel;
ButtonFonte: TButton; ButtonFonte: TButton;
EditTexte: TEdit; EditTexteCCTCO: TEdit;
GroupBox2: TGroupBox; GroupBox2: TGroupBox;
Label15: TLabel; Label15: TLabel;
EditTypeImage: TEdit; EditTypeImage: TEdit;
@@ -31,7 +31,7 @@ type
procedure ButtonOkClick(Sender: TObject); procedure ButtonOkClick(Sender: TObject);
procedure EditTypeImageKeyPress(Sender: TObject; var Key: Char); procedure EditTypeImageKeyPress(Sender: TObject; var Key: Char);
procedure EditAdrElementChange(Sender: TObject); procedure EditAdrElementChange(Sender: TObject);
procedure EditTexteChange(Sender: TObject); procedure EditTexteCCTCOChange(Sender: TObject);
procedure ButtonFonteClick(Sender: TObject); procedure ButtonFonteClick(Sender: TObject);
procedure FormCreate(Sender: TObject); procedure FormCreate(Sender: TObject);
procedure ComboReprChange(Sender: TObject); procedure ComboReprChange(Sender: TObject);
@@ -65,11 +65,12 @@ procedure actualise;
var Bimage : integer; var Bimage : integer;
oriente,piedFeu : integer; oriente,piedFeu : integer;
begin begin
actualize:=true; // évite les évènemebts parasites actualize:=true; // évite les évènements parasites
FormConfCellTCO.caption:='Propriétés de la cellule '+IntToSTR(XClicCell)+','+intToSTR(YClicCell); FormConfCellTCO.caption:='Propriétés de la cellule '+IntToSTR(XClicCell)+','+intToSTR(YClicCell);
Bimage:=TCO[XClicCell,YClicCell].Bimage; Bimage:=TCO[XClicCell,YClicCell].Bimage;
formConfCellTCO.EditTypeImage.Text:=intToSTR(Bimage); formConfCellTCO.EditTypeImage.Text:=intToSTR(Bimage);
// si signal
if Bimage<30 then if Bimage<30 then
With formConfCellTCO.ImagePalette do With formConfCellTCO.ImagePalette do
begin begin
@@ -78,6 +79,7 @@ begin
Transparent:=false; Transparent:=false;
end; end;
// si pas signal
if Bimage<>30 then if Bimage<>30 then
with formConfCellTCO do with formConfCellTCO do
begin begin
@@ -88,6 +90,7 @@ begin
RadioButtonD.Enabled:=false; RadioButtonD.Enabled:=false;
end; end;
//mettre l'image de la cellule cliquée dans l'icone de la fenetre de config cellule
with formConfCellTCO.ImagePalette.Picture do with formConfCellTCO.ImagePalette.Picture do
case Bimage of case Bimage of
1: Assign(FormTCO.ImagePalette1.Picture); 1: Assign(FormTCO.ImagePalette1.Picture);
@@ -181,7 +184,7 @@ begin
with formConfCellTCO do with formConfCellTCO do
begin begin
EditTexte.Text:=Tco[XClicCell,YClicCell].Texte; EditTexteCCTCO.Text:=Tco[XClicCell,YClicCell].Texte;
EditAdrElement.Text:=IntToSTR(tco[XClicCellInserer,YClicCellInserer].Adresse); EditAdrElement.Text:=IntToSTR(tco[XClicCellInserer,YClicCellInserer].Adresse);
ComboRepr.ItemIndex:=tco[XClicCell,yClicCell].repr; ComboRepr.ItemIndex:=tco[XClicCell,yClicCell].repr;
end; end;
@@ -245,7 +248,7 @@ begin
end; end;
procedure TFormConfCellTCO.EditTexteChange(Sender: TObject); procedure TFormConfCellTCO.EditTexteCCTCOChange(Sender: TObject);
begin begin
PCanvasTCO.Brush.Color:=fond; PCanvasTCO.Brush.Color:=fond;
@@ -254,11 +257,11 @@ begin
Tco[XClicCell,YClicCell].CoulFonte:=clTexte; Tco[XClicCell,YClicCell].CoulFonte:=clTexte;
Tco[XClicCell,YClicCell].TailleFonte:=8; Tco[XClicCell,YClicCell].TailleFonte:=8;
end; end;
Tco[XClicCell,YClicCell].Texte:=EditTexte.Text; Tco[XClicCell,YClicCell].Texte:=EditTexteCCTCO.Text;
TCO_modifie:=true; if not(clicTCO) then TCO_modifie:=true;
if not(selectionaffichee) then efface_entoure; if not(selectionaffichee) then efface_entoure;
affiche_texte(XClicCell,YClicCell); affiche_texte(XClicCell,YClicCell);
formTCO.EditTexte.Text:=EditTexte.text; formTCO.EditTexte.Text:=EditTexteCCTCO.text;
if not(selectionaffichee) then _entoure_cell_clic; if not(selectionaffichee) then _entoure_cell_clic;
end; end;
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
+44 -64
View File
@@ -1,9 +1,8 @@
object FormDebug: TFormDebug object FormDebug: TFormDebug
Left = 306 Left = 306
Top = 21 Top = 21
Width = 856 Width = 864
Height = 721 Height = 721
VertScrollBar.Position = 6
VertScrollBar.Smooth = True VertScrollBar.Smooth = True
VertScrollBar.Tracking = True VertScrollBar.Tracking = True
Caption = 'Fen'#234'tre de d'#233'bug' Caption = 'Fen'#234'tre de d'#233'bug'
@@ -21,13 +20,13 @@ object FormDebug: TFormDebug
OnCreate = FormCreate OnCreate = FormCreate
OnKeyPress = FormKeyPress OnKeyPress = FormKeyPress
DesignSize = ( DesignSize = (
831 839
690) 690)
PixelsPerInch = 96 PixelsPerInch = 96
TextHeight = 13 TextHeight = 13
object Label1: TLabel object Label1: TLabel
Left = 666 Left = 674
Top = -2 Top = 4
Width = 108 Width = 108
Height = 13 Height = 13
Anchors = [akTop, akRight] Anchors = [akTop, akRight]
@@ -42,8 +41,8 @@ object FormDebug: TFormDebug
ParentFont = False ParentFont = False
end end
object Label2: TLabel object Label2: TLabel
Left = 514 Left = 522
Top = -4 Top = 2
Width = 131 Width = 131
Height = 18 Height = 18
Anchors = [akTop, akRight] Anchors = [akTop, akRight]
@@ -56,8 +55,8 @@ object FormDebug: TFormDebug
ParentFont = False ParentFont = False
end end
object EditNivDebug: TEdit object EditNivDebug: TEdit
Left = 777 Left = 785
Top = -4 Top = 2
Width = 49 Width = 49
Height = 21 Height = 21
Anchors = [akTop, akRight] Anchors = [akTop, akRight]
@@ -72,8 +71,8 @@ object FormDebug: TFormDebug
OnKeyPress = EditNivDebugKeyPress OnKeyPress = EditNivDebugKeyPress
end end
object ButtonEcrLog: TButton object ButtonEcrLog: TButton
Left = 441 Left = 449
Top = 322 Top = 328
Width = 97 Width = 97
Height = 29 Height = 29
Anchors = [akTop, akRight] Anchors = [akTop, akRight]
@@ -82,8 +81,8 @@ object FormDebug: TFormDebug
OnClick = ButtonEcrLogClick OnClick = ButtonEcrLogClick
end end
object ButtonRazTampon: TButton object ButtonRazTampon: TButton
Left = 441 Left = 449
Top = 354 Top = 360
Width = 97 Width = 97
Height = 33 Height = 33
Anchors = [akTop, akRight] Anchors = [akTop, akRight]
@@ -93,8 +92,8 @@ object FormDebug: TFormDebug
OnClick = ButtonRazTamponClick OnClick = ButtonRazTamponClick
end end
object ButtonCherche: TButton object ButtonCherche: TButton
Left = 441 Left = 449
Top = 290 Top = 296
Width = 97 Width = 97
Height = 25 Height = 25
Anchors = [akTop, akRight] Anchors = [akTop, akRight]
@@ -103,8 +102,8 @@ object FormDebug: TFormDebug
OnClick = ButtonChercheClick OnClick = ButtonChercheClick
end end
object ButtonAffEvtChrono: TButton object ButtonAffEvtChrono: TButton
Left = 441 Left = 449
Top = 250 Top = 256
Width = 97 Width = 97
Height = 33 Height = 33
Anchors = [akTop, akRight] Anchors = [akTop, akRight]
@@ -114,8 +113,8 @@ object FormDebug: TFormDebug
OnClick = ButtonAffEvtChronoClick OnClick = ButtonAffEvtChronoClick
end end
object ButtonCop: TButton object ButtonCop: TButton
Left = 441 Left = 449
Top = 202 Top = 208
Width = 97 Width = 97
Height = 41 Height = 41
Anchors = [akTop, akRight] Anchors = [akTop, akRight]
@@ -130,39 +129,20 @@ object FormDebug: TFormDebug
WordWrap = True WordWrap = True
OnClick = ButtonCopClick OnClick = ButtonCopClick
end end
object RichEdit: TRichEdit
Left = 546
Top = 170
Width = 270
Height = 153
Anchors = [akTop, akRight]
Font.Charset = DEFAULT_CHARSET
Font.Color = clWhite
Font.Height = -11
Font.Name = 'Arial'
Font.Style = []
HideScrollBars = False
ParentFont = False
PopupMenu = PopupMenuRE
ReadOnly = True
ScrollBars = ssVertical
TabOrder = 6
OnChange = RichEditChange
end
object ButtonRazLog: TButton object ButtonRazLog: TButton
Left = 441 Left = 449
Top = 394 Top = 400
Width = 97 Width = 97
Height = 33 Height = 33
Anchors = [akTop, akRight] Anchors = [akTop, akRight]
Caption = 'Raz Tampon Log <-----' Caption = 'Raz Tampon Log <-----'
TabOrder = 7 TabOrder = 6
WordWrap = True WordWrap = True
OnClick = ButtonRazLogClick OnClick = ButtonRazLogClick
end end
object GroupBox1: TGroupBox object GroupBox1: TGroupBox
Left = 447 Left = 455
Top = 634 Top = 600
Width = 372 Width = 372
Height = 185 Height = 185
Anchors = [akTop, akRight] Anchors = [akTop, akRight]
@@ -175,7 +155,7 @@ object FormDebug: TFormDebug
Font.Style = [] Font.Style = []
ParentColor = False ParentColor = False
ParentFont = False ParentFont = False
TabOrder = 8 TabOrder = 7
object GroupBox3: TGroupBox object GroupBox3: TGroupBox
Left = 8 Left = 8
Top = 16 Top = 16
@@ -309,8 +289,8 @@ object FormDebug: TFormDebug
end end
end end
object GroupBox2: TGroupBox object GroupBox2: TGroupBox
Left = 439 Left = 447
Top = 14 Top = 20
Width = 380 Width = 380
Height = 149 Height = 149
Anchors = [akTop, akRight] Anchors = [akTop, akRight]
@@ -323,7 +303,7 @@ object FormDebug: TFormDebug
Font.Style = [] Font.Style = []
ParentColor = False ParentColor = False
ParentFont = False ParentFont = False
TabOrder = 9 TabOrder = 8
object CheckAffSig: TCheckBox object CheckAffSig: TCheckBox
Left = 8 Left = 8
Top = 16 Top = 16
@@ -482,20 +462,20 @@ object FormDebug: TFormDebug
end end
object RichDebug: TRichEdit object RichDebug: TRichEdit
Left = 8 Left = 8
Top = 2 Top = 8
Width = 419 Width = 427
Height = 788 Height = 788
Anchors = [akLeft, akTop, akRight] Anchors = [akLeft, akTop, akRight]
Lines.Strings = ( Lines.Strings = (
'RichDebug') 'RichDebug')
PopupMenu = PopupMenuRD PopupMenu = PopupMenuRD
ScrollBars = ssBoth ScrollBars = ssBoth
TabOrder = 10 TabOrder = 9
OnChange = RichDebugChange OnChange = RichDebugChange
end end
object GroupBox5: TGroupBox object GroupBox5: TGroupBox
Left = 447 Left = 455
Top = 522 Top = 488
Width = 372 Width = 372
Height = 57 Height = 57
Anchors = [akTop, akRight] Anchors = [akTop, akRight]
@@ -508,7 +488,7 @@ object FormDebug: TFormDebug
Font.Style = [] Font.Style = []
ParentColor = False ParentColor = False
ParentFont = False ParentFont = False
TabOrder = 11 TabOrder = 10
object EditSimuDet: TEdit object EditSimuDet: TEdit
Left = 16 Left = 16
Top = 24 Top = 24
@@ -561,8 +541,8 @@ object FormDebug: TFormDebug
end end
end end
object ButtonRazTout: TButton object ButtonRazTout: TButton
Left = 442 Left = 450
Top = 170 Top = 176
Width = 97 Width = 97
Height = 25 Height = 25
Hint = Hint =
@@ -572,12 +552,12 @@ object FormDebug: TFormDebug
Caption = 'RAZ tous trains' Caption = 'RAZ tous trains'
ParentShowHint = False ParentShowHint = False
ShowHint = True ShowHint = True
TabOrder = 12 TabOrder = 11
OnClick = ButtonRazToutClick OnClick = ButtonRazToutClick
end end
object GroupBox6: TGroupBox object GroupBox6: TGroupBox
Left = 446 Left = 454
Top = 586 Top = 552
Width = 373 Width = 373
Height = 41 Height = 41
Anchors = [akTop, akRight] Anchors = [akTop, akRight]
@@ -590,7 +570,7 @@ object FormDebug: TFormDebug
Font.Style = [] Font.Style = []
ParentColor = False ParentColor = False
ParentFont = False ParentFont = False
TabOrder = 13 TabOrder = 12
object Label3: TLabel object Label3: TLabel
Left = 16 Left = 16
Top = 16 Top = 16
@@ -653,14 +633,15 @@ object FormDebug: TFormDebug
end end
end end
object MemoEvtDet: TRichEdit object MemoEvtDet: TRichEdit
Left = 548 Left = 556
Top = 330 Top = 174
Width = 265 Width = 265
Height = 185 Height = 307
Anchors = [akTop, akRight] Anchors = [akTop, akRight]
Color = clBlack Color = clBlack
ScrollBars = ssVertical ScrollBars = ssVertical
TabOrder = 14 TabOrder = 13
OnChange = MemoEvtDetChange
end end
object SaveDialog: TSaveDialog object SaveDialog: TSaveDialog
Left = 768 Left = 768
@@ -671,7 +652,6 @@ object FormDebug: TFormDebug
Top = 432 Top = 432
object copier1: TMenuItem object copier1: TMenuItem
Caption = 'copier' Caption = 'copier'
OnClick = copier1Click
end end
end end
object PopupMenuRD: TPopupMenu object PopupMenuRD: TPopupMenu
+21 -37
View File
@@ -17,7 +17,6 @@ type
ButtonCherche: TButton; ButtonCherche: TButton;
ButtonAffEvtChrono: TButton; ButtonAffEvtChrono: TButton;
ButtonCop: TButton; ButtonCop: TButton;
RichEdit: TRichEdit;
PopupMenuRE: TPopupMenu; PopupMenuRE: TPopupMenu;
copier1: TMenuItem; copier1: TMenuItem;
ButtonRazLog: TButton; ButtonRazLog: TButton;
@@ -73,7 +72,6 @@ type
procedure CheckBoxTraceLIsteClick(Sender: TObject); procedure CheckBoxTraceLIsteClick(Sender: TObject);
procedure CheckTrameClick(Sender: TObject); procedure CheckTrameClick(Sender: TObject);
procedure ButtonCopClick(Sender: TObject); procedure ButtonCopClick(Sender: TObject);
procedure copier1Click(Sender: TObject);
procedure ButtonRazLogClick(Sender: TObject); procedure ButtonRazLogClick(Sender: TObject);
procedure CheckBoxEvtDetAigClick(Sender: TObject); procedure CheckBoxEvtDetAigClick(Sender: TObject);
procedure CheckBoxAffFDClick(Sender: TObject); procedure CheckBoxAffFDClick(Sender: TObject);
@@ -88,7 +86,6 @@ type
procedure ButtonSimuDet0Click(Sender: TObject); procedure ButtonSimuDet0Click(Sender: TObject);
procedure ButtonSimuDet1Click(Sender: TObject); procedure ButtonSimuDet1Click(Sender: TObject);
procedure ButtonRazToutClick(Sender: TObject); procedure ButtonRazToutClick(Sender: TObject);
procedure RichEditChange(Sender: TObject);
procedure MemoEvtDet1Change(Sender: TObject); procedure MemoEvtDet1Change(Sender: TObject);
procedure EditDebugSignalChange(Sender: TObject); procedure EditDebugSignalChange(Sender: TObject);
procedure CheckBoxTiersClick(Sender: TObject); procedure CheckBoxTiersClick(Sender: TObject);
@@ -101,6 +98,7 @@ type
procedure Button0Click(Sender: TObject); procedure Button0Click(Sender: TObject);
procedure FormKeyPress(Sender: TObject; var Key: Char); procedure FormKeyPress(Sender: TObject; var Key: Char);
procedure FormActivate(Sender: TObject); procedure FormActivate(Sender: TObject);
procedure MemoEvtDetChange(Sender: TObject);
private private
{ Déclarations privées } { Déclarations privées }
public public
@@ -115,8 +113,6 @@ var
N_Event_tick : integer ; // dernier index N_Event_tick : integer ; // dernier index
procedure AfficheDebug(s : string;lacouleur : TColor); procedure AfficheDebug(s : string;lacouleur : TColor);
procedure AfficheDebug_suivi(s : string;lacouleur : TColor); procedure AfficheDebug_suivi(s : string;lacouleur : TColor);
procedure RE_ColorLine(ARichEdit: TRichEdit; ARow: Integer; AColor: TColor); procedure RE_ColorLine(ARichEdit: TRichEdit; ARow: Integer; AColor: TColor);
@@ -139,15 +135,6 @@ begin
end; end;
end; end;
procedure AfficheDebug(s : string;lacouleur : TColor);
begin
if debugAffiche then
with FormDebug.RichDebug do
begin
Lines.add(s);
RE_ColorLine(FormDebug.RichDebug,FormDebug.RichDebug.lines.count-1,lacouleur);
end;
end;
procedure affiche_evt(s: string;lacouleur : TColor); procedure affiche_evt(s: string;lacouleur : TColor);
begin begin
@@ -159,6 +146,16 @@ begin
end; end;
end; end;
procedure AfficheDebug(s : string;lacouleur : TColor);
begin
if debugAffiche then
with FormDebug.RichDebug do
begin
Lines.add(s);
RE_ColorLine(FormDebug.RichDebug,FormDebug.RichDebug.lines.count-1,lacouleur);
end;
end;
procedure AfficheDebug_suivi(s : string;lacouleur : TColor); procedure AfficheDebug_suivi(s : string;lacouleur : TColor);
var i : integer; var i : integer;
begin begin
@@ -177,19 +174,12 @@ var s: string;
begin begin
if affevt then affiche('FormDebug create',clLime); if affevt then affiche('FormDebug create',clLime);
EditNivDebug.Text:='0'; EditNivDebug.Text:='0';
s:='Cette fenêtre permet d''afficher des informations sur le ';
s:=s+'comportement du programme. Positionner le niveau du débug de 1 à 3 pour';
s:=s+' afficher des informations plus ou moins détaillées.';
RichEdit.Lines.add(s);
RichDebug.WordWrap:=false; // interdit la coupure des chaînes en limite du composant RichDebug.WordWrap:=false; // interdit la coupure des chaînes en limite du composant
RichDebug.color:=$33; RichDebug.color:=$33;
initform:=false; initform:=false;
RichDebug.clear; RichDebug.clear;
s:=DateToStr(date)+' '+TimeToStr(Time)+' '; s:=DateToStr(date)+' '+TimeToStr(Time)+' ';
if IsWow64Process then s:=s+' OS 64 Bits' else s:=s+' OS 32 Bits'; Autoscroll:=true; // permet l'affichage de l'ascenseur dans radstudio
RichEdit.color:=$111122;
RichDebug.Lines.add(s);
Autoscroll:=true; // permet l'affichage de l'ascenseur
DebugAffiche:=true; DebugAffiche:=true;
end; end;
@@ -325,13 +315,6 @@ begin
RichDebug.Lines:=Formprinc.FenRich.lines; RichDebug.Lines:=Formprinc.FenRich.lines;
end; end;
procedure TFormDebug.copier1Click(Sender: TObject);
begin
RichEdit.SelectAll;
RichEdit.CopyToClipboard;
RichEdit.SetFocus;
end;
procedure TFormDebug.ButtonRazLogClick(Sender: TObject); procedure TFormDebug.ButtonRazLogClick(Sender: TObject);
begin begin
RichDebug.Clear; RichDebug.Clear;
@@ -408,12 +391,13 @@ end;
procedure TFormDebug.Button2Click(Sender: TObject); procedure TFormDebug.Button2Click(Sender: TObject);
var Adr,erreur,ancdebug,trainreseve : integer ; var Adr,erreur,ancdebug,trainreseve : integer ;
reservetraintiers : boolean;
begin begin
Val(EditSigSuiv.Text,Adr,erreur); if erreur<>0 then exit; Val(EditSigSuiv.Text,Adr,erreur); if erreur<>0 then exit;
ancdebug:=NivDebug; ancdebug:=NivDebug;
NivDebug:=3; NivDebug:=3;
Cond_Carre(Adr); Cond_Carre(Adr);
carre_signal(adr,trainreseve); carre_signal(adr,0,reservetraintiers);
NivDebug:=AncDebug; NivDebug:=AncDebug;
end; end;
@@ -463,11 +447,6 @@ begin
Raz_tout; Raz_tout;
end; end;
procedure TFormDebug.RichEditChange(Sender: TObject);
begin
SendMessage(RichEdit.handle, WM_VSCROLL, SB_BOTTOM, 0);
end;
procedure TFormDebug.MemoEvtDet1Change(Sender: TObject); procedure TFormDebug.MemoEvtDet1Change(Sender: TObject);
begin begin
SendMessage(MemoEvtDet.handle, WM_VSCROLL, SB_BOTTOM, 0); SendMessage(MemoEvtDet.handle, WM_VSCROLL, SB_BOTTOM, 0);
@@ -556,7 +535,7 @@ begin
end; end;
// pilotage par USB ou par éthernet de la centrale ------------ // pilotage par USB ou par éthernet de la centrale ------------
if (hors_tension2=false) and (portCommOuvert or parSocketLenz) then if (hors_tension=false) and (portCommOuvert or parSocketLenz) then
begin begin
groupe:=(adr-1) div 4; groupe:=(adr-1) div 4;
fonction:=((adr-1) mod 4)*2 + (sortie-1); fonction:=((adr-1) mod 4)*2 + (sortie-1);
@@ -598,7 +577,7 @@ begin
end; end;
// pilotage par USB ou par éthernet de la centrale ------------ // pilotage par USB ou par éthernet de la centrale ------------
if (hors_tension2=false) and (portCommOuvert or parSocketLenz) then if (hors_tension=false) and (portCommOuvert or parSocketLenz) then
begin begin
groupe:=(adr-1) div 4; groupe:=(adr-1) div 4;
fonction:=((adr-1) mod 4)*2 + (sortie-1); fonction:=((adr-1) mod 4)*2 + (sortie-1);
@@ -622,4 +601,9 @@ begin
formDebug.buttonCP.Caption:='Etat '+intToSTR(Nb_cantons_Sig)+' cantons précédents signal'; formDebug.buttonCP.Caption:='Etat '+intToSTR(Nb_cantons_Sig)+' cantons précédents signal';
end; end;
procedure TFormDebug.MemoEvtDetChange(Sender: TObject);
begin
SendMessage(MemoEvtDet.handle,WM_VSCROLL,SB_BOTTOM,0);
end;
end. end.
BIN
View File
Binary file not shown.
+172 -49
View File
@@ -1,6 +1,6 @@
object FormPrinc: TFormPrinc object FormPrinc: TFormPrinc
Left = 35 Left = 64
Top = 192 Top = 110
Width = 1213 Width = 1213
Height = 670 Height = 670
Caption = 'Client TCP-IP CDM Rail ou USB - syst'#232'me LENZ' Caption = 'Client TCP-IP CDM Rail ou USB - syst'#232'me LENZ'
@@ -14,12 +14,11 @@ object FormPrinc: TFormPrinc
OldCreateOrder = False OldCreateOrder = False
Position = poScreenCenter Position = poScreenCenter
Scaled = False Scaled = False
ShowHint = True
OnClose = FormClose OnClose = FormClose
OnCreate = FormCreate OnCreate = FormCreate
DesignSize = ( DesignSize = (
1197 1205
612) 619)
PixelsPerInch = 96 PixelsPerInch = 96
TextHeight = 13 TextHeight = 13
object LabelTitre: TLabel object LabelTitre: TLabel
@@ -895,7 +894,7 @@ object FormPrinc: TFormPrinc
end end
object Image4Dir: TImage object Image4Dir: TImage
Left = 1064 Left = 1064
Top = 136 Top = 120
Width = 57 Width = 57
Height = 25 Height = 25
Picture.Data = { Picture.Data = {
@@ -1205,13 +1204,13 @@ object FormPrinc: TFormPrinc
Left = 632 Left = 632
Top = 192 Top = 192
Width = 546 Width = 546
Height = 391 Height = 399
HorzScrollBar.Smooth = True HorzScrollBar.Smooth = True
HorzScrollBar.Tracking = True HorzScrollBar.Tracking = True
VertScrollBar.Smooth = True VertScrollBar.Smooth = True
VertScrollBar.Tracking = True VertScrollBar.Tracking = True
Anchors = [akTop, akRight, akBottom] Anchors = [akTop, akRight, akBottom]
Color = clWhite Color = clSilver
ParentColor = False ParentColor = False
TabOrder = 0 TabOrder = 0
end end
@@ -1264,8 +1263,8 @@ object FormPrinc: TFormPrinc
end end
object StatusBar1: TStatusBar object StatusBar1: TStatusBar
Left = 0 Left = 0
Top = 590 Top = 597
Width = 1197 Width = 1205
Height = 22 Height = 22
Panels = <> Panels = <>
SimplePanel = True SimplePanel = True
@@ -1284,9 +1283,29 @@ object FormPrinc: TFormPrinc
Left = 904 Left = 904
Top = 5 Top = 5
Width = 282 Width = 282
Height = 92 Height = 108
Anchors = [akTop, akRight] Anchors = [akTop, akRight]
TabOrder = 4 TabOrder = 4
object Label1: TLabel
Left = 136
Top = 88
Width = 89
Height = 13
Caption = 'Nombre de trains : '
end
object LabelNbTrains: TLabel
Left = 256
Top = 84
Width = 9
Height = 19
Caption = '0'
Font.Charset = ANSI_CHARSET
Font.Color = clBlack
Font.Height = -16
Font.Name = 'Arial'
Font.Style = [fsBold]
ParentFont = False
end
object BoutonRaf: TButton object BoutonRaf: TButton
Left = 8 Left = 8
Top = 8 Top = 8
@@ -1353,34 +1372,6 @@ object FormPrinc: TFormPrinc
OnClick = BoutonRazTrainsClick OnClick = BoutonRazTrainsClick
end end
end end
object Panel2: TPanel
Left = 905
Top = 104
Width = 281
Height = 25
Anchors = [akTop, akRight]
TabOrder = 5
object Label1: TLabel
Left = 16
Top = 4
Width = 89
Height = 13
Caption = 'Nombre de trains : '
end
object LabelNbTrains: TLabel
Left = 248
Top = 2
Width = 9
Height = 19
Caption = '0'
Font.Charset = ANSI_CHARSET
Font.Color = clBlack
Font.Height = -16
Font.Name = 'Arial'
Font.Style = [fsBold]
ParentFont = False
end
end
object StaticText: TStaticText object StaticText: TStaticText
Left = 16 Left = 16
Top = 567 Top = 567
@@ -1388,7 +1379,7 @@ object FormPrinc: TFormPrinc
Height = 17 Height = 17
Anchors = [akLeft, akBottom] Anchors = [akLeft, akBottom]
Caption = 'xx' Caption = 'xx'
TabOrder = 6 TabOrder = 5
end end
object FenRich: TRichEdit object FenRich: TRichEdit
Left = 8 Left = 8
@@ -1406,7 +1397,7 @@ object FormPrinc: TFormPrinc
PopupMenu = PopupMenuFenRich PopupMenu = PopupMenuFenRich
ReadOnly = True ReadOnly = True
ScrollBars = ssBoth ScrollBars = ssBoth
TabOrder = 7 TabOrder = 6
WordWrap = False WordWrap = False
OnChange = FenRichChange OnChange = FenRichChange
OnMouseDown = FenRichMouseDown OnMouseDown = FenRichMouseDown
@@ -1418,7 +1409,7 @@ object FormPrinc: TFormPrinc
Height = 105 Height = 105
Anchors = [akTop, akRight] Anchors = [akTop, akRight]
Caption = 'Variables CV' Caption = 'Variables CV'
TabOrder = 8 TabOrder = 7
object Label3: TLabel object Label3: TLabel
Left = 208 Left = 208
Top = 34 Top = 34
@@ -1480,7 +1471,7 @@ object FormPrinc: TFormPrinc
Height = 129 Height = 129
Anchors = [akTop, akRight] Anchors = [akTop, akRight]
Caption = 'Commande aux trains' Caption = 'Commande aux trains'
TabOrder = 9 TabOrder = 8
object Label4: TLabel object Label4: TLabel
Left = 8 Left = 8
Top = 22 Top = 22
@@ -1509,6 +1500,132 @@ object FormPrinc: TFormPrinc
Height = 13 Height = 13
Caption = #224' ' Caption = #224' '
end end
object SBMarcheArretLoco: TSpeedButton
Left = 96
Top = 88
Width = 73
Height = 33
Hint = 'Arr'#234't de tous les trains'
Glyph.Data = {
020E0000424D020E000000000000360400002800000049000000210000000100
080000000000CC090000C40E0000C40E00000001000000000000000000000000
80000080000000808000800000008000800080800000C0C0C000C0DCC000F0CA
A6000020400000206000002080000020A0000020C0000020E000004000000040
20000040400000406000004080000040A0000040C0000040E000006000000060
20000060400000606000006080000060A0000060C0000060E000008000000080
20000080400000806000008080000080A0000080C0000080E00000A0000000A0
200000A0400000A0600000A0800000A0A00000A0C00000A0E00000C0000000C0
200000C0400000C0600000C0800000C0A00000C0C00000C0E00000E0000000E0
200000E0400000E0600000E0800000E0A00000E0C00000E0E000400000004000
20004000400040006000400080004000A0004000C0004000E000402000004020
20004020400040206000402080004020A0004020C0004020E000404000004040
20004040400040406000404080004040A0004040C0004040E000406000004060
20004060400040606000406080004060A0004060C0004060E000408000004080
20004080400040806000408080004080A0004080C0004080E00040A0000040A0
200040A0400040A0600040A0800040A0A00040A0C00040A0E00040C0000040C0
200040C0400040C0600040C0800040C0A00040C0C00040C0E00040E0000040E0
200040E0400040E0600040E0800040E0A00040E0C00040E0E000800000008000
20008000400080006000800080008000A0008000C0008000E000802000008020
20008020400080206000802080008020A0008020C0008020E000804000008040
20008040400080406000804080008040A0008040C0008040E000806000008060
20008060400080606000806080008060A0008060C0008060E000808000008080
20008080400080806000808080008080A0008080C0008080E00080A0000080A0
200080A0400080A0600080A0800080A0A00080A0C00080A0E00080C0000080C0
200080C0400080C0600080C0800080C0A00080C0C00080C0E00080E0000080E0
200080E0400080E0600080E0800080E0A00080E0C00080E0E000C0000000C000
2000C0004000C0006000C0008000C000A000C000C000C000E000C0200000C020
2000C0204000C0206000C0208000C020A000C020C000C020E000C0400000C040
2000C0404000C0406000C0408000C040A000C040C000C040E000C0600000C060
2000C0604000C0606000C0608000C060A000C060C000C060E000C0800000C080
2000C0804000C0806000C0808000C080A000C080C000C080E000C0A00000C0A0
2000C0A04000C0A06000C0A08000C0A0A000C0A0C000C0A0E000C0C00000C0C0
2000C0C04000C0C06000C0C08000C0C0A000F0FBFF00A4A0A000808080000000
FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF00F60E0E0E0E0E
0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E
0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E
0EFFFF0000000E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E
0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E
0E0E0E0E0E0E0E0E0E0E0E0E0E0EFF0000000E0E0E0E0E0E0E0E0E0E0E0E0E0E
0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E
0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0EAF0000000E0E
0E0E0E0E0E0E0E0E0E0E5FAFAFA70E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E
0E0E0E0E0E0E0E5FAFAFA70E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E
0E0E0E0E0E0EAF0000000E0E0E0E0E0E0E0E0E0E5FFFFFFFFFFFFFAF0E0E0E0E
0E0E0E0E0EFFFF560E0E0E0E0E0E0E0E0E0EFFFFFFFFFFFFA70E0E0E0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0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E
0E0EF6000000}
Layout = blGlyphBottom
ParentShowHint = False
ShowHint = True
Visible = False
OnClick = SBMarcheArretLocoClick
end
object loco: TButton object loco: TButton
Left = 6 Left = 6
Top = 88 Top = 88
@@ -1587,27 +1704,29 @@ object FormPrinc: TFormPrinc
Top = 144 Top = 144
Width = 113 Width = 113
Height = 33 Height = 33
Anchors = [akTop, akRight]
Caption = 'Envoi vers centrale DCC++' Caption = 'Envoi vers centrale DCC++'
TabOrder = 10 TabOrder = 9
WordWrap = True WordWrap = True
OnClick = ButtonEnvClick OnClick = ButtonEnvClick
end end
object EditEnvoi: TEdit object EditEnvoi: TEdit
Left = 928 Left = 936
Top = 152 Top = 152
Width = 121 Width = 121
Height = 21 Height = 21
TabOrder = 11 Anchors = [akTop, akRight]
TabOrder = 10
Text = '<1>' Text = '<1>'
end end
object Button1: TButton object Button1: TButton
Left = 960 Left = 936
Top = 120 Top = 120
Width = 75 Width = 75
Height = 25 Height = 25
Anchors = [akTop, akRight]
Caption = 'Button1' Caption = 'Button1'
TabOrder = 12 TabOrder = 11
Visible = False
OnClick = Button1Click OnClick = Button1Click
end end
object Timer1: TTimer object Timer1: TTimer
@@ -1795,6 +1914,10 @@ object FormPrinc: TFormPrinc
Caption = 'Placer les trains' Caption = 'Placer les trains'
OnClick = Placerlestrains1Click OnClick = Placerlestrains1Click
end end
object RazResa: TMenuItem
Caption = 'Mise '#224' z'#233'ro des r'#233'servations des aiguillages'
OnClick = RazResaClick
end
end end
end end
object ClientSocketCDM: TClientSocket object ClientSocketCDM: TClientSocket
+1492 -1429
View File
File diff suppressed because it is too large Load Diff
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
+2
View File
@@ -118,6 +118,8 @@ begin
closeFile(fte); closeFile(fte);
formprinc.ButtonArretSimu.Visible:=true; formprinc.ButtonArretSimu.Visible:=true;
i_simule:=1; i_simule:=1;
SauvefiltrageDet0:=filtrageDet0;
filtrageDet0:=0;
FormSimulation.Close; FormSimulation.Close;
Affiche('Fichier simulation : '+Nomfichier ,clyellow); Affiche('Fichier simulation : '+Nomfichier ,clyellow);
end; end;
BIN
View File
Binary file not shown.
+23 -14
View File
@@ -311,7 +311,7 @@ type
end; end;
const const
ZoomMax=50;ZoomMin=20; ZoomMax=50;ZoomMin=15;
MaxCellX=150;MaxCellY=70; MaxCellX=150;MaxCellY=70;
ClFond_ch='CoulFond'; ClFond_ch='CoulFond';
clVoies_ch='CoulVoies'; clVoies_ch='CoulVoies';
@@ -328,16 +328,16 @@ const
type type
// structure du TCO // structure du TCO
TTCO = array[1..MaxCellX] of array[1..MaxCellY] of record TTCO = array[1..MaxCellX,1..MaxCellY] of record
Adresse : integer ; // adresse du détecteur ou de l'aiguillage ou du feu Adresse : integer ; // adresse du détecteur ou de l'aiguillage ou du feu
BImage : integer ; // 0=rien 1=voie 2=aiguillage gauche gauche ... 30=feu BImage : integer ; // 0=rien 1=voie 2=aiguillage gauche gauche ... 30=feu
mode : integer; // couleur de voie 0=éteint 1=ClVoies 2=couleur en fonction du train mode : integer; // couleur de voie 0=éteint 1=ClVoies 2=couleur en fonction du train
trajet : integer; // décrit le trajet ouvert sur la voie (cas d'un croisement ou d'ue tjd/S) trajet : integer; // décrit le trajet ouvert sur la voie (cas d'un croisement ou d'ue tjd/S)
inverse : boolean; // aiguillage piloté inversé inverse : boolean; // aiguillage piloté inversé
repr : integer; // position de la représentation texte 0 = rien 1=centrale 2=Haut 3=Bas repr : integer; // position de la représentation texte 0 = rien 1=centrale 2=Haut 3=Bas
Texte : string[30]; // texte de la cellule Texte : string; // texte de la cellule
Fonte : string[30]; // fonte du texte Fonte : string; // fonte du texte
FontStyle : string[4]; // GSIB (Gras Souligné Italique Barré) FontStyle : string; // GSIB (Gras Souligné Italique Barré)
coulFonte : Tcolor; coulFonte : Tcolor;
TailleFonte : integer; TailleFonte : integer;
Couleur : Tcolor; // couleur non utilisée Couleur : Tcolor; // couleur non utilisée
@@ -351,7 +351,7 @@ var
clAllume,clVoies,Fond,couleurAdresse,clGrille,cltexte,clQuai,CoulFonte,ClCanton : Tcolor; clAllume,clVoies,Fond,couleurAdresse,clGrille,cltexte,clQuai,CoulFonte,ClCanton : Tcolor;
FormTCO: TFormTCO; FormTCO: TFormTCO;
Forminit,sourisclic,SelectionAffichee,TamponAffecte,entoure,Diffusion,TCO_modifie, Forminit,sourisclic,SelectionAffichee,TamponAffecte,entoure,Diffusion,TCO_modifie,
piloteAig,BandeauMasque,eval_format,TCOouvert : boolean; clicTCO,piloteAig,BandeauMasque,eval_format,TCOouvert : boolean;
HtImageTCO,LargImageTCO,XclicCell,YclicCell,XminiSel,YminiSel,XCoupe,Ycoupe,Temposouris, HtImageTCO,LargImageTCO,XclicCell,YclicCell,XminiSel,YminiSel,XCoupe,Ycoupe,Temposouris,
XmaxiSel,YmaxiSel,AncienXMiniSel,AncienXMaxiSel ,AncienYMiniSel,AncienYMaxiSel, XmaxiSel,YmaxiSel,AncienXMiniSel,AncienXMaxiSel ,AncienYMiniSel,AncienYMaxiSel,
Xclic,Yclic,XClicCellInserer,YClicCellInserer,Xentoure,Yentoure,RatioC,ModeCouleurCanton, Xclic,Yclic,XClicCellInserer,YClicCellInserer,Xentoure,Yentoure,RatioC,ModeCouleurCanton,
@@ -3328,17 +3328,18 @@ begin
comborepr.Enabled:=false; comborepr.Enabled:=false;
ImageTCO.Top:=0; ImageTCO.Top:=0;
ImageTCO.Left:=0; ImageTCO.Left:=0;
//controlStyle:=controlStyle+[csOpaque]; //controlStyle:=controlStyle+[csOpaque];
end; end;
// clic gauche sur image // clic gauche sur TCO
procedure TFormTCO.ImageTCOClick(Sender: TObject); procedure TFormTCO.ImageTCOClick(Sender: TObject);
var Position: TPoint; var Position: TPoint;
Bimage : integer; Bimage : integer;
s : string; s : string;
begin begin
//Affiche('Clic gauche',clLime); if affevt then Affiche('TCO ImageTCOClic',clLime);
clicTCO:=true;
GetCursorPos(Position); GetCursorPos(Position);
{ {
Menuitem:=TmenuItem.Create(popupMenu1); Menuitem:=TmenuItem.Create(popupMenu1);
@@ -3361,7 +3362,7 @@ begin
if (bimage=2) or (bimage=3) or (bimage=4) or (bimage=5) or (bimage=12) or (bimage=13) if (bimage=2) or (bimage=3) or (bimage=4) or (bimage=5) or (bimage=12) or (bimage=13)
or (bimage=14) or (bimage=15) then or (bimage=14) or (bimage=15) then
begin begin
// aiguillage inversé
with FormConfCellTCO.CheckPinv do with FormConfCellTCO.CheckPinv do
begin begin
enabled:=true; enabled:=true;
@@ -3376,6 +3377,7 @@ begin
FormConfCellTCO.checkPinv.enabled:=false; FormConfCellTCO.checkPinv.enabled:=false;
end; end;
// si voie ou rien ou signal ou quai
if (Bimage=1) or (Bimage=0) or (Bimage=23) then if (Bimage=1) or (Bimage=0) or (Bimage=23) then
begin begin
s:=Tco[XClicCell,YClicCell].Texte; s:=Tco[XClicCell,YClicCell].Texte;
@@ -3399,8 +3401,8 @@ begin
ComboRepr.ItemIndex:=tco[XClicCell,yClicCell].repr; ComboRepr.ItemIndex:=tco[XClicCell,yClicCell].repr;
if not(selectionaffichee) then _entoure_cell_clic; if not(selectionaffichee) then _entoure_cell_clic;
actualise; actualise;
clicTCO:=false;
end; end;
// trouve le détecteur det dans le TCO et renvoie X et Y // trouve le détecteur det dans le TCO et renvoie X et Y
@@ -4669,7 +4671,7 @@ begin
// ImageTCO.BeginDrag(true); // ImageTCO.BeginDrag(true);
if button=mbLeft then if button=mbLeft then
begin begin
//Affiche('Souris clic enfoncée',clLime); if affEvt then Affiche('TCO Souris clicG enfoncée',clLime);
Temposouris:=0; Temposouris:=0;
xMiniSel:=99999;yMiniSel:=99999; xMiniSel:=99999;yMiniSel:=99999;
xMaxiSel:=0;yMaxiSel:=0; xMaxiSel:=0;yMaxiSel:=0;
@@ -4691,6 +4693,7 @@ begin
if button=mbRight then if button=mbRight then
begin begin
if affEvt then Affiche('TCO Souris clicG enfoncée',clLime);
GetCursorPos(Position); GetCursorPos(Position);
Position:=ImageTCO.screenToCLient(Position); Position:=ImageTCO.screenToCLient(Position);
Xclic:=position.X; Xclic:=position.X;
@@ -4816,7 +4819,7 @@ procedure TFormTCO.EditAdrElementChange(Sender: TObject);
var Adr,erreur,index : integer; var Adr,erreur,index : integer;
begin begin
//Affiche('Chgt adresse',clyellow); //Affiche('Chgt adresse',clyellow);
if clicTCO then exit;
Val(EditAdrElement.Text,Adr,erreur); Val(EditAdrElement.Text,Adr,erreur);
if (erreur<>0) or (Adr<0) or (Adr>2048) then Adr:=0; if (erreur<>0) or (Adr<0) or (Adr>2048) then Adr:=0;
@@ -4853,6 +4856,7 @@ end;
procedure TFormTCO.EditTypeImageKeyPress(Sender: TObject; var Key: Char); procedure TFormTCO.EditTypeImageKeyPress(Sender: TObject; var Key: Char);
var Bimage,erreur : integer; var Bimage,erreur : integer;
begin begin
if affevt then Affiche('TCC evt editTypeImageKeyPress',clorange);
if actualize then exit; if actualize then exit;
if ord(Key)=VK_RETURN then if ord(Key)=VK_RETURN then
begin begin
@@ -5144,6 +5148,8 @@ end;
procedure TFormTCO.EditTexteChange(Sender: TObject); procedure TFormTCO.EditTexteChange(Sender: TObject);
begin begin
if clicTCO then exit;
if affevt then Affiche('TCO.EditTextChange',clOrange);
PCanvasTCO.Brush.Color:=fond; PCanvasTCO.Brush.Color:=fond;
efface_entoure; efface_entoure;
if Tco[XClicCell,YClicCell].texte='' then if Tco[XClicCell,YClicCell].texte='' then
@@ -5153,7 +5159,7 @@ begin
end; end;
Tco[XClicCell,YClicCell].Texte:=EditTexte.Text; Tco[XClicCell,YClicCell].Texte:=EditTexte.Text;
formConfCellTCO.EditTexte.Text:=EditTexte.Text; formConfCellTCO.EditTexteCCTCO.Text:=EditTexte.Text;
TCO_modifie:=true; TCO_modifie:=true;
affiche_texte(XClicCell,YClicCell); affiche_texte(XClicCell,YClicCell);
end; end;
@@ -5186,6 +5192,7 @@ end;
procedure TFormTCO.CheckPinvClick(Sender: TObject); procedure TFormTCO.CheckPinvClick(Sender: TObject);
var Bimage : integer; var Bimage : integer;
begin begin
if clicTCO then exit;
if actualize then exit; if actualize then exit;
if (xClicCell=0) or (xClicCell>NbreCellX) or (yClicCell=0) or (yClicCell>NbreCelly) then exit; if (xClicCell=0) or (xClicCell>NbreCellX) or (yClicCell=0) or (yClicCell>NbreCelly) then exit;
Bimage:=Tco[xClicCell,yClicCell].Bimage; Bimage:=Tco[xClicCell,yClicCell].Bimage;
@@ -5218,6 +5225,7 @@ procedure TFormTCO.ImageTCODblClick(Sender: TObject);
var Bimage,Adresse,i : integer; var Bimage,Adresse,i : integer;
tjdC : boolean; tjdC : boolean;
begin begin
//Affiche('Double clic',clred);
Bimage:=Tco[xClicCell,yClicCell].BImage; Bimage:=Tco[xClicCell,yClicCell].BImage;
Adresse:=TCO[xClicCell,yClicCell].Adresse; Adresse:=TCO[xClicCell,yClicCell].Adresse;
if adresse=0 then exit; if adresse=0 then exit;
@@ -5293,6 +5301,7 @@ end;
procedure TFormTCO.ComboReprChange(Sender: TObject); procedure TFormTCO.ComboReprChange(Sender: TObject);
begin begin
if clicTCO then exit;
tco[XClicCell,YClicCell].Repr:=comborepr.ItemIndex; tco[XClicCell,YClicCell].Repr:=comborepr.ItemIndex;
efface_entoure; efface_entoure;
SelectionAffichee:=false; SelectionAffichee:=false;
BIN
View File
Binary file not shown.
+1
View File
@@ -14,6 +14,7 @@ object FormPlace: TFormPlace
KeyPreview = True KeyPreview = True
OldCreateOrder = False OldCreateOrder = False
OnActivate = FormActivate OnActivate = FormActivate
OnCreate = FormCreate
OnKeyPress = FormKeyPress OnKeyPress = FormKeyPress
PixelsPerInch = 96 PixelsPerInch = 96
TextHeight = 13 TextHeight = 13
+27 -5
View File
@@ -3,7 +3,7 @@ interface
uses uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, unitprinc; Dialogs, StdCtrls, unitprinc, unitpilote;
type type
TFormPlace = class(TForm) TFormPlace = class(TForm)
@@ -71,6 +71,7 @@ type
procedure EditDir4Change(Sender: TObject); procedure EditDir4Change(Sender: TObject);
procedure EditDir5Change(Sender: TObject); procedure EditDir5Change(Sender: TObject);
procedure EditDir6Change(Sender: TObject); procedure EditDir6Change(Sender: TObject);
procedure FormCreate(Sender: TObject);
private private
{ Déclarations privées } { Déclarations privées }
public public
@@ -380,8 +381,8 @@ begin
end; end;
procedure TFormPlace.ButtonLanceRoutageClick(Sender: TObject); procedure TFormPlace.ButtonLanceRoutageClick(Sender: TObject);
var i,j,adrDet,AdrTrain : integer; var a,i,j,id,adrDet,AdrTrain,AdrFeu : integer;
trouve : boolean; trouve,rouge : boolean;
begin begin
if cdm_connecte then if cdm_connecte then
begin begin
@@ -395,21 +396,37 @@ begin
adrDet:=Adresse_detecteur[i]; adrDet:=Adresse_detecteur[i];
if Detecteur[adrDet].etat and (detecteur[adrDet].train<>'') then if Detecteur[adrDet].etat and (detecteur[adrDet].train<>'') then
begin begin
Affiche('Lancement du train '+detecteur[adrDet].train+' depuis détecteur '+intToSTR(adrDet),clYellow); rouge:=false;
AdrTrain:=detecteur[AdrDet].AdrTrain; AdrTrain:=detecteur[AdrDet].AdrTrain;
AdrFeu:=signal_detecteur(AdrDet); // trouve l'adresse du feu correspondant au détecteur
if adrFeu<>0 then
begin
id:=index_feu(AdrFeu);
a:=feux[id].EtatSignal;
if ((a=semaphore_F) or (a=carre_F) or (a=violet_F)) then rouge:=true;
end;
if not(rouge) then
begin
j:=index_train_adresse(AdrTrain); j:=index_train_adresse(AdrTrain);
vitesse_loco('',adrTrain,trains[j].VitNominale,not(placement[j].inverse)); vitesse_loco('',adrTrain,trains[j].VitNominale,not(placement[j].inverse));
trouve:=true; trouve:=true;
roulage:=true; roulage:=true;
maj_feux; maj_feux;
Affiche('Lancement du train '+detecteur[adrDet].train+' depuis détecteur '+intToSTR(adrDet),clYellow);
reserve_canton(AdrDet,placement[j].detdir,adrtrain); reserve_canton(AdrDet,placement[j].detdir,adrtrain);
end
Else Affiche('Le signal '+intToSTR(AdrFeu)+' étant rouge, le train '+detecteur[adrDet].train+' @'+intToSTR(AdrTrain)+' ne démarre pas',clyellow);
end; end;
end; end;
if trouve then if trouve then
begin begin
Maj_feux; Maj_feux;
Formprinc.LabelTitre.caption:=titre+' - Mode roulage en cours'; Formprinc.LabelTitre.caption:=titre+' - Mode roulage en cours';
with Formprinc.SBMarcheArretLoco do
begin
Visible:=true;
end;
end; end;
if not(trouve) then Affiche('Pas de train placé',clOrange); if not(trouve) then Affiche('Pas de train placé',clOrange);
end; end;
@@ -540,4 +557,9 @@ begin
placement[6].detdir:=i; placement[6].detdir:=i;
end; end;
procedure TFormPlace.FormCreate(Sender: TObject);
begin
PlaceAffiche:=true;
end;
end. end.
BIN
View File
Binary file not shown.
+1 -1
View File
@@ -23,7 +23,7 @@ var
Lance_verif : integer; Lance_verif : integer;
verifVersion,notificationVersion : boolean; verifVersion,notificationVersion : boolean;
Const Version='5.3'; // sert à la comparaison de la version publiée Const Version='5.4'; // 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
+6 -2
View File
@@ -137,8 +137,12 @@ version 5.2 : Nouvel algorithme pour le d
version 5.3 : Informations sur les états des signaux par clic droit sur le signal. version 5.3 : Informations sur les états des signaux par clic droit sur le signal.
Correction éventuelle fenêtre de violation au démarrage. Correction éventuelle fenêtre de violation au démarrage.
Renforcement du suivi des trains: Renforcement du suivi des trains:
(prise en compte des changements d'aiguillages) prise en compte des changements d'aiguillages
(détection simultanée d'un train sur deux détecteurs) détection simultanée d'un train sur deux détecteurs
version 5.4 : Amélioration du mode roulage.
Améliorations diverses.
Filtrage des détecteurs en mode autonome.