This commit is contained in:
f1iwq2
2022-12-15 20:57:45 +01:00
parent b5b43f25a1
commit 13121a1ae5
43 changed files with 18813 additions and 985 deletions
+49 -35
View File
@@ -1,24 +1,26 @@
/ Fichier de configuration de signaux_complexes_GL / Fichier de configuration de signaux_complexes_GL
Fonte=12 Fonte=12
Protocole=2
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
PROTOCOLE_SERIE=COM5:57600,N,8,1,2 MaxCom=30
INTER_CAR=50 Protocole_serie=COMX:115200,N,8,1,0
Inter_car=50
Tempo_maxi=7 Tempo_maxi=7
Entete=1 Entete=0
Init_Aig=0 Init_Aig=0
Init_Dem_Aig=0 Init_Dem_Aig=0
Tempo_Aig=80 Tempo_Aig=200
Init_demUSBCOM=1 Init_demUSBCOM=0
Init_demETH=1 Init_demETH=0
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=1
MasqueBandeauTCO=0 MasqueBandeauTCO=0
CDM=0 CDM=0
Lay= Lay=RESEAU_GILY_SIGNAL_AJOUTE.LAY
Serveur_interface=1 Serveur_interface=1
retro=1 retro=1
RazSignaux=0 RazSignaux=0
@@ -77,39 +79,51 @@ A31,A34,0
0 0
/------------ /------------
[section_sig] [section_sig]
176,7,0,1,(520,A20),1 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
190,7,0,1,(523,526),0 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
204,9,0,1,(527,A7),1 176,7,0,1,(520,A20),0,FVC0,FRC0
218,7,0,1,(525,A17),0 190,7,0,1,(523,526),0,FVC0,FRC0
232,2,1,1,(516,A6),0 204,9,0,1,(527,A7),1,FVC0,FRC0
260,9,1,1,(518,A1),1 218,7,0,1,(525,A17),0,FVC0,FRC0
274,3,0,1,(524,521),0 232,2,1,1,(516,A6),0,FVC0,FRC0
288,7,0,1,(522,A8),1 260,9,1,1,(518,A1),1,FVC0,FRC0
302,9,0,1,(526,A9),1 274,3,0,1,(524,521),0,FVC0,FRC0
316,7,1,1,(515,A5),1 288,7,0,1,(522,A8),1,FVC0,FRC0
330,7,0,1,(519,A2),1 302,9,0,1,(526,A9),1,FVC0,FRC0
344,9,0,1,(528,A10),1 316,7,1,1,(515,A5),1,FVC0,FRC0
358,9,0,1,(517,A18),1 330,7,0,1,(519,A2),1,FVC0,FRC0
344,9,0,1,(528,A10),1,FVC0,FRC0
358,9,0,1,(517,A18),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 392,3,0,1,(535,533),1,FVC0,FRC0
406,9,0,1,(534,A23),1 406,9,0,1,(534,A23),1,FVC0,FRC0
420,7,0,1,(529,A25,530,A27,537,A27),1 420,7,0,1,(529,A25,530,A27,537,A27),1,FVC1,FRC1
448,7,0,1,(533,A24),1 448,7,0,1,(533,A24),1,FVC0,FRC0
462,9,0,1,(513,A29),1 462,9,0,1,(513,A29),1,FVC0,FRC0
476,9,0,1,(538,A23),1 476,9,0,1,(538,A23),1,FVC0,FRC0
497,9,0,4,(531,A19),1 497,9,0,4,(531,A19),1,FVC0,FRC0
600,7,0,0,(521,A8),1 600,7,0,0,(521,A8),1,FVC0,FRC0
1000,9,0,0,(530,A26),1 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)
1001,9,0,0,(529,A26),1,(A21S,A6D)
0 0
/------------ /------------
[section_act] [section_act]
A40,2,,A10,1,S
A91,1,X,F1,100,MONTRAIN
815,1,CC406526,F2,0,TGV 815,1,CC406526,F2,0,TGV
Mem[527,520],1,X,"KLAXON_2.WAV" Mem[527,520],1,X,"KLAXON_2.WAV"
821,1,BB16024,"KLAXON_3.WAV" 821,1,BB16024,"KLAXON_3.WAV"
815,1,TGV,F10,0,TGV 818,1,TGV,A10,1,S
A12,2,X,"KLAXON_3.WAV"
/------------ /------------
(817,830),(820,840),PN(121+,121-) (817,830),(820,840),PN(121,1,121,2),1
(527-519,519-517),(530-531,531-532),PN(122+,122-) (527-519,519-517),(530-531,531-532),PN(122,0,122,1),0
0
/------------
[section_dcc++]
EnvAigDccpp=0
AdrBaseDetDccpp=513
[init_dcc++]
<Y 8 1>
<1>
0 0
+35
View File
@@ -0,0 +1,35 @@
-$A8
-$B-
-$C+
-$D+
-$E-
-$F-
-$G+
-$H+
-$I+
-$J-
-$K-
-$L+
-$M-
-$N+
-$O+
-$P+
-$Q-
-$R-
-$S-
-$T-
-$U-
-$V+
-$W-
-$X+
-$YD
-$Z1
-cg
-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
-H+
-W+
-M
-$M16384,1048576
-K$00400000
-LE"c:\program files (x86)\borland\delphi7\Projects\Bpl"
-LN"c:\program files (x86)\borland\delphi7\Projects\Bpl"
+135
View File
@@ -0,0 +1,135 @@
[FileVersion]
Version=7.0
[Compiler]
A=8
B=0
C=1
D=1
E=0
F=0
G=1
H=1
I=1
J=0
K=0
L=1
M=0
N=1
O=1
P=1
Q=0
R=0
S=0
T=0
U=0
V=1
W=0
X=1
Y=1
Z=1
ShowHints=1
ShowWarnings=1
UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
NamespacePrefix=
SymbolDeprecated=1
SymbolLibrary=1
SymbolPlatform=1
UnitLibrary=1
UnitPlatform=1
UnitDeprecated=1
HResultCompat=1
HidingMember=1
HiddenVirtual=1
Garbage=1
BoundsError=1
ZeroNilCompat=1
StringConstTruncated=1
ForLoopVarVarPar=1
TypedConstVarPar=1
AsgToTypedConst=1
CaseLabelRange=1
ForVariable=1
ConstructingAbstract=1
ComparisonFalse=1
ComparisonTrue=1
ComparingSignedUnsigned=1
CombiningSignedUnsigned=1
UnsupportedConstruct=1
FileOpen=1
FileOpenUnitSrc=1
BadGlobalSymbol=1
DuplicateConstructorDestructor=1
InvalidDirective=1
PackageNoLink=1
PackageThreadVar=1
ImplicitImport=1
HPPEMITIgnored=1
NoRetVal=1
UseBeforeDef=1
ForLoopVarUndef=1
UnitNameMismatch=1
NoCFGFileFound=1
MessageDirective=1
ImplicitVariants=1
UnicodeToLocale=1
LocaleToUnicode=1
ImagebaseMultiple=1
SuspiciousTypecast=1
PrivatePropAccessor=1
UnsafeType=1
UnsafeCode=1
UnsafeCast=1
[Linker]
MapFile=0
OutputObjs=0
ConsoleApp=1
DebugInfo=0
RemoteSymbols=0
MinStackSize=16384
MaxStackSize=1048576
ImageBase=4194304
ExeDescription=
[Directories]
OutputDir=
UnitOutputDir=
PackageDLLOutputDir=
PackageDCPOutputDir=
SearchPath=
Packages=vcl;rtl;vclx;VclSmp;vclshlctrls
Conditionals=
DebugSourceDirs=
UsePackages=0
[Parameters]
RunParams=
HostApplication=
Launcher=
UseLauncher=0
DebugCWD=
[Version Info]
IncludeVerInfo=1
AutoIncBuild=0
MajorVer=1
MinorVer=0
Release=0
Build=5
Debug=0
PreRelease=0
Special=0
Private=0
DLL=0
Locale=1036
CodePage=1252
[Version Info Keys]
CompanyName=
FileDescription=
FileVersion=1.0.0.5
InternalName=
LegalCopyright=
LegalTrademarks=
OriginalFilename=
ProductName=
ProductVersion=1.0.0.0
Comments=
[HistoryLists\hlUnitAliases]
Count=1
Item0=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+36
View File
@@ -0,0 +1,36 @@
program Signaux_complexes_GL;
uses
Forms,
UnitPrinc in 'UnitPrinc.pas' {FormPrinc},
UnitDebug in 'UnitDebug.pas' {FormDebug},
verif_version in 'verif_version.pas' {FormVersion},
UnitPilote in 'UnitPilote.pas' {FormPilote},
UnitSimule in 'UnitSimule.pas' {FormSimulation},
UnitTCO in 'UnitTCO.pas' {FormTCO},
UnitConfig in 'UnitConfig.pas' {FormConfig},
UnitConfigTCO in 'UnitConfigTCO.pas' {FormConfigTCO},
UnitSR in 'UnitSR.pas' {FormSR},
Unit_Pilote_aig in 'Unit_Pilote_aig.pas' {FormAig},
UnitConfigCellTCO in 'UnitConfigCellTCO.pas' {FormConfCellTCO},
UnitCDF in 'UnitCDF.pas' {FormCDF},
Unitplace in 'Unitplace.pas' {FormPlace};
{$R *.res}
begin
Application.Initialize;
Application.CreateForm(TFormPrinc, FormPrinc);
Application.CreateForm(TFormDebug, FormDebug);
Application.CreateForm(TFormPilote, FormPilote);
Application.CreateForm(TFormSimulation, FormSimulation);
Application.CreateForm(TFormConfig, FormConfig);
Application.CreateForm(TFormConfigTCO, FormConfigTCO);
Application.CreateForm(TFormVersion, FormVersion);
Application.CreateForm(TFormSR, FormSR);
Application.CreateForm(TFormAig, FormAig);
Application.CreateForm(TFormConfCellTCO, FormConfCellTCO);
Application.CreateForm(TFormCDF, FormCDF);
Application.CreateForm(TFormPlace, FormPlace);
Application.Run;
end.
Binary file not shown.
+3 -3
View File
@@ -13,8 +13,8 @@ uses
UnitSR in 'UnitSR.pas' {FormSR}, UnitSR in 'UnitSR.pas' {FormSR},
Unit_Pilote_aig in 'Unit_Pilote_aig.pas' {FormAig}, Unit_Pilote_aig in 'Unit_Pilote_aig.pas' {FormAig},
UnitConfigCellTCO in 'UnitConfigCellTCO.pas' {FormConfCellTCO}, UnitConfigCellTCO in 'UnitConfigCellTCO.pas' {FormConfCellTCO},
UnitDigikeijs in 'UnitDigikeijs.pas' {FormDigikeijs}, UnitCDF in 'UnitCDF.pas' {FormCDF},
UnitCDF in 'UnitCDF.pas' {FormCDF}; Unitplace in 'Unitplace.pas' {FormPlace};
{$R *.res} {$R *.res}
@@ -30,7 +30,7 @@ begin
Application.CreateForm(TFormSR, FormSR); Application.CreateForm(TFormSR, FormSR);
Application.CreateForm(TFormAig, FormAig); Application.CreateForm(TFormAig, FormAig);
Application.CreateForm(TFormConfCellTCO, FormConfCellTCO); Application.CreateForm(TFormConfCellTCO, FormConfCellTCO);
Application.CreateForm(TFormDigikeijs, FormDigikeijs);
Application.CreateForm(TFormCDF, FormCDF); Application.CreateForm(TFormCDF, FormCDF);
Application.CreateForm(TFormPlace, FormPlace);
Application.Run; Application.Run;
end. end.
Binary file not shown.
+396
View File
@@ -0,0 +1,396 @@
object FormCDF: TFormCDF
Left = 368
Top = 141
BorderStyle = bsDialog
Caption = 'Configuration du d'#233'codeur CDF'
ClientHeight = 466
ClientWidth = 341
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
OldCreateOrder = False
OnActivate = FormActivate
PixelsPerInch = 96
TextHeight = 13
object Label20: TLabel
Left = 16
Top = 48
Width = 184
Height = 26
Caption =
'Tables d'#39'aspects du signal en fonction du motif envoy'#233' au d'#233'code' +
'ur CDF'
WordWrap = True
end
object Label1: TLabel
Left = 8
Top = 176
Width = 32
Height = 13
Caption = 'Label1'
end
object Label2: TLabel
Left = 8
Top = 200
Width = 32
Height = 13
Caption = 'Label2'
end
object Label3: TLabel
Left = 8
Top = 224
Width = 32
Height = 13
Caption = 'Label3'
end
object Label4: TLabel
Left = 8
Top = 248
Width = 32
Height = 13
Caption = 'Label4'
end
object Label5: TLabel
Left = 8
Top = 272
Width = 32
Height = 13
Caption = 'Label5'
end
object Label6: TLabel
Left = 8
Top = 296
Width = 32
Height = 13
Caption = 'Label6'
end
object Label7: TLabel
Left = 8
Top = 320
Width = 32
Height = 13
Caption = 'Label7'
end
object Label8: TLabel
Left = 8
Top = 344
Width = 32
Height = 13
Caption = 'Label8'
end
object Label9: TLabel
Left = 8
Top = 368
Width = 32
Height = 13
Caption = 'Label9'
end
object Label10: TLabel
Left = 8
Top = 392
Width = 38
Height = 13
Caption = 'Label10'
end
object Label11: TLabel
Left = 184
Top = 200
Width = 38
Height = 13
Caption = 'Label11'
end
object Label12: TLabel
Left = 184
Top = 224
Width = 38
Height = 13
Caption = 'Label12'
end
object Label13: TLabel
Left = 184
Top = 248
Width = 38
Height = 13
Caption = 'Label13'
end
object Label14: TLabel
Left = 184
Top = 272
Width = 38
Height = 13
Caption = 'Label14'
end
object Label15: TLabel
Left = 184
Top = 296
Width = 38
Height = 13
Caption = 'Label15'
end
object Label16: TLabel
Left = 184
Top = 320
Width = 38
Height = 13
Caption = 'Label16'
end
object Label17: TLabel
Left = 184
Top = 344
Width = 38
Height = 13
Caption = 'Label17'
end
object Label18: TLabel
Left = 184
Top = 368
Width = 38
Height = 13
Caption = 'Label18'
end
object Label19: TLabel
Left = 184
Top = 392
Width = 38
Height = 13
Caption = 'Label19'
end
object ImageDigi: TImage
Left = 240
Top = 16
Width = 57
Height = 97
end
object Shape1: TShape
Left = 168
Top = 152
Width = 2
Height = 273
end
object Label21: TLabel
Left = 120
Top = 152
Width = 29
Height = 13
Caption = 'Motif'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = [fsBold]
ParentFont = False
end
object Label22: TLabel
Left = 296
Top = 176
Width = 29
Height = 13
Caption = 'Motif'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = [fsBold]
ParentFont = False
end
object Label23: TLabel
Left = 16
Top = 104
Width = 205
Height = 13
Caption = 'Nombre d'#39'adresses occup'#233'es par le signal :'
end
object LabelTitre: TLabel
Left = 16
Top = 8
Width = 63
Height = 19
Caption = 'Adresse'
Font.Charset = ANSI_CHARSET
Font.Color = clWindowText
Font.Height = -16
Font.Name = 'Arial'
Font.Style = [fsBold]
ParentFont = False
end
object Label24: TLabel
Left = 56
Top = 124
Width = 24
Height = 13
Caption = '1 '#224' 4'
end
object Button1: TButton
Left = 128
Top = 432
Width = 75
Height = 25
Caption = 'Ok'
TabOrder = 0
OnClick = Button1Click
end
object Edit1: TEdit
Left = 120
Top = 176
Width = 25
Height = 21
TabOrder = 1
OnChange = Edit1Change
end
object Edit2: TEdit
Left = 120
Top = 200
Width = 25
Height = 21
TabOrder = 2
OnChange = Edit2Change
end
object Edit3: TEdit
Left = 120
Top = 224
Width = 25
Height = 21
TabOrder = 3
OnChange = Edit3Change
end
object Edit4: TEdit
Left = 120
Top = 248
Width = 25
Height = 21
TabOrder = 4
OnChange = Edit4Change
end
object Edit5: TEdit
Left = 120
Top = 272
Width = 25
Height = 21
TabOrder = 5
OnChange = Edit5Change
end
object Edit6: TEdit
Left = 120
Top = 296
Width = 25
Height = 21
TabOrder = 6
OnChange = Edit6Change
end
object Edit7: TEdit
Left = 120
Top = 320
Width = 25
Height = 21
TabOrder = 7
OnChange = Edit7Change
end
object Edit8: TEdit
Left = 120
Top = 344
Width = 25
Height = 21
TabOrder = 8
OnChange = Edit8Change
end
object Edit9: TEdit
Left = 120
Top = 368
Width = 25
Height = 21
TabOrder = 9
OnChange = Edit9Change
end
object Edit10: TEdit
Left = 120
Top = 392
Width = 25
Height = 21
TabOrder = 10
OnChange = Edit10Change
end
object Edit11: TEdit
Left = 296
Top = 200
Width = 25
Height = 21
TabOrder = 11
OnChange = Edit11Change
end
object Edit12: TEdit
Left = 296
Top = 224
Width = 25
Height = 21
TabOrder = 12
OnChange = Edit12Change
end
object Edit13: TEdit
Left = 296
Top = 248
Width = 25
Height = 21
TabOrder = 13
OnChange = Edit13Change
end
object Edit14: TEdit
Left = 296
Top = 272
Width = 25
Height = 21
TabOrder = 14
OnChange = Edit14Change
end
object Edit15: TEdit
Left = 296
Top = 296
Width = 25
Height = 21
TabOrder = 15
OnChange = Edit15Change
end
object Edit16: TEdit
Left = 296
Top = 320
Width = 25
Height = 21
TabOrder = 16
OnChange = Edit16Change
end
object Edit17: TEdit
Left = 296
Top = 344
Width = 25
Height = 21
TabOrder = 17
OnChange = Edit17Change
end
object Edit18: TEdit
Left = 296
Top = 368
Width = 25
Height = 21
TabOrder = 18
OnChange = Edit18Change
end
object Edit19: TEdit
Left = 296
Top = 392
Width = 25
Height = 21
TabOrder = 19
OnChange = Edit19Change
end
object EditNAdresses: TEdit
Left = 16
Top = 120
Width = 25
Height = 21
TabOrder = 20
Text = '1'
OnChange = EditNAdressesChange
end
end
+383
View File
@@ -0,0 +1,383 @@
unit UnitCDF;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls , unitconfig, UnitPrinc;
type
TFormCDF = class(TForm)
Button1: TButton;
Label20: TLabel;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
Label5: TLabel;
Label6: TLabel;
Label7: TLabel;
Label8: TLabel;
Label9: TLabel;
Label10: TLabel;
Label11: TLabel;
Label12: TLabel;
Label13: TLabel;
Label14: TLabel;
Label15: TLabel;
Label16: TLabel;
Label17: TLabel;
Label18: TLabel;
Label19: TLabel;
ImageDigi: TImage;
Shape1: TShape;
Label21: TLabel;
Label22: TLabel;
Edit1: TEdit;
Edit2: TEdit;
Edit3: TEdit;
Edit4: TEdit;
Edit5: TEdit;
Edit6: TEdit;
Edit7: TEdit;
Edit8: TEdit;
Edit9: TEdit;
Edit10: TEdit;
Edit11: TEdit;
Edit12: TEdit;
Edit13: TEdit;
Edit14: TEdit;
Edit15: TEdit;
Edit16: TEdit;
Edit17: TEdit;
Edit18: TEdit;
Edit19: TEdit;
Label23: TLabel;
EditNAdresses: TEdit;
LabelTitre: TLabel;
Label24: TLabel;
procedure Button1Click(Sender: TObject);
procedure FormActivate(Sender: TObject);
procedure Edit1Change(Sender: TObject);
procedure Edit2Change(Sender: TObject);
procedure Edit3Change(Sender: TObject);
procedure Edit4Change(Sender: TObject);
procedure Edit5Change(Sender: TObject);
procedure Edit6Change(Sender: TObject);
procedure Edit7Change(Sender: TObject);
procedure Edit8Change(Sender: TObject);
procedure Edit9Change(Sender: TObject);
procedure Edit10Change(Sender: TObject);
procedure Edit11Change(Sender: TObject);
procedure Edit12Change(Sender: TObject);
procedure Edit13Change(Sender: TObject);
procedure Edit14Change(Sender: TObject);
procedure Edit15Change(Sender: TObject);
procedure Edit16Change(Sender: TObject);
procedure Edit18Change(Sender: TObject);
procedure Edit19Change(Sender: TObject);
procedure Edit17Change(Sender: TObject);
procedure EditNAdressesChange(Sender: TObject);
private
{ Déclarations privées }
public
{ Déclarations publiques }
end;
var
FormCDF: TFormCDF;
Adresse,Index : integer;
implementation
{$R *.dfm}
procedure TFormCDF.Button1Click(Sender: TObject);
begin
close;
end;
procedure TFormCDF.FormActivate(Sender: TObject);
var erreur : integer;
begin
Val(FormConfig.EditAdrSig.text,Adresse,erreur);
index:=index_feu(Adresse);
LabelTitre.caption:='Adresse du signal: '+intToSTR(adresse);
erreur:=feux[index].decodeur;
if erreur=5 then
begin
caption:='Configuration du décodeur Digikeijs';
label20.caption:='Tables d''aspects du signal en fonction du motif envoyé au décodeur Digikeijs';
label24.Caption:='1 à 5';
end;
if erreur=2 then
begin
caption:='Configuration du décodeur CDF';
label20.Caption:='Tables d''aspects du signal en fonction du motif envoyé au décodeur CDF';
label24.Caption:='1 à 4';
end;
Label1.caption:=etats[1];
Label2.caption:=etats[2];
Label3.caption:=etats[3];
Label4.caption:=etats[4];
Label5.caption:=etats[5];
Label6.caption:=etats[6];
Label7.caption:=etats[7];
Label8.caption:=etats[8];
Label9.caption:=etats[9];
Label10.caption:=etats[10];
Label11.caption:=etats[11];
Label12.caption:=etats[12];
Label13.caption:=etats[13];
Label14.caption:=etats[14];
Label15.caption:=etats[15];
Label16.caption:=etats[16];
Label17.caption:=etats[17];
Label18.caption:=etats[18];
Label19.caption:=etats[19];
ImageDigi.Picture:=FormConfig.ImageSignal.Picture;
with ImageDigi.Picture do
begin
Bitmap.TransparentMode:=tmAuto;
Bitmap.TransparentColor:=clblue;
end;
ImageDigi.Transparent:=true;
Edit1.Text:=intToSTR(Feux[index].SR[1].sortie1); // carré
Edit2.Text:=intToSTR(Feux[index].SR[2].sortie1); // sémaphore
Edit3.Text:=intToSTR(Feux[index].SR[3].sortie1); // sémaphore cli
Edit4.Text:=intToSTR(Feux[index].SR[4].sortie1);
Edit5.Text:=intToSTR(Feux[index].SR[5].sortie1);
Edit6.Text:=intToSTR(Feux[index].SR[6].sortie1);
Edit7.Text:=intToSTR(Feux[index].SR[7].sortie1);
Edit8.Text:=intToSTR(Feux[index].SR[8].sortie1);
Edit9.Text:=intToSTR(Feux[index].SR[9].sortie1);
Edit10.Text:=intToSTR(Feux[index].SR[10].sortie1);
Edit11.Text:=intToSTR(Feux[index].SR[11].sortie1);
Edit12.Text:=intToSTR(Feux[index].SR[12].sortie1);
Edit13.Text:=intToSTR(Feux[index].SR[13].sortie1);
Edit14.Text:=intToSTR(Feux[index].SR[14].sortie1);
Edit15.Text:=intToSTR(Feux[index].SR[15].sortie1);
Edit16.Text:=intToSTR(Feux[index].SR[16].sortie1);
Edit17.Text:=intToSTR(Feux[index].SR[17].sortie1);
Edit18.Text:=intToSTR(Feux[index].SR[18].sortie1);
Edit19.Text:=intToSTR(Feux[index].SR[19].sortie1);
editNadresses.text:=intToSTR(feux[index].NA);
end;
procedure Maj_DB;
var s : string;
begin
s:=encode_sig_feux(index);
formconfig.RichSig.Lines[index-1]:=s;
aff_champs_sig_feux(index);
end;
procedure TFormCDF.Edit1Change(Sender: TObject);
var erreur : integer;
begin
if index<>0 then
begin
val(Edit1.Text,Feux[index].SR[1].sortie1,erreur);
Maj_DB;
end;
end;
procedure TFormCDF.Edit2Change(Sender: TObject);
var erreur : integer;
begin
if index<>0 then
begin
val(Edit2.Text,Feux[index].SR[2].sortie1,erreur);
Maj_DB;
end;
end;
procedure TFormCDF.Edit3Change(Sender: TObject);
var erreur : integer;
begin
if index<>0 then
begin
val(Edit3.Text,Feux[index].SR[3].sortie1,erreur);
Maj_DB;
end;
end;
procedure TFormCDF.Edit4Change(Sender: TObject);
var erreur : integer;
begin
if index<>0 then
begin
val(Edit4.Text,Feux[index].SR[4].sortie1,erreur);
Maj_DB;
end;
end;
procedure TFormCDF.Edit5Change(Sender: TObject);
var erreur : integer;
begin
if index<>0 then
begin
val(Edit5.Text,Feux[index].SR[5].sortie1,erreur);
Maj_DB;
end;
end;
procedure TFormCDF.Edit6Change(Sender: TObject);
var erreur : integer;
begin
if index<>0 then
begin
val(Edit6.Text,Feux[index].SR[6].sortie1,erreur);
Maj_DB;
end;
end;
procedure TFormCDF.Edit7Change(Sender: TObject);
var erreur : integer;
begin
if index<>0 then
begin
val(Edit7.Text,Feux[index].SR[7].sortie1,erreur);
Maj_DB;
end;
end;
procedure TFormCDF.Edit8Change(Sender: TObject);
var erreur : integer;
begin
if index<>0 then
begin
val(Edit8.Text,Feux[index].SR[8].sortie1,erreur);
Maj_DB;
end;
end;
procedure TFormCDF.Edit9Change(Sender: TObject);
var erreur : integer;
begin
if index<>0 then
begin
val(Edit9.Text,Feux[index].SR[9].sortie1,erreur);
Maj_DB;
end;
end;
procedure TFormCDF.Edit10Change(Sender: TObject);
var erreur : integer;
begin
if index<>0 then
begin
val(Edit10.Text,Feux[index].SR[10].sortie1,erreur);
Maj_DB;
end;
end;
procedure TFormCDF.Edit11Change(Sender: TObject);
var erreur : integer;
begin
if index<>0 then
begin
val(Edit11.Text,Feux[index].SR[11].sortie1,erreur);
Maj_DB;
end;
end;
procedure TFormCDF.Edit12Change(Sender: TObject);
var erreur : integer;
begin
if index<>0 then
begin
val(Edit12.Text,Feux[index].SR[12].sortie1,erreur);
Maj_DB;
end;
end;
procedure TFormCDF.Edit13Change(Sender: TObject);
var erreur : integer;
begin
if index<>0 then
begin
val(Edit13.Text,Feux[index].SR[13].sortie1,erreur);
Maj_DB;
end;
end;
procedure TFormCDF.Edit14Change(Sender: TObject);
var erreur : integer;
begin
if index<>0 then
begin
val(Edit14.Text,Feux[index].SR[14].sortie1,erreur);
Maj_DB;
end;
end;
procedure TFormCDF.Edit15Change(Sender: TObject);
var erreur : integer;
begin
if index<>0 then
begin
val(Edit15.Text,Feux[index].SR[15].sortie1,erreur);
Maj_DB;
end;
end;
procedure TFormCDF.Edit16Change(Sender: TObject);
var erreur : integer;
begin
if index<>0 then
begin
val(Edit16.Text,Feux[index].SR[16].sortie1,erreur);
Maj_DB;
end;
end;
procedure TFormCDF.Edit17Change(Sender: TObject);
var erreur : integer;
begin
if index<>0 then
begin
val(Edit17.Text,Feux[index].SR[17].sortie1,erreur);
Maj_DB;
end;
end;
procedure TFormCDF.Edit18Change(Sender: TObject);
var erreur : integer;
begin
if index<>0 then
begin
val(Edit18.Text,Feux[index].SR[18].sortie1,erreur);
Maj_DB;
end;
end;
procedure TFormCDF.Edit19Change(Sender: TObject);
var erreur : integer;
begin
if index<>0 then
begin
val(Edit19.Text,Feux[index].SR[19].sortie1,erreur);
Maj_DB;
end;
end;
procedure TFormCDF.EditNAdressesChange(Sender: TObject);
var erreur,i : integer;
begin
if index<>0 then
begin
val(EditNAdresses.Text,i,erreur);
if (i>0) and (i<6) then
begin
Feux[index].Na:=i;
Maj_DB;
end;
end;
end;
end.
Binary file not shown.
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
BIN
View File
Binary file not shown.
+411 -26
View File
@@ -1,6 +1,6 @@
object FormConfig: TFormConfig object FormConfig: TFormConfig
Left = 236 Left = 253
Top = 124 Top = 95
Hint = 'Modifie la configuration selon les s'#233'lections choisies' Hint = 'Modifie la configuration selon les s'#233'lections choisies'
BorderStyle = bsDialog BorderStyle = bsDialog
Caption = 'Configuration g'#233'n'#233'rale' Caption = 'Configuration g'#233'n'#233'rale'
@@ -1570,7 +1570,7 @@ object FormConfig: TFormConfig
Top = 8 Top = 8
Width = 633 Width = 633
Height = 505 Height = 505
ActivePage = TabSheetAutonome ActivePage = TabSheetAct
Font.Charset = DEFAULT_CHARSET Font.Charset = DEFAULT_CHARSET
Font.Color = clBlack Font.Color = clBlack
Font.Height = -11 Font.Height = -11
@@ -1583,7 +1583,7 @@ object FormConfig: TFormConfig
Caption = 'CDM Rail' Caption = 'CDM Rail'
object Label36: TLabel object Label36: TLabel
Left = 24 Left = 24
Top = 440 Top = 456
Width = 369 Width = 369
Height = 13 Height = 13
Caption = Caption =
@@ -1799,13 +1799,13 @@ object FormConfig: TFormConfig
Left = 312 Left = 312
Top = 184 Top = 184
Width = 281 Width = 281
Height = 137 Height = 113
Caption = 'Au d'#233'marrage de CDM Rail : interface LENZ' Caption = 'Au d'#233'marrage de CDM Rail : interface LENZ'
TabOrder = 3 TabOrder = 3
object RadioButton13: TRadioButton object RadioButton13: TRadioButton
Left = 8 Left = 8
Top = 24 Top = 24
Width = 209 Width = 97
Height = 17 Height = 17
Caption = 'Automatique' Caption = 'Automatique'
TabOrder = 0 TabOrder = 0
@@ -1843,8 +1843,8 @@ object FormConfig: TFormConfig
TabOrder = 4 TabOrder = 4
end end
object RadioButton18: TRadioButton object RadioButton18: TRadioButton
Left = 8 Left = 152
Top = 104 Top = 24
Width = 113 Width = 113
Height = 17 Height = 17
Caption = 'Genli' Caption = 'Genli'
@@ -1855,19 +1855,19 @@ object FormConfig: TFormConfig
Left = 16 Left = 16
Top = 296 Top = 296
Width = 273 Width = 273
Height = 137 Height = 145
Caption = 'Services CommIP CDM Rail' Caption = 'Services CommIP CDM Rail'
TabOrder = 4 TabOrder = 4
object Label6: TLabel object Label6: TLabel
Left = 8 Left = 8
Top = 18 Top = 26
Width = 215 Width = 215
Height = 13 Height = 13
Caption = 'Liste des '#233'v'#232'nements demand'#233's '#224' CDM Rail:' Caption = 'Liste des '#233'v'#232'nements demand'#233's '#224' CDM Rail:'
end end
object CheckBoxServAig: TCheckBox object CheckBoxServAig: TCheckBox
Left = 8 Left = 8
Top = 40 Top = 48
Width = 113 Width = 113
Height = 17 Height = 17
Caption = 'Aiguillages' Caption = 'Aiguillages'
@@ -1875,7 +1875,7 @@ object FormConfig: TFormConfig
end end
object CheckBoxServDet: TCheckBox object CheckBoxServDet: TCheckBox
Left = 8 Left = 8
Top = 56 Top = 64
Width = 89 Width = 89
Height = 17 Height = 17
Caption = 'D'#233'tecteurs' Caption = 'D'#233'tecteurs'
@@ -1883,7 +1883,7 @@ object FormConfig: TFormConfig
end end
object CheckBoxServAct: TCheckBox object CheckBoxServAct: TCheckBox
Left = 8 Left = 8
Top = 72 Top = 80
Width = 81 Width = 81
Height = 17 Height = 17
Caption = 'Actionneurs' Caption = 'Actionneurs'
@@ -1891,15 +1891,15 @@ object FormConfig: TFormConfig
end end
object CheckServPosTrains: TCheckBox object CheckServPosTrains: TCheckBox
Left = 8 Left = 8
Top = 88 Top = 96
Width = 169 Width = 145
Height = 17 Height = 17
Caption = 'Position des trains (non utilis'#233')' Caption = 'Position trains (non utilis'#233')'
TabOrder = 3 TabOrder = 3
end end
object CheckBoxSrvSig: TCheckBox object CheckBoxSrvSig: TCheckBox
Left = 8 Left = 8
Top = 104 Top = 112
Width = 113 Width = 113
Height = 17 Height = 17
Caption = 'Signaux (non utilis'#233')' Caption = 'Signaux (non utilis'#233')'
@@ -1908,9 +1908,9 @@ object FormConfig: TFormConfig
end end
object GroupBox15: TGroupBox object GroupBox15: TGroupBox
Left = 312 Left = 312
Top = 328 Top = 304
Width = 281 Width = 281
Height = 89 Height = 137
Caption = 'Divers' Caption = 'Divers'
TabOrder = 5 TabOrder = 5
object Label31: TLabel object Label31: TLabel
@@ -1934,6 +1934,13 @@ object FormConfig: TFormConfig
Height = 13 Height = 13
Caption = 'Nombre de cantons pr'#233'sence train avant signal' Caption = 'Nombre de cantons pr'#233'sence train avant signal'
end end
object Label55: TLabel
Left = 8
Top = 90
Width = 32
Height = 13
Caption = 'Debug'
end
object EditNbDetDist: TEdit object EditNbDetDist: TEdit
Left = 240 Left = 240
Top = 20 Top = 20
@@ -1966,14 +1973,26 @@ object FormConfig: TFormConfig
TabOrder = 2 TabOrder = 2
Text = 'EditNbCantons' Text = 'EditNbCantons'
end end
object EditDebug: TEdit
Left = 240
Top = 88
Width = 25
Height = 21
Hint =
'Mode d'#233'bug au d'#233'marrage (0=sans ; 1=Log d'#233'marrage ; 2=D'#233'marrage ' +
'par '#233'tape)'
ParentShowHint = False
ShowHint = True
TabOrder = 3
end
end end
end end
object TabSheetAutonome: TTabSheet object TabSheetAutonome: TTabSheet
Caption = 'Mode autonome' Caption = 'Mode autonome'
ImageIndex = 1 ImageIndex = 1
object Label9: TLabel object Label9: TLabel
Left = 0 Left = 16
Top = 448 Top = 456
Width = 294 Width = 294
Height = 13 Height = 13
Caption = 'Ces param'#232'tres sont utilis'#233's en fonctionnement sans CDM Rail' Caption = 'Ces param'#232'tres sont utilis'#233's en fonctionnement sans CDM Rail'
@@ -1996,7 +2015,7 @@ object FormConfig: TFormConfig
object Label4: TLabel object Label4: TLabel
Left = 16 Left = 16
Top = 45 Top = 45
Width = 126 Width = 138
Height = 26 Height = 26
Caption = '2. Temporisation d'#39'envoi des octets de la trame (ms)' Caption = '2. Temporisation d'#39'envoi des octets de la trame (ms)'
WordWrap = True WordWrap = True
@@ -2141,7 +2160,7 @@ object FormConfig: TFormConfig
end end
object Memo3: TMemo object Memo3: TMemo
Left = 312 Left = 312
Top = 208 Top = 200
Width = 297 Width = 297
Height = 89 Height = 89
BevelInner = bvLowered BevelInner = bvLowered
@@ -2159,7 +2178,7 @@ object FormConfig: TFormConfig
end end
object Memo4: TMemo object Memo4: TMemo
Left = 312 Left = 312
Top = 312 Top = 296
Width = 297 Width = 297
Height = 57 Height = 57
BevelInner = bvLowered BevelInner = bvLowered
@@ -2176,7 +2195,7 @@ object FormConfig: TFormConfig
Left = 8 Left = 8
Top = 280 Top = 280
Width = 297 Width = 297
Height = 121 Height = 161
Caption = 'Au d'#233'marrage de signaux complexes en mode autonome' Caption = 'Au d'#233'marrage de signaux complexes en mode autonome'
TabOrder = 7 TabOrder = 7
object Label32: TLabel object Label32: TLabel
@@ -2239,6 +2258,14 @@ object FormConfig: TFormConfig
ShowHint = True ShowHint = True
TabOrder = 4 TabOrder = 4
end end
object CheckRoulage: TCheckBox
Left = 16
Top = 120
Width = 169
Height = 17
Caption = 'Option roulage des trains'
TabOrder = 5
end
end end
object GroupBox22: TGroupBox object GroupBox22: TGroupBox
Left = 312 Left = 312
@@ -3017,7 +3044,7 @@ object FormConfig: TFormConfig
Width = 129 Width = 129
Height = 21 Height = 21
Style = csDropDownList Style = csDropDownList
ItemHeight = 0 ItemHeight = 13
TabOrder = 1 TabOrder = 1
OnChange = ComboBoxDecChange OnChange = ComboBoxDecChange
end end
@@ -4143,6 +4170,364 @@ object FormConfig: TFormConfig
end end
end end
end end
object TabSheetDccpp: TTabSheet
Caption = 'DCC++'
ImageIndex = 6
ParentShowHint = False
ShowHint = False
object Label10: TLabel
Left = 16
Top = 33
Width = 317
Height = 13
Caption = 'Liste des commandes envoy'#233'es '#224' l'#39'interface DCC++ '#224' la connexion'
end
object Image2: TImage
Left = 248
Top = 408
Width = 105
Height = 65
Picture.Data = {
0A544A504547496D6167654A0F0000FFD8FFE000104A46494600010101006000
600000FFDB004300020101020101020202020202020203050303030303060404
0305070607070706070708090B0908080A0807070A0D0A0A0B0C0C0C0C07090E
0F0D0C0E0B0C0C0CFFDB004301020202030303060303060C0807080C0C0C0C0C
0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C
0C0C0C0C0C0C0C0C0C0C0C0C0CFFC00011080041006203012200021101031101
FFC4001F0000010501010101010100000000000000000102030405060708090A
0BFFC400B5100002010303020403050504040000017D01020300041105122131
410613516107227114328191A1082342B1C11552D1F02433627282090A161718
191A25262728292A3435363738393A434445464748494A535455565758595A63
6465666768696A737475767778797A838485868788898A92939495969798999A
A2A3A4A5A6A7A8A9AAB2B3B4B5B6B7B8B9BAC2C3C4C5C6C7C8C9CAD2D3D4D5D6
D7D8D9DAE1E2E3E4E5E6E7E8E9EAF1F2F3F4F5F6F7F8F9FAFFC4001F01000301
01010101010101010000000000000102030405060708090A0BFFC400B5110002
0102040403040705040400010277000102031104052131061241510761711322
328108144291A1B1C109233352F0156272D10A162434E125F11718191A262728
292A35363738393A434445464748494A535455565758595A636465666768696A
737475767778797A82838485868788898A92939495969798999AA2A3A4A5A6A7
A8A9AAB2B3B4B5B6B7B8B9BAC2C3C4C5C6C7C8C9CAD2D3D4D5D6D7D8D9DAE2E3
E4E5E6E7E8E9EAF2F3F4F5F6F7F8F9FAFFDA000C03010002110311003F00FDFC
A28A2800A28A2800AF857F6B1FF828BEB7F137C69E22F87BF0375DBBD3E7F0CC
7729ABF8BB4FD1ADB5363776FB44F6D60D7D245A704B47921FB6DD5CCA6384CD
0DBA4724F316B7F60F1778B755FDB87C55A9F837C1BA9EA1A37C28D16EA5D3BC
5DE2ED3AE1EDEEBC457113949F45D2674219151D5A3BCBF8C83110F6D6EC2E44
D358F8F7FC14CBE01E8DF0D6C3C1FAFE929359E83E19D3A0B1D37C3963A4D9CF
A6F872CF498AEAEE7B9B3B7B97FB140574E3720446CEE4BDC59E92E1156CC86D
E945735A471E32A4D53728EDD7BDBCBF4F331BF63AFF008299789BC3DE22D4AC
BE27EA2FE29F86F04F6B6CBF10927B3BE8742B8B8792287EDF7B616D6B653D94
F244DE5DE416F12C01E049C6E91DE2FD04AFCA1F881E14D2BE265CBEA12F8834
DF187883489BCBBCB5F0A6A1A9FC4FD66E143EC981BA6B73A7584D146F3BC36E
F6296C6666865916D2F2FA3B8F7CFD9BFF006A8D2BF6559DB487D4B53D47F67A
6BCB7B2D1B58D5096BBF86DF6A4492C6DAF252CC27D0EE629626B3BF0EC2DF78
B69D86CCC5A55A6A5AC159F6FEBFA7EA7261B17283E5AB2BAEFF00E7E5F97F87
6FB8A8A28AE43D70A28A2800A28A2800A28A2800AF08FDB6F57D435CD5FE14FC
398B56D43C3FA27C57F154BA0EBBA8D85C3DADF3D943A4EA1A83D9DB5C210F6F
2DC9B2589A542B22C26E3CA78A6314A9EEF5CBFC65F837E1FF008F9F0EEFBC2F
E26B496EF4CBE31CA1A09E4B6BAB39E2916582EADE78CAC905C432A24B14D1B2
BC72468EAC1941AA8BB3D48A89B8D93FEBFE0EC6C7847C25A57803C2BA6683A1
69B61A2E89A2DAC563A7E9F636E96F6B636F12048E18A34015234450AAAA0000
000002BE50FF0082BAF8B67BDF8596DE0AB6F095AEB53EB9A5EAB776FAA6A7E0
DBCD72CACEF3ECA6CAD2CADEE21C4763A95E4F7C2382E257DAAAB32EC769115B
D37E0F7C6ED7BE16FC40B2F857F16B508AE3C4579BD7C25E2E68A3B5B4F1EC08
A58C4EA816383578A352D35B20549D15AE6D94462E2DECBE797BCF883FB4778D
EF75CD5F4FF1FF008B7C0F6FAEDDCF03F8135DB0FECAB89ADAE17FB364B45BF9
AD0BDBDAC48933CD1C73BCFA907689A386DA359B6A31B4B99F43931B3E6A7ECE
2B591D1EAFE2DF15F8A7549EE2CFC57FB49DD86959E18B4BF00695A2C2A85895
03FB62C3CE040C0DC6407BF06B3BF646B7F0CF83FE28CBE15F10FC38F891737F
AE5DDDFC3692F758D5AC2EB42B4D35ACA7D76C747BAD3E3BF6888834E9162568
ADA545F39D448A269D46EBEBBE14D24B0D63E227ED19E10110FDF4DAF6937F67
656C7D1EF65D38D9FE22623DF835E53E05BFD53E347C60BDD23E10F8D35CD7BC
723C5D79AD5D6B17AF697BA27826D21B07F0F43AC5F7970AFDAEFAEAD2DE496C
AD124549524867915624667D22B46B65F71C952A2538CAF777DAF7D3AD936F5F
EB63E98FD896C64F849F127E28FC20D3B54BDD6FC17F0DAE74D7F0EC97539B99
B4082F6D4CC743799B2F20B50892C7E612E96D7D6B192422B37D0F5C3FECF5FB
3E7877F667F86F0F86BC3A97B323CF25FEA3A96A139BAD4B5CBE94EE9EFAF273
CCD712B72CE700615542A2AA2F715CD5249CAE8F4E841C29A8BFF86F2F96C145
14541B051451400515CE78D754F17585E40BE1DD13C39AADBB21333EA5ADCDA7
BA36780AB1DA4E1863B965FA77AC5FF848BE287FD09FE02FFC2C2EFF00F95940
1DED15C17FC245F143FE84FF00017FE16177FF00CACA3FE122F8A1FF00427F80
BFF0B0BBFF00E565005BFDA03F67FF00097ED43F09358F03F8E347835CF0E6B7
1849EDE4255E37560F1CD13AE1A29A3755749108647556520806BE63F86FF0B5
BE0AFC44B5F86DE26F1B78BFE1EF8A751629E14F13E89A8C51685E39B74CB35B
A697771CFA5D96AC8A0B4F6F6F6D109D435CDB6D413DBD97D23FF0917C50FF00
A13FC05FF8585DFF00F2B2B0FE24784BC57F193C197BE1BF17FC2EF84DE2BF0F
6A4AAB77A5EB1E219AFACAE82B06024865D2991C06008C838201AB8CDAD3A18D
4A3193E6B6A789FC4DF899F18FC4FF0011F58F81BE09F14F8335EF17DFE9E3FB
67C61A6E9171A749F0C2CA60152E6EE23713C373A8CD1177B6851E02640B2B42
2DD59ABE82FD96BF65CF07FEC77F0634AF02F822C25B4D274D40649EE2533DEE
A53EC546B9B994F32CCC11416380AA888A15111170BE157C3EF117C08F0743E1
DF03FC25F83FE0DF0FDBBB491699A1EBB2E9D671331CB32C30E94A8093C92073
5D1FFC245F143FE84FF017FE16177FFCACA73A97565B134A872CB9E4EEFA792E
CBF57D7D2C8EF68AE0BFE122F8A1FF00427F80BFF0B0BBFF00E5651FF0917C50
FF00A13FC05FF8585DFF00F2B2B33A0EF68AE0BFE122F8A1FF00427F80BFF0B0
BBFF00E5656CF82F54F185F6A132F88B43F0DE976AB1E62934ED767BF91DF23E
56492D200AB8C9C86273C63B800E928A28A00FC46FF82747FC11F3E13FFC14D3
C53FB4878DFE275F78EA6F10691F1A3C43A3452E9DAD9B747815A29C170C8E59
F7CF27CD9E9B4638E7D5FC33F012EBFE0891FF000549FD9EBC09F0DFC75E38D7
3E0FFED0A756D2B54F09F8835017B1697796B1C256EED982AAC64BDCDBE7E42E
5639833B078C4597FB32F83BF6EAFF00827778D3E35687E02FD99FC37E3FF0DF
8E7E25EB3E2FB4D5EF3C6BA65A19E2B991123291B5DA3AA3470A381222B82E41
03181EADF007F64DFDA67F6DAFDBE7E1D7C72FDA73C37E0FF863E1DF82B05F7F
C225E0BD1F508F51BAB8BEBA8D524B9B89A29254DBF2C6F9120F9ADA15F280F3
1E4F4E751DDF34938DB6BF91F3B4684128FB3A6D54BEF66BAEB77DAC7837EC9D
FF0004D2F057FC1623F68AFDA83C73F1B3C49F10F56D67C1FF0016757F0968F1
D8EB7F66B6D3F4DB59310411A18DB6AAAB05C038C2838DC5D9BEACF827FF0004
63F841FF0004C6B9F16FC5EF86775E356F17E85E14D522B5FED8D596F6D4030F
99931F96B921A24EFEB5E2BE00F849FB69FF00C1357F680F8E767F093E07F837
E32F823E2A78F2FF00C7565ABCBE29B4D327B4FB6396FB3491CF71136E45D8A4
842A486218860ABEF5FB38FC5DFDAFFF00699F156BBE08F8E3FB3E7877E13F80
FC41E1DD42D24F10E9FE29B1D56782E248C471A0822BA918821DCE76E06C1923
3515273E925CBDAEBF235A1428A779537ED2EF5B3DEEF5B9F197FC129FFE0889
F09BFE0A4BFB097837E37FC58F11FC53D7BE2178FAE755B9D62FBFE1243FE912
43AA5DDAAB65E36624A408496624B16E83007DABF05FF64FFD9D3FE0801F07FE
227C487F11F8AF40F08F881B4AB7D76FF5996E359103453CD0DA88E2B781A51B
A4BE656215872A4E02935F31FEC61A6FFC140FFE09ADFB3A68BF04BC37FB3478
0BE23683E07B9BE8EC7C470F8DEC6D63D512E2F67BA322A4D7314A177CEE177C
51B6D0B9504127EDCFD80FE31FED1DF1B5BC630FED11F04F40F84F6FA7AD89D0
058EBF69AC0D5CB9B8FB4EF10CF2F97E56CB62376DDDE71C6769C4E227377BCA
F1BED75B1781A3463CAE34DA9DB7717BDB5D4F977FE09EBFF070AFC39F8EFF00
B4578F3C17E3BF889A6893C4DF107FB13E13C169E19D4627D634C9E5115A195D
61658DDDD90137062233960A39153F689FF8390BE0FF00843F6D8F849A2F85BE
2769F27C2BB3B8F105A7C54B99BC29AA1B8D2E586D42E9AB16EB71236EBB122B
18124181962AB863F63FEC7DFB05E93FB237C45F8C7E23B6D6EE35F9FE2F78CE
E3C6334573671C4349925CFEE236049655CF0C706A5F8E1FB0A68FF1B3F6C5F8
21F17A6D5A4D3AEBE0B7F6EF93A545651BC1ACFF006A59ADAB79AE4829E505DE
B80724F6EB50E7479DBB3B5BF4F437853C62A29392E6BAE9D2FF00E2EDFE47C7
9FB6AFC77F83FF00B557C7EF82DE32D57C53AADCFC18F13F852E7508352B3B7B
BB791D5A4B858DD2178BCD42D2C71A9CC60E1467819117813E11FEC5BF12BC6B
A4787747F1978F6E756D72F22B1B3848BB8C4B348E1517735B055CB10324802B
E94FDB47F67BF8807F688F87FF00157E1BF87745F18DD7856C6E74ABAF0FDEDC
C768AE92AC8165569195081E6BE41604154C0605B6E241F15FF69EB49D258BF6
6CF05C72C6C195D7C4160ACA477044FC1AFB6C363BFD8A94685571B46D6F6B08
59DDEF192BBE9ADECCFC2734C86D9DE32AE61845514EAA926F095AB3943920BD
DA94E6A295D34A2D37177BDEF61FFB6BFC10D67F669F88CFFB457C2F548B51D3
173E33D0DA5F2AD75DB2E3CC9BD1640002DC1C955900DE8C25E67E0EE9BA87FC
156BE372FC40F1459BD8FC18F02DE35BE83E1D9DD59B58BC50ACD2DDAA921B01
94B29CA60AC6378F399FBCFDA83E077C4DFDB3BE3AE9DE0BD5B4DB9F097C0DD1
655BDD4AED750B76B9F154B1B2958C24523491C793F2870A06D691B2E2255A43
F65FF19FEC69FB4E45E2AF837E1D7D7FE1D78C182789FC2505F5BDA9D35D7A5D
5A1B89113232488F7633B93E54643171D0C5535858C25523F58E57CB2BAF763F
CAE57B29DAF66FE14F96E9B56F6B1D9557966D3AD4F0D53FB3BDAC5D4A767EFD
5D6F5634F979A5494B95CD2D2725CEA3249F37D73451457C51FB785145140051
4514005145140051451400514514005145140051451401FFD9}
Transparent = True
end
object Label19: TLabel
Left = 8
Top = 8
Width = 276
Height = 13
Caption = 'Configuration de l'#39'interface DCC++ pour le mode autonome'
end
object RichCdeDccpp: TRichEdit
Left = 8
Top = 48
Width = 577
Height = 241
Color = clBlack
Font.Charset = DEFAULT_CHARSET
Font.Color = clAqua
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
ParentFont = False
TabOrder = 0
OnChange = RichCdeDccppChange
end
object GroupBox23: TGroupBox
Left = 8
Top = 328
Width = 577
Height = 81
Caption = 'Options'
TabOrder = 1
object Label29: TLabel
Left = 72
Top = 44
Width = 312
Height = 13
Caption =
'Adresse de base '#224' ajouter aux d'#233'tecteurs renvoy'#233's par la central' +
'e'
end
object CheckEnvAigDccpp: TCheckBox
Left = 8
Top = 16
Width = 369
Height = 25
Caption =
'Envoyer la liste des aiguillages '#224' l'#39'interface DCC++ '#224' la connex' +
'ion'
TabOrder = 0
OnClick = CheckEnvAigDccppClick
end
object EditBase: TEdit
Left = 8
Top = 40
Width = 57
Height = 21
TabOrder = 1
Text = '513'
OnChange = EditBaseChange
end
end
object ButtonEnv: TButton
Left = 8
Top = 296
Width = 129
Height = 25
Hint = 'Envoi les commandes si l'#39'interface DCC++ est connect'#233'e'
Caption = 'Envoyer les commandes'
ParentShowHint = False
ShowHint = True
TabOrder = 2
OnClick = ButtonEnvClick
end
end
object TabSheetTrains: TTabSheet
Caption = 'Trains'
ImageIndex = 7
object Label54: TLabel
Left = 16
Top = 8
Width = 392
Height = 13
Caption =
'Liste des trains d'#233'clar'#233's du r'#233'seau - Pour utilisation en mode a' +
'utonome uniquement'
end
object LabelInfVitesse: TLabel
Left = 320
Top = 240
Width = 256
Height = 26
Caption =
'Les param'#232'tres de vitesse ne sont utilis'#233's que dans le mode roul' +
'age'
WordWrap = True
end
object RichEditTrains: TRichEdit
Left = 8
Top = 64
Width = 289
Height = 385
Color = clBlack
Font.Charset = DEFAULT_CHARSET
Font.Color = clAqua
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
ParentFont = False
ReadOnly = True
TabOrder = 0
OnMouseDown = RichEditTrainsMouseDown
end
object GroupBox24: TGroupBox
Left = 312
Top = 64
Width = 297
Height = 161
Caption = 'Trains'
TabOrder = 1
object Label51: TLabel
Left = 16
Top = 48
Width = 38
Height = 13
Caption = 'Adresse'
end
object Label52: TLabel
Left = 16
Top = 120
Width = 80
Height = 13
Caption = 'Vitesse maximale'
end
object Label53: TLabel
Left = 16
Top = 24
Width = 22
Height = 13
Caption = 'Nom'
end
object Label56: TLabel
Left = 16
Top = 72
Width = 115
Height = 13
Caption = 'Vitesse '#224' l'#39'avertissement'
end
object Label57: TLabel
Left = 16
Top = 96
Width = 79
Height = 13
Caption = 'Vitesse nominale'
end
object EditNomTrain: TEdit
Left = 136
Top = 24
Width = 145
Height = 21
TabOrder = 0
OnChange = EditNomTrainChange
end
object EditAdresseTrain: TEdit
Left = 136
Top = 48
Width = 65
Height = 21
Hint = 'Adresse du d'#233'codeur du train'
ParentShowHint = False
ShowHint = True
TabOrder = 1
OnChange = EditAdresseTrainChange
end
object EditVitesseMaxi: TEdit
Left = 136
Top = 120
Width = 65
Height = 21
TabOrder = 2
OnChange = EditVitesseMaxiChange
end
object EditVitRalenti: TEdit
Left = 136
Top = 72
Width = 65
Height = 21
TabOrder = 3
OnChange = EditVitRalentiChange
end
object EditVitNom: TEdit
Left = 136
Top = 96
Width = 65
Height = 21
TabOrder = 4
OnChange = EditVitNomChange
end
end
object ButtonNT: TButton
Left = 0
Top = 32
Width = 73
Height = 17
Caption = 'Nouveau'
TabOrder = 2
OnClick = ButtonNTClick
end
object ButtonSupprime: TButton
Left = 88
Top = 32
Width = 75
Height = 17
Caption = 'Supprime'
TabOrder = 3
OnClick = ButtonSupprimeClick
end
end
end end
object ButtonEnregistre: TButton object ButtonEnregistre: TButton
Left = 472 Left = 472
+671 -134
View File
File diff suppressed because it is too large Load Diff
Binary file not shown.
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
+52 -46
View File
@@ -1,9 +1,14 @@
object FormDebug: TFormDebug object FormDebug: TFormDebug
Left = 429 Left = 306
Top = 147 Top = 21
Width = 754 Width = 836
Height = 784 Height = 721
VertScrollBar.Position = 160
VertScrollBar.Range = 850
VertScrollBar.Smooth = True
VertScrollBar.Style = ssFlat
VertScrollBar.Tracking = True VertScrollBar.Tracking = True
AutoScroll = False
Caption = 'Fen'#234'tre de d'#233'bug' Caption = 'Fen'#234'tre de d'#233'bug'
Color = clWindow Color = clWindow
TransparentColorValue = clTeal TransparentColorValue = clTeal
@@ -12,17 +17,19 @@ object FormDebug: TFormDebug
Font.Height = -11 Font.Height = -11
Font.Name = 'MS Sans Serif' Font.Name = 'MS Sans Serif'
Font.Style = [] Font.Style = []
KeyPreview = True
OldCreateOrder = False OldCreateOrder = False
Position = poMainFormCenter Position = poMainFormCenter
OnCreate = FormCreate OnCreate = FormCreate
OnKeyPress = FormKeyPress
DesignSize = ( DesignSize = (
721 811
746) 690)
PixelsPerInch = 96 PixelsPerInch = 96
TextHeight = 13 TextHeight = 13
object Label1: TLabel object Label1: TLabel
Left = 564 Left = 646
Top = 4 Top = -156
Width = 108 Width = 108
Height = 13 Height = 13
Anchors = [akTop, akRight] Anchors = [akTop, akRight]
@@ -37,8 +44,8 @@ object FormDebug: TFormDebug
ParentFont = False ParentFont = False
end end
object Label2: TLabel object Label2: TLabel
Left = 412 Left = 494
Top = 2 Top = -158
Width = 131 Width = 131
Height = 18 Height = 18
Anchors = [akTop, akRight] Anchors = [akTop, akRight]
@@ -51,8 +58,8 @@ object FormDebug: TFormDebug
ParentFont = False ParentFont = False
end end
object EditNivDebug: TEdit object EditNivDebug: TEdit
Left = 675 Left = 757
Top = 2 Top = -158
Width = 49 Width = 49
Height = 21 Height = 21
Anchors = [akTop, akRight] Anchors = [akTop, akRight]
@@ -67,10 +74,10 @@ object FormDebug: TFormDebug
OnKeyPress = EditNivDebugKeyPress OnKeyPress = EditNivDebugKeyPress
end end
object MemoEvtDet: TMemo object MemoEvtDet: TMemo
Left = 485 Left = 562
Top = 336 Top = 176
Width = 229 Width = 234
Height = 194 Height = 187
Anchors = [akTop, akRight] Anchors = [akTop, akRight]
Color = clBlack Color = clBlack
Font.Charset = ANSI_CHARSET Font.Charset = ANSI_CHARSET
@@ -88,8 +95,8 @@ object FormDebug: TFormDebug
OnChange = MemoEvtDetChange OnChange = MemoEvtDetChange
end end
object ButtonEcrLog: TButton object ButtonEcrLog: TButton
Left = 379 Left = 453
Top = 328 Top = 168
Width = 97 Width = 97
Height = 29 Height = 29
Anchors = [akTop, akRight] Anchors = [akTop, akRight]
@@ -98,8 +105,8 @@ object FormDebug: TFormDebug
OnClick = ButtonEcrLogClick OnClick = ButtonEcrLogClick
end end
object ButtonRazTampon: TButton object ButtonRazTampon: TButton
Left = 379 Left = 453
Top = 360 Top = 200
Width = 97 Width = 97
Height = 33 Height = 33
Anchors = [akTop, akRight] Anchors = [akTop, akRight]
@@ -109,8 +116,8 @@ object FormDebug: TFormDebug
OnClick = ButtonRazTamponClick OnClick = ButtonRazTamponClick
end end
object ButtonCherche: TButton object ButtonCherche: TButton
Left = 379 Left = 453
Top = 296 Top = 136
Width = 97 Width = 97
Height = 25 Height = 25
Anchors = [akTop, akRight] Anchors = [akTop, akRight]
@@ -119,8 +126,8 @@ object FormDebug: TFormDebug
OnClick = ButtonChercheClick OnClick = ButtonChercheClick
end end
object ButtonAffEvtChrono: TButton object ButtonAffEvtChrono: TButton
Left = 379 Left = 453
Top = 256 Top = 96
Width = 97 Width = 97
Height = 33 Height = 33
Anchors = [akTop, akRight] Anchors = [akTop, akRight]
@@ -130,8 +137,8 @@ object FormDebug: TFormDebug
OnClick = ButtonAffEvtChronoClick OnClick = ButtonAffEvtChronoClick
end end
object ButtonCop: TButton object ButtonCop: TButton
Left = 379 Left = 453
Top = 208 Top = 48
Width = 97 Width = 97
Height = 41 Height = 41
Anchors = [akTop, akRight] Anchors = [akTop, akRight]
@@ -147,9 +154,9 @@ object FormDebug: TFormDebug
OnClick = ButtonCopClick OnClick = ButtonCopClick
end end
object RichEdit: TRichEdit object RichEdit: TRichEdit
Left = 485 Left = 562
Top = 176 Top = 16
Width = 229 Width = 234
Height = 153 Height = 153
Anchors = [akTop, akRight] Anchors = [akTop, akRight]
Font.Charset = DEFAULT_CHARSET Font.Charset = DEFAULT_CHARSET
@@ -166,8 +173,8 @@ object FormDebug: TFormDebug
OnChange = RichEditChange OnChange = RichEditChange
end end
object ButtonRazLog: TButton object ButtonRazLog: TButton
Left = 379 Left = 453
Top = 400 Top = 240
Width = 97 Width = 97
Height = 33 Height = 33
Anchors = [akTop, akRight] Anchors = [akTop, akRight]
@@ -177,8 +184,8 @@ object FormDebug: TFormDebug
OnClick = ButtonRazLogClick OnClick = ButtonRazLogClick
end end
object GroupBox1: TGroupBox object GroupBox1: TGroupBox
Left = 369 Left = 451
Top = 648 Top = 480
Width = 345 Width = 345
Height = 185 Height = 185
Anchors = [akTop, akRight] Anchors = [akTop, akRight]
@@ -325,8 +332,8 @@ object FormDebug: TFormDebug
end end
end end
object GroupBox2: TGroupBox object GroupBox2: TGroupBox
Left = 377 Left = 459
Top = 20 Top = -140
Width = 333 Width = 333
Height = 149 Height = 149
Anchors = [akTop, akRight] Anchors = [akTop, akRight]
@@ -498,21 +505,20 @@ object FormDebug: TFormDebug
end end
object RichDebug: TRichEdit object RichDebug: TRichEdit
Left = 8 Left = 8
Top = 8 Top = -152
Width = 353 Width = 435
Height = 718 Height = 788
Anchors = [akLeft, akTop, akRight, akBottom] Anchors = [akLeft, akTop, akRight]
Lines.Strings = ( Lines.Strings = (
'RichDebug') 'RichDebug')
PopupMenu = PopupMenuRD PopupMenu = PopupMenuRD
ReadOnly = True
ScrollBars = ssBoth ScrollBars = ssBoth
TabOrder = 11 TabOrder = 11
OnChange = RichDebugChange OnChange = RichDebugChange
end end
object GroupBox5: TGroupBox object GroupBox5: TGroupBox
Left = 369 Left = 451
Top = 536 Top = 368
Width = 345 Width = 345
Height = 57 Height = 57
Anchors = [akTop, akRight] Anchors = [akTop, akRight]
@@ -578,8 +584,8 @@ object FormDebug: TFormDebug
end end
end end
object ButtonRazTout: TButton object ButtonRazTout: TButton
Left = 380 Left = 454
Top = 176 Top = 16
Width = 97 Width = 97
Height = 25 Height = 25
Hint = Hint =
@@ -593,8 +599,8 @@ object FormDebug: TFormDebug
OnClick = ButtonRazToutClick OnClick = ButtonRazToutClick
end end
object GroupBox6: TGroupBox object GroupBox6: TGroupBox
Left = 368 Left = 450
Top = 600 Top = 432
Width = 345 Width = 345
Height = 41 Height = 41
Anchors = [akTop, akRight] Anchors = [akTop, akRight]
+17 -27
View File
@@ -99,6 +99,7 @@ type
procedure CheckDebugTCOClick(Sender: TObject); procedure CheckDebugTCOClick(Sender: TObject);
procedure Button1Click(Sender: TObject); procedure Button1Click(Sender: TObject);
procedure Button0Click(Sender: TObject); procedure Button0Click(Sender: TObject);
procedure FormKeyPress(Sender: TObject; var Key: Char);
private private
{ Déclarations privées } { Déclarations privées }
public public
@@ -144,8 +145,6 @@ begin
end; end;
end; end;
procedure TFormDebug.FormCreate(Sender: TObject); procedure TFormDebug.FormCreate(Sender: TObject);
var s: string; var s: string;
begin begin
@@ -163,12 +162,13 @@ begin
RichEdit.color:=$111122; RichEdit.color:=$111122;
RichDebug.Lines.add(s); RichDebug.Lines.add(s);
visible:=false; // invisible au démarrage visible:=false; // invisible au démarrage
//garantit la scrollbar dans radstudio
with VertScrollBar do with VertScrollBar do
begin begin
Range:=785; // garantir l'apparition de la trackbar dans radStudio Range:=850;
visible:=true; visible:=true;
tracking:=true; tracking:=true;
end; end;
end; end;
procedure TFormDebug.ButtonEcrLogClick(Sender: TObject); procedure TFormDebug.ButtonEcrLogClick(Sender: TObject);
@@ -220,7 +220,7 @@ end;
procedure TFormDebug.ButtonRazTamponClick(Sender: TObject); procedure TFormDebug.ButtonRazTamponClick(Sender: TObject);
begin begin
N_event_det:=0; N_event_det:=0;
Event_det[1]:=0; Event_det[1].adresse:=0;
MemoEvtDet.Clear; MemoEvtDet.Clear;
memoEvtDet.Refresh; memoEvtDet.Refresh;
end; end;
@@ -412,43 +412,28 @@ procedure TFormDebug.ButtonSimuDet0Click(Sender: TObject);
var det,erreur : integer; var det,erreur : integer;
begin begin
val(EditSimuDet.Text,det,erreur); val(EditSimuDet.Text,det,erreur);
if erreur=0 then if erreur=0 then Event_Detecteur(det,false,'');
begin
Event_Detecteur(det,false,'');
end;
end; end;
procedure TFormDebug.ButtonSimuDet1Click(Sender: TObject); procedure TFormDebug.ButtonSimuDet1Click(Sender: TObject);
var det,erreur : integer; var det,erreur : integer;
begin begin
val(EditSimuDet.Text,det,erreur); val(EditSimuDet.Text,det,erreur);
if erreur=0 then if erreur=0 then Event_Detecteur(det,true,'');
begin
Event_Detecteur(det,true,'');
end;
end; end;
procedure TFormDebug.ButtonSimuAct1Click(Sender: TObject); procedure TFormDebug.ButtonSimuAct1Click(Sender: TObject);
var det,erreur : integer; var det,erreur : integer;
begin begin
val(EditSimuDet.Text,det,erreur); val(EditSimuDet.Text,det,erreur);
if erreur=0 then Event_Act(det,0,1,'');
if erreur=0 then
begin
Event_Act(det,0,1,'');
end;
end; end;
procedure TFormDebug.ButtonSimuAct0Click(Sender: TObject); procedure TFormDebug.ButtonSimuAct0Click(Sender: TObject);
var det,erreur : integer; var det,erreur : integer;
begin begin
val(EditSimuDet.Text,det,erreur); val(EditSimuDet.Text,det,erreur);
if erreur=0 then if erreur=0 then Event_Act(det,0,0,'');
begin
Event_Act(det,0,0,'');
end;
end; end;
procedure TFormDebug.ButtonRazToutClick(Sender: TObject); procedure TFormDebug.ButtonRazToutClick(Sender: TObject);
@@ -493,7 +478,7 @@ begin
Val(s1,prec,erreur); if erreur<>0 then exit; Val(s1,prec,erreur); if erreur<>0 then exit;
Val(s2,Actuel,erreur); if erreur<>0 then exit; Val(s2,Actuel,erreur); if erreur<>0 then exit;
Adr:=suivant_Alg3(prec,type1,actuel,type2,1); Adr:=suivant_Alg3(prec,type1,actuel,type2,1);
if Adr<9996 then if Adr<9995 then
begin begin
s:='L''élément suivant aux éléments '+IntToSTR(prec)+'/'+IntToSTR(actuel)+' est '+IntToSTR(Adr)+' '; s:='L''élément suivant aux éléments '+IntToSTR(prec)+'/'+IntToSTR(actuel)+' est '+IntToSTR(Adr)+' ';
case typeGen of case typeGen of
@@ -505,8 +490,8 @@ begin
buttoir : s:=s+'buttoir'; buttoir : s:=s+'buttoir';
end; end;
AfficheDebug(s,clYellow); AfficheDebug(s,clYellow);
end end
else AfficheDebug('Pas trouvé d''élement suvant aux éléments '+IntToSTR(prec)+'/'+IntToSTR(actuel),clyellow); else AfficheDebug('Pas trouvé d''élement suvant aux éléments '+IntToSTR(prec)+'/'+IntToSTR(actuel),clyellow);
NivDebug:=AncDebug; NivDebug:=AncDebug;
end; end;
@@ -605,4 +590,9 @@ begin
Self.ActiveControl:=nil; Self.ActiveControl:=nil;
end; end;
procedure TFormDebug.FormKeyPress(Sender: TObject; var Key: Char);
begin
if key=chr(27) then close;
end;
end. end.
BIN
View File
Binary file not shown.
+16 -5
View File
@@ -11,10 +11,12 @@ object FormPilote: TFormPilote
Font.Height = -11 Font.Height = -11
Font.Name = 'MS Sans Serif' Font.Name = 'MS Sans Serif'
Font.Style = [] Font.Style = []
KeyPreview = True
OldCreateOrder = False OldCreateOrder = False
OnActivate = FormActivate OnActivate = FormActivate
OnClose = FormClose OnClose = FormClose
OnCreate = FormCreate OnCreate = FormCreate
OnKeyPress = FormKeyPress
DesignSize = ( DesignSize = (
331 331
350) 350)
@@ -42,14 +44,14 @@ object FormPilote: TFormPilote
end end
object LabelNbFeux: TLabel object LabelNbFeux: TLabel
Left = 208 Left = 208
Top = 240 Top = 248
Width = 120 Width = 120
Height = 13 Height = 13
Caption = 'Nombre de feux '#224' allumer' Caption = 'Nombre de feux '#224' allumer'
end end
object LabelDec: TLabel object LabelDec: TLabel
Left = 216 Left = 224
Top = 208 Top = 192
Width = 72 Width = 72
Height = 19 Height = 19
Caption = 'LabelDec' Caption = 'LabelDec'
@@ -62,7 +64,7 @@ object FormPilote: TFormPilote
end end
object Label1: TLabel object Label1: TLabel
Left = 240 Left = 240
Top = 192 Top = 176
Width = 50 Width = 50
Height = 13 Height = 13
Caption = 'D'#233'codeur:' Caption = 'D'#233'codeur:'
@@ -220,11 +222,20 @@ object FormPilote: TFormPilote
end end
object EditNbreFeux: TEdit object EditNbreFeux: TEdit
Left = 240 Left = 240
Top = 256 Top = 264
Width = 57 Width = 57
Height = 21 Height = 21
TabOrder = 3 TabOrder = 3
Text = 'EditNbFeux' Text = 'EditNbFeux'
OnKeyPress = EditNbreFeuxKeyPress OnKeyPress = EditNbreFeuxKeyPress
end end
object CheckVerrouCarre: TCheckBox
Left = 216
Top = 216
Width = 113
Height = 17
Caption = 'Verrouiller au carr'#233
TabOrder = 4
OnClick = CheckVerrouCarreClick
end
end end
+25 -2
View File
@@ -33,6 +33,7 @@ type
LabelNbFeux: TLabel; LabelNbFeux: TLabel;
LabelDec: TLabel; LabelDec: TLabel;
Label1: TLabel; Label1: TLabel;
CheckVerrouCarre: TCheckBox;
procedure RadioVertClick(Sender: TObject); procedure RadioVertClick(Sender: TObject);
procedure RadioVertCliClick(Sender: TObject); procedure RadioVertCliClick(Sender: TObject);
procedure RadioJauneClick(Sender: TObject); procedure RadioJauneClick(Sender: TObject);
@@ -52,6 +53,8 @@ type
procedure ButtonPiloteClick(Sender: TObject); procedure ButtonPiloteClick(Sender: TObject);
procedure EditNbreFeuxKeyPress(Sender: TObject; var Key: Char); procedure EditNbreFeuxKeyPress(Sender: TObject; var Key: Char);
procedure FormActivate(Sender: TObject); procedure FormActivate(Sender: TObject);
procedure CheckVerrouCarreClick(Sender: TObject);
procedure FormKeyPress(Sender: TObject; var Key: Char);
private private
{ Déclarations privées } { Déclarations privées }
public public
@@ -224,11 +227,11 @@ procedure TFormPilote.ButtonPiloteClick(Sender: TObject);
var i,index,e : integer; var i,index,e : integer;
begin begin
index:=index_feu(AdrPilote); index:=index_feu(AdrPilote);
if feux[index].aspect>10 then if feux[index].aspect>10 then
begin begin
val(EditNbreFeux.Text,i,e); val(EditNbreFeux.Text,i,e);
feux[0].EtatSignal:=i; feux[0].EtatSignal:=i;
pilote_direction(AdrPilote,i); pilote_direction(AdrPilote,i);
end; end;
feux[index].EtatSignal:=feux[0].EtatSignal; feux[index].EtatSignal:=feux[0].EtatSignal;
envoi_signal(AdrPilote); envoi_signal(AdrPilote);
@@ -261,7 +264,27 @@ begin
i:=index_feu(AdrPilote); i:=index_feu(AdrPilote);
d:=feux[i].decodeur; d:=feux[i].decodeur;
LabelDec.Caption:=decodeur[d]; LabelDec.Caption:=decodeur[d];
// check
checkVerrouCarre.Checked:=feux[i].VerrouilleCarre;
end; end;
procedure TFormPilote.CheckVerrouCarreClick(Sender: TObject);
var i : integer;
begin
i:=index_feu(AdrPilote);
feux[i].VerrouilleCarre:=checkVerrouCarre.Checked=true;
if feux[i].VerrouilleCarre then
begin
Maj_Etat_Signal(AdrPilote,carre);
envoi_signal(Adrpilote);
Maj_Etat_Signal(0,carre);
dessine_feu_pilote;
end;
end;
procedure TFormPilote.FormKeyPress(Sender: TObject; var Key: Char);
begin
if key=chr(27) then close;
end;
end. end.
BIN
View File
Binary file not shown.
+20 -9
View File
@@ -1,6 +1,6 @@
object FormPrinc: TFormPrinc object FormPrinc: TFormPrinc
Left = 70 Left = 67
Top = 246 Top = 170
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'
@@ -1474,7 +1474,7 @@ object FormPrinc: TFormPrinc
end end
end end
object GroupBox3: TGroupBox object GroupBox3: TGroupBox
Left = 736 Left = 656
Top = 64 Top = 64
Width = 265 Width = 265
Height = 129 Height = 129
@@ -1606,14 +1606,14 @@ object FormPrinc: TFormPrinc
Left = 1168 Left = 1168
Top = 224 Top = 224
end end
object ClientSocketLenz: TClientSocket object ClientSocketInterface: TClientSocket
Active = False Active = False
ClientType = ctNonBlocking ClientType = ctNonBlocking
Port = 0 Port = 0
OnConnect = ClientSocketLenzConnect OnConnect = ClientSocketInterfaceConnect
OnDisconnect = ClientSocketLenzDisconnect OnDisconnect = ClientSocketInterfaceDisconnect
OnRead = ClientSocketLenzRead OnRead = ClientSocketInterfaceRead
OnError = ClientSocketLenzError OnError = ClientSocketInterfaceError
Left = 320 Left = 320
end end
object MainMenu1: TMainMenu object MainMenu1: TMainMenu
@@ -1698,6 +1698,10 @@ object FormPrinc: TFormPrinc
Caption = 'Demande '#233'tat accessoires' Caption = 'Demande '#233'tat accessoires'
OnClick = Demandetataccessoires1Click OnClick = Demandetataccessoires1Click
end end
object Demandetatdtecteurs1: TMenuItem
Caption = 'Demande '#233'tat d'#233'tecteurs'
OnClick = Demandetatdtecteurs1Click
end
object RepriseDCC1: TMenuItem object RepriseDCC1: TMenuItem
Caption = 'Reprise DCC' Caption = 'Reprise DCC'
Hint = Hint =
@@ -1771,6 +1775,13 @@ object FormPrinc: TFormPrinc
OnClick = Apropos1Click OnClick = Apropos1Click
end end
end end
object Roulage1: TMenuItem
Caption = 'Roulage'
object Placerlestrains1: TMenuItem
Caption = 'Placer les trains'
OnClick = Placerlestrains1Click
end
end
end end
object ClientSocketCDM: TClientSocket object ClientSocketCDM: TClientSocket
Active = False Active = False
@@ -1792,7 +1803,7 @@ object FormPrinc: TFormPrinc
end end
object PopupMenuFenRich: TPopupMenu object PopupMenuFenRich: TPopupMenu
Left = 208 Left = 208
Top = 24 Top = 16
object Copier1: TMenuItem object Copier1: TMenuItem
Caption = 'Copier' Caption = 'Copier'
OnClick = Copier1Click OnClick = Copier1Click
+1784 -609
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.
+6 -6
View File
@@ -1,7 +1,7 @@
object FormSimulation: TFormSimulation object FormSimulation: TFormSimulation
Left = 332 Left = 332
Top = 283 Top = 283
Width = 438 Width = 447
Height = 189 Height = 189
Caption = 'Simulation' Caption = 'Simulation'
Color = clBtnFace Color = clBtnFace
@@ -15,11 +15,11 @@ object FormSimulation: TFormSimulation
PixelsPerInch = 96 PixelsPerInch = 96
TextHeight = 13 TextHeight = 13
object Label1: TLabel object Label1: TLabel
Left = 16 Left = 8
Top = 32 Top = 32
Width = 330 Width = 369
Height = 16 Height = 16
Caption = 'Intervalle de temps entre deux '#233'v'#232'nements d'#233'tecteurs (s)' Caption = 'Intervalle de temps entre deux '#233'v'#232'nements d'#233'tecteurs (x100ms)'
Font.Charset = ANSI_CHARSET Font.Charset = ANSI_CHARSET
Font.Color = clWindowText Font.Color = clWindowText
Font.Height = -13 Font.Height = -13
@@ -38,9 +38,9 @@ object FormSimulation: TFormSimulation
OnClick = ButtonChargeClick OnClick = ButtonChargeClick
end end
object EditIntervalle: TEdit object EditIntervalle: TEdit
Left = 352 Left = 384
Top = 32 Top = 32
Width = 49 Width = 41
Height = 21 Height = 21
TabOrder = 1 TabOrder = 1
Text = '0' Text = '0'
+1 -1
View File
@@ -59,7 +59,7 @@ begin
begin begin
Delete(s,1,i+4); Delete(s,1,i+4);
val(s,k,erreur); val(s,k,erreur);
if intervalle<>0 then k:=Index_Simule*Intervalle*10+tick+30 else // démarre dans 3s if intervalle<>0 then k:=Index_Simule*Intervalle+tick+30 else // démarre dans 3s
k:=Index_Simule+tick+30 ; k:=Index_Simule+tick+30 ;
Tablo_simule[index_simule].tick:=k; Tablo_simule[index_simule].tick:=k;
BIN
View File
Binary file not shown.
+2 -2
View File
@@ -1,6 +1,6 @@
object FormTCO: TFormTCO object FormTCO: TFormTCO
Left = 152 Left = 207
Top = 35 Top = 62
Width = 1139 Width = 1139
Height = 686 Height = 686
VertScrollBar.Visible = False VertScrollBar.Visible = False
+158 -70
View File
@@ -332,6 +332,7 @@ type
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)
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[30]; // texte de la cellule
@@ -362,6 +363,9 @@ var
TamponTCO_Org : record TamponTCO_Org : record
x1,y1,x2,y2,NbreCellX,NbreCellY : integer; x1,y1,x2,y2,NbreCellX,NbreCellY : integer;
end; end;
routeTCO : array[1..100] of record
x,y : integer;
end;
rAncien : TRect; rAncien : TRect;
PCanvasTCO : Tcanvas; PCanvasTCO : Tcanvas;
@@ -874,7 +878,7 @@ begin
// voie // voie
case mode of case mode of
0: couleur:=clVoies; 0: couleur:=clVoies;
1: couleur:=clAllume; 1: couleur:=ClCanton;
2: couleur:=couleurtrain[index_couleur]; 2: couleur:=couleurtrain[index_couleur];
end; end;
Brush.Color:=couleur; Brush.Color:=couleur;
@@ -909,7 +913,7 @@ var x0,y0,xc,yc,jy1,jy2,xf,yf,position : integer;
Brush.Color:=clvoies; Brush.Color:=clvoies;
moveto(x0,yf);lineto(xc,yc); // partie déviée moveto(x0,yf);lineto(xc,yc); // partie déviée
if mode=1 then couleur:=clAllume; if mode=1 then couleur:=ClCanton;
if mode=2 then couleur:=couleurtrain[index_couleur]; if mode=2 then couleur:=couleurtrain[index_couleur];
pen.color:=couleur; pen.color:=couleur;
Brush.Color:=couleur; Brush.Color:=couleur;
@@ -944,7 +948,7 @@ var x0,y0,xc,yc,jy1,jy2,xf,yf,position : integer;
Brush.Color:=clvoies; Brush.Color:=clvoies;
moveto(x0,yc);LineTo(xc,yc); moveto(x0,yc);LineTo(xc,yc);
if mode=1 then couleur:=clAllume; if mode=1 then couleur:=ClCanton;
if mode=2 then couleur:=couleurtrain[index_couleur]; if mode=2 then couleur:=couleurtrain[index_couleur];
pen.color:=couleur; pen.color:=couleur;
Brush.Color:=couleur; Brush.Color:=couleur;
@@ -1031,7 +1035,7 @@ var x0,y0,xc,yc,jy1,xf,yf,position : integer;
Brush.Color:=clvoies; Brush.Color:=clvoies;
moveto(xc,yc);lineto(xf,y0); // partie déviée moveto(xc,yc);lineto(xf,y0); // partie déviée
if mode=1 then couleur:=clAllume; if mode=1 then couleur:=ClCanton;
if mode=2 then couleur:=couleurtrain[index_couleur]; if mode=2 then couleur:=couleurtrain[index_couleur];
pen.color:=couleur; pen.color:=couleur;
Brush.Color:=couleur; Brush.Color:=couleur;
@@ -1066,7 +1070,7 @@ var x0,y0,xc,yc,jy1,xf,yf,position : integer;
Brush.Color:=clvoies; Brush.Color:=clvoies;
moveto(xc,yc);LineTo(xf,yc); moveto(xc,yc);LineTo(xf,yc);
if mode=1 then couleur:=clAllume; if mode=1 then couleur:=ClCanton;
if mode=2 then couleur:=couleurtrain[index_couleur]; if mode=2 then couleur:=couleurtrain[index_couleur];
pen.color:=couleur; pen.color:=couleur;
Brush.Color:=couleur; Brush.Color:=couleur;
@@ -1152,7 +1156,7 @@ var x0,y0,xc,yc,xf,yf,x1,x2,y1,y2,x3,y3,x4,y4,position : integer;
Brush.Color:=clvoies; Brush.Color:=clvoies;
moveto(xc,yc);lineto(xf,yf); // partie déviée moveto(xc,yc);lineto(xf,yf); // partie déviée
if mode=1 then couleur:=clAllume; if mode=1 then couleur:=ClCanton;
if mode=2 then couleur:=couleurtrain[index_couleur]; if mode=2 then couleur:=couleurtrain[index_couleur];
pen.color:=couleur; pen.color:=couleur;
Brush.Color:=couleur; Brush.Color:=couleur;
@@ -1187,7 +1191,7 @@ var x0,y0,xc,yc,xf,yf,x1,x2,y1,y2,x3,y3,x4,y4,position : integer;
Brush.Color:=clvoies; Brush.Color:=clvoies;
moveto(xc,yc);LineTo(xf,yc); moveto(xc,yc);LineTo(xf,yc);
if mode=1 then couleur:=clAllume; if mode=1 then couleur:=ClCanton;
if mode=2 then couleur:=couleurtrain[index_couleur]; if mode=2 then couleur:=couleurtrain[index_couleur];
pen.color:=couleur; pen.color:=couleur;
Brush.Color:=couleur; Brush.Color:=couleur;
@@ -1278,7 +1282,7 @@ var x0,y0,xc,yc,xf,yf,x1,x2,y1,y2,x3,y3,x4,y4,position : integer;
Brush.Color:=clvoies; Brush.Color:=clvoies;
moveto(x0,y0);lineto(xc,yc); // partie déviée moveto(x0,y0);lineto(xc,yc); // partie déviée
if mode=1 then couleur:=clAllume; if mode=1 then couleur:=ClCanton;
if mode=2 then couleur:=couleurtrain[index_couleur]; if mode=2 then couleur:=couleurtrain[index_couleur];
pen.color:=couleur; pen.color:=couleur;
Brush.Color:=couleur; Brush.Color:=couleur;
@@ -1313,7 +1317,7 @@ var x0,y0,xc,yc,xf,yf,x1,x2,y1,y2,x3,y3,x4,y4,position : integer;
Brush.Color:=clvoies; Brush.Color:=clvoies;
moveto(x0,yc);LineTo(xc,yc); moveto(x0,yc);LineTo(xc,yc);
if mode=1 then couleur:=clAllume; if mode=1 then couleur:=ClCanton;
if mode=2 then couleur:=couleurtrain[index_couleur]; if mode=2 then couleur:=couleurtrain[index_couleur];
pen.color:=couleur; pen.color:=couleur;
Brush.Color:=couleur; Brush.Color:=couleur;
@@ -1401,7 +1405,7 @@ begin
case mode of case mode of
0: couleur:=clVoies; 0: couleur:=clVoies;
1: couleur:=clAllume; 1: couleur:=ClCanton;
2: couleur:=couleurtrain[index_couleur]; 2: couleur:=couleurtrain[index_couleur];
end; end;
Pen.Width:=epaisseur; Pen.Width:=epaisseur;
@@ -1431,7 +1435,7 @@ begin
case mode of case mode of
0: couleur:=clVoies; 0: couleur:=clVoies;
1: couleur:=clAllume; 1: couleur:=ClCanton;
2: couleur:=couleurtrain[index_couleur]; 2: couleur:=couleurtrain[index_couleur];
end; end;
Brush.Color:=Couleur; Brush.Color:=Couleur;
@@ -1461,7 +1465,7 @@ begin
case mode of case mode of
0: couleur:=clVoies; 0: couleur:=clVoies;
1: couleur:=clAllume; 1: couleur:=ClCanton;
2: couleur:=couleurtrain[index_couleur]; 2: couleur:=couleurtrain[index_couleur];
end; end;
Brush.Color:=Couleur; Brush.Color:=Couleur;
@@ -1491,7 +1495,7 @@ begin
case mode of case mode of
0: couleur:=clVoies; 0: couleur:=clVoies;
1: couleur:=clAllume; 1: couleur:=ClCanton;
2: couleur:=couleurtrain[index_couleur]; 2: couleur:=couleurtrain[index_couleur];
end; end;
Brush.Color:=Couleur; Brush.Color:=Couleur;
@@ -1518,11 +1522,11 @@ begin
FillRect(r); FillRect(r);
Adr:=TCO[x,y].adresse; Adr:=TCO[x,y].adresse;
if (Adr<>0) and detecteur[Adr].etat then couleur:=clAllume if (Adr<>0) and (detecteur[Adr].etat) then couleur:=clAllume
else else
case mode of case mode of
0: couleur:=clVoies; 0: couleur:=clVoies;
1: couleur:=clAllume; 1: couleur:=ClCanton;
2: couleur:=couleurtrain[index_couleur]; 2: couleur:=couleurtrain[index_couleur];
end; end;
Brush.Color:=couleur; Brush.Color:=couleur;
@@ -1549,11 +1553,11 @@ begin
FillRect(r); FillRect(r);
Adr:=TCO[x,y].adresse; Adr:=TCO[x,y].adresse;
if (Adr<>0) and detecteur[Adr].etat then couleur:=clAllume if (Adr<>0) and (detecteur[Adr].etat) then couleur:=clAllume
else else
case mode of case mode of
0: couleur:=clVoies; 0: couleur:=clVoies;
1: couleur:=clAllume; 1: couleur:=ClCanton;
2: couleur:=couleurtrain[index_couleur]; 2: couleur:=couleurtrain[index_couleur];
end; end;
Brush.Color:=couleur; Brush.Color:=couleur;
@@ -1588,7 +1592,7 @@ var x0,y0,xc,yc,xf,yf,x1,x2,y1,y2,x3,y3,x4,y4,position : integer;
Brush.Color:=clvoies; Brush.Color:=clvoies;
moveto(xc,yc);lineto(xf,yc); // partie droite moveto(xc,yc);lineto(xf,yc); // partie droite
if mode=1 then couleur:=clAllume; if mode=1 then couleur:=ClCanton;
if mode=2 then couleur:=couleurtrain[index_couleur]; if mode=2 then couleur:=couleurtrain[index_couleur];
pen.color:=couleur; pen.color:=couleur;
Brush.Color:=couleur; Brush.Color:=couleur;
@@ -1623,7 +1627,7 @@ var x0,y0,xc,yc,xf,yf,x1,x2,y1,y2,x3,y3,x4,y4,position : integer;
Brush.Color:=clvoies; Brush.Color:=clvoies;
moveto(xc,yc);LineTo(xf,yf); moveto(xc,yc);LineTo(xf,yf);
if mode=1 then couleur:=clAllume; if mode=1 then couleur:=ClCanton;
if mode=2 then couleur:=couleurtrain[index_couleur]; if mode=2 then couleur:=couleurtrain[index_couleur];
pen.color:=couleur; pen.color:=couleur;
Brush.Color:=couleur; Brush.Color:=couleur;
@@ -1714,7 +1718,7 @@ var x0,y0,xc,yc,xf,yf,x1,x2,y1,y2,x3,y3,x4,position : integer;
Brush.Color:=clvoies; Brush.Color:=clvoies;
moveto(x0,yc);lineto(xc,yc); // partie horz moveto(x0,yc);lineto(xc,yc); // partie horz
if mode=1 then couleur:=clAllume; if mode=1 then couleur:=ClCanton;
if mode=2 then couleur:=couleurtrain[index_couleur]; if mode=2 then couleur:=couleurtrain[index_couleur];
pen.color:=couleur; pen.color:=couleur;
Brush.Color:=couleur; Brush.Color:=couleur;
@@ -1749,7 +1753,7 @@ var x0,y0,xc,yc,xf,yf,x1,x2,y1,y2,x3,y3,x4,position : integer;
Brush.Color:=clvoies; Brush.Color:=clvoies;
moveto(xc,yc);LineTo(x0,yf); moveto(xc,yc);LineTo(x0,yf);
if mode=1 then couleur:=clAllume; if mode=1 then couleur:=ClCanton;
if mode=2 then couleur:=couleurtrain[index_couleur]; if mode=2 then couleur:=couleurtrain[index_couleur];
pen.color:=couleur; pen.color:=couleur;
Brush.Color:=couleur; Brush.Color:=couleur;
@@ -1839,7 +1843,7 @@ var x0,y0,xc,yc,xf,yf,x1,x2,y1,y2,x3,y3,x4,y4,position : integer;
Brush.Color:=clvoies; Brush.Color:=clvoies;
moveto(x0,yc);lineto(xc,yc); // partie droite moveto(x0,yc);lineto(xc,yc); // partie droite
if mode=1 then couleur:=clAllume; if mode=1 then couleur:=ClCanton;
if mode=2 then couleur:=couleurtrain[index_couleur]; if mode=2 then couleur:=couleurtrain[index_couleur];
pen.color:=couleur; pen.color:=couleur;
Brush.Color:=couleur; Brush.Color:=couleur;
@@ -1874,7 +1878,7 @@ var x0,y0,xc,yc,xf,yf,x1,x2,y1,y2,x3,y3,x4,y4,position : integer;
Brush.Color:=clvoies; Brush.Color:=clvoies;
moveto(x0,y0);LineTo(xc,yc); moveto(x0,y0);LineTo(xc,yc);
if mode=1 then couleur:=clAllume; if mode=1 then couleur:=ClCanton;
if mode=2 then couleur:=couleurtrain[index_couleur]; if mode=2 then couleur:=couleurtrain[index_couleur];
pen.color:=couleur; pen.color:=couleur;
Brush.Color:=couleur; Brush.Color:=couleur;
@@ -1965,7 +1969,7 @@ var x0,y0,xc,yc,xf,yf,x1,x2,y1,y2,x3,position : integer;
Brush.Color:=clvoies; Brush.Color:=clvoies;
moveto(xc,yc);lineto(xf,yc); // partie droite moveto(xc,yc);lineto(xf,yc); // partie droite
if mode=1 then couleur:=clAllume; if mode=1 then couleur:=ClCanton;
if mode=2 then couleur:=couleurtrain[index_couleur]; if mode=2 then couleur:=couleurtrain[index_couleur];
pen.color:=couleur; pen.color:=couleur;
Brush.Color:=couleur; Brush.Color:=couleur;
@@ -2000,7 +2004,7 @@ var x0,y0,xc,yc,xf,yf,x1,x2,y1,y2,x3,position : integer;
Brush.Color:=clvoies; Brush.Color:=clvoies;
moveto(xc,yc);LineTo(xf,y0); moveto(xc,yc);LineTo(xf,y0);
if mode=1 then couleur:=clAllume; if mode=1 then couleur:=ClCanton;
if mode=2 then couleur:=couleurtrain[index_couleur]; if mode=2 then couleur:=couleurtrain[index_couleur];
pen.color:=couleur; pen.color:=couleur;
Brush.Color:=couleur; Brush.Color:=couleur;
@@ -2084,7 +2088,7 @@ begin
case mode of case mode of
0: couleur:=clVoies; 0: couleur:=clVoies;
1: couleur:=clAllume; 1: couleur:=ClCanton;
2: couleur:=couleurtrain[index_couleur]; 2: couleur:=couleurtrain[index_couleur];
end; end;
Brush.Color:=Couleur; Brush.Color:=Couleur;
@@ -2114,7 +2118,7 @@ begin
case mode of case mode of
0: couleur:=clVoies; 0: couleur:=clVoies;
1: couleur:=clAllume; 1: couleur:=ClCanton;
2: couleur:=couleurtrain[index_couleur]; 2: couleur:=couleurtrain[index_couleur];
end; end;
Pen.Width:=epaisseur; Pen.Width:=epaisseur;
@@ -2144,7 +2148,7 @@ begin
case mode of case mode of
0: couleur:=clVoies; 0: couleur:=clVoies;
1: couleur:=clAllume; 1: couleur:=ClCanton;
2: couleur:=couleurtrain[index_couleur]; 2: couleur:=couleurtrain[index_couleur];
end; end;
Brush.Color:=Couleur; Brush.Color:=Couleur;
@@ -2174,7 +2178,7 @@ begin
case mode of case mode of
0: couleur:=clVoies; 0: couleur:=clVoies;
1: couleur:=clAllume; 1: couleur:=ClCanton;
2: couleur:=couleurtrain[index_couleur]; 2: couleur:=couleurtrain[index_couleur];
end; end;
Brush.Color:=Couleur; Brush.Color:=Couleur;
@@ -2202,11 +2206,11 @@ begin
FillRect(r); FillRect(r);
Adr:=TCO[x,y].adresse; Adr:=TCO[x,y].adresse;
if (Adr<>0) and detecteur[Adr].etat then couleur:=clAllume if (Adr<>0) and (detecteur[Adr].etat) then couleur:=clAllume
else else
case mode of case mode of
0: couleur:=clVoies; 0: couleur:=clVoies;
1: couleur:=clAllume; 1: couleur:=ClCanton;
2: couleur:=couleurtrain[index_couleur]; 2: couleur:=couleurtrain[index_couleur];
end; end;
Brush.Color:=couleur; Brush.Color:=couleur;
@@ -2219,11 +2223,12 @@ end;
// Element 21 - croisement - TJD // Element 21 - croisement - TJD
procedure dessin_21(Canvas : Tcanvas;x,y,mode : integer); procedure dessin_21(Canvas : Tcanvas;x,y,mode : integer);
var x0,y0,yc : integer; var x0,y0,xc,yc,trajet : integer;
r : Trect; r : Trect;
begin begin
x0:=(x-1)*LargeurCell; x0:=(x-1)*LargeurCell;
y0:=(y-1)*HauteurCell; y0:=(y-1)*HauteurCell;
xc:=x0+(largeurCell div 2);
yc:=y0+(hauteurCell div 2); yc:=y0+(hauteurCell div 2);
with canvas do with canvas do
@@ -2236,22 +2241,42 @@ begin
Brush.Color:=clvoies; Brush.Color:=clvoies;
pen.color:=clvoies; pen.color:=clvoies;
pen.width:=epaisseur; pen.width:=epaisseur;
moveTo(x0,y0+hauteurCell);LineTo(x0+LargeurCell,y0); // diagonale
moveTo(x0,yc);LineTo(x0+largeurCell,yc); // horizontale
// diagonale // regarder d'ou on vient de la route du tco
moveTo(x0,y0+hauteurCell);LineTo(x0+LargeurCell,y0); if mode>0 then
begin
// horizontale trajet:=tco[x,y].trajet;
moveTo(x0,yc);LineTo(x0+largeurCell,yc); case mode of
0: couleur:=clVoies;
1: couleur:=ClCanton;
2: couleur:=couleurtrain[index_couleur];
end;
Brush.Color:=couleur;
pen.color:=couleur;
if trajet=1 then begin moveTo(x0,yc);LineTo(x0+largeurCell,yc);end; // horizontale
if trajet=2 then begin moveTo(x0,y0+hauteurCell);LineTo(x0+LargeurCell,y0);end; // diagonale
if trajet=3 then
begin
moveto(x0,y0+HauteurCell);LineTo(xc,yc);lineTo(x0+largeurCell,yc);
end;
if trajet=4 then
begin
moveto(x0,yc);LineTo(xc,yc);lineTo(x0+largeurCell,y0);
end;
end;
end; end;
end; end;
// Element 22 // Element 22
procedure dessin_22(Canvas : Tcanvas;x,y,mode : integer); procedure dessin_22(Canvas : Tcanvas;x,y,mode : integer);
var x0,y0,yc : integer; var x0,y0,xc,yc,trajet : integer;
r : Trect; r : Trect;
begin begin
x0:=(x-1)*LargeurCell; x0:=(x-1)*LargeurCell;
y0:=(y-1)*HauteurCell; y0:=(y-1)*HauteurCell;
xc:=x0+(LargeurCell div 2);
yc:=y0+(hauteurCell div 2); yc:=y0+(hauteurCell div 2);
with canvas do with canvas do
@@ -2265,12 +2290,32 @@ begin
pen.color:=clvoies; pen.color:=clvoies;
pen.width:=epaisseur; pen.width:=epaisseur;
// diagonale moveto(x0,y0);lineTo(x0+largeurCell,y0+hauteurCell); // diagonale
moveto(x0,y0);lineTo(x0+largeurCell,y0+hauteurCell); moveTo(x0,yc);LineTo(x0+largeurCell,yc); // horizontale
// horizontale // regarder d'ou on vient de la route du tco
moveto(x0,yc);LineTo(x0+hauteurCell,yc); if mode>0 then
begin
trajet:=tco[x,y].trajet;
case mode of
0: couleur:=clVoies;
1: couleur:=ClCanton;
2: couleur:=couleurtrain[index_couleur];
end;
Brush.Color:=couleur;
pen.color:=couleur;
if trajet=1 then begin moveTo(x0,yc);LineTo(x0+largeurCell,yc);end; // horizontale
if trajet=2 then begin moveto(x0,y0);lineTo(x0+largeurCell,y0+hauteurCell);end; // diagonale
if trajet=3 then
begin
moveto(x0,y0);LineTo(xc,yc);lineTo(x0+largeurCell,yc);
end;
if trajet=4 then
begin
moveto(x0,yc);LineTo(xc,yc);lineTo(x0+largeurCell,y0+hauteurcell);
end;
end;
end; end;
end; end;
@@ -2921,6 +2966,7 @@ begin
end; end;
// affiche la cellule x et y en cases // affiche la cellule x et y en cases
// index est utilisé pour accéder au tableau du tracé de la fonction zone_tco
procedure affiche_cellule(x,y : integer); procedure affiche_cellule(x,y : integer);
var repr,Xorg,Yorg,xt,yt,mode,adresse,Bimage,aspect,oriente,pied : integer; var repr,Xorg,Yorg,xt,yt,mode,adresse,Bimage,aspect,oriente,pied : integer;
Bt : TEquipement; Bt : TEquipement;
@@ -3389,12 +3435,9 @@ end;
procedure zone_TCO(det1,det2,mode: integer); procedure zone_TCO(det1,det2,mode: integer);
var i,j,x,y,xn,yn,ancienY,ancienX,Xdet1,Ydet1,Xdet2,Ydet2,Bimage,adresse, var i,j,x,y,xn,yn,ancienY,ancienX,Xdet1,Ydet1,Xdet2,Ydet2,Bimage,adresse,
pos,pos2,ir : integer; pos,pos2,ir,ax,ay,sx,sy: integer;
memtrouve,sortir : boolean; memtrouve,sortir,horz,diag : boolean;
mdl : Tequipement; mdl : Tequipement;
routeTCO : array[1..100] of record
x,y : integer;
end;
s : string; s : string;
begin begin
// trouver le détecteur det1 // trouver le détecteur det1
@@ -3419,12 +3462,12 @@ begin
i:=0; memtrouve:=false; sortir:=false; i:=0; memtrouve:=false; sortir:=false;
ir:=1; ir:=1;
// boucle de remplissage du tableau routeTCO de det1 à det2
repeat repeat
routeTCO[ir].x:=x; routeTCO[ir].x:=x;
routeTCO[ir].y:=y; routeTCO[ir].y:=y;
if ir<100 then inc(ir); if ir<100 then inc(ir);
if debugTCO then AfficheDebug('X='+intToSTR(x)+' Y='+IntToSTR(Y)+' AncienX='+intToSTR(ancienX)+' AncienY='+IntToSTR(ancienY),clyellow); if debugTCO then AfficheDebug('X='+intToSTR(x)+' Y='+IntToSTR(Y)+' AncienX='+intToSTR(ancienX)+' AncienY='+IntToSTR(ancienY),clyellow);
// Affiche la cellule en fonction du mode // Affiche la cellule en fonction du mode
@@ -3437,11 +3480,11 @@ begin
case Bimage of case Bimage of
// voie // voie
1 : begin 1 : begin
if debugTCO then if debugTCO then
begin begin
s:='El 1';if adresse<>0 then s:=s+'adr='+intToStr(adresse); s:='El 1';if adresse<>0 then s:=s+'adr='+intToStr(adresse);
AfficheDebug(s,clyellow); AfficheDebug(s,clyellow);
end; end;
if ancienX<x then xn:=x+1 else xn:=x-1; if ancienX<x then xn:=x+1 else xn:=x-1;
end; end;
2 : begin 2 : begin
@@ -3487,11 +3530,11 @@ begin
10 : begin 10 : begin
//if debugTCO then AfficheDebug('El 10',clyellow); //if debugTCO then AfficheDebug('El 10',clyellow);
if ancienX<x then begin xn:=x+1;yn:=y-1;end else begin xn:=x-1;yn:=y+1;end; if ancienX<x then begin xn:=x+1;yn:=y-1;end else begin xn:=x-1;yn:=y+1;end;
end; end;
11 : begin 11 : begin
//if debugTCO then AfficheDebug('El 11',clyellow); //if debugTCO then AfficheDebug('El 11',clyellow);
if ancienX<x then begin xn:=x+1;yn:=y+1;end else begin xn:=x-1;yn:=y-1;end; if ancienX<x then begin xn:=x+1;yn:=y+1;end else begin xn:=x-1;yn:=y-1;end;
end; end;
12 : begin 12 : begin
//if debugTCO then AfficheDebug('El 12',clyellow); //if debugTCO then AfficheDebug('El 12',clyellow);
pos:=positionTCO(x,y); pos:=positionTCO(x,y);
@@ -3512,7 +3555,7 @@ begin
//if debugTCO then AfficheDebug('El 14',clyellow); //if debugTCO then AfficheDebug('El 14',clyellow);
pos:=positionTCO(x,y); pos:=positionTCO(x,y);
if (ancienX<x) and (ancienY=Y) then begin xn:=x+1;yn:=y+1;end; if (ancienX<x) and (ancienY=Y) then begin xn:=x+1;yn:=y+1;end;
if (ancienX<x) and (ancienY<Y) then begin xn:=x+1;yn:=y+1;end; if (ancienX<x) and (ancienY<Y) then begin xn:=x+1;yn:=y+1;end;
if (ancienX>x) and (ancienY>y) then begin xn:=x-1;if pos=const_droit then yn:=y-1;end; if (ancienX>x) and (ancienY>y) then begin xn:=x-1;if pos=const_droit then yn:=y-1;end;
if (pos=const_inconnu) then begin Erreur_TCO(x,y);exit;end; if (pos=const_inconnu) then begin Erreur_TCO(x,y);exit;end;
end; end;
@@ -3523,7 +3566,7 @@ begin
if (ancienX>x) and (ancienY<Y) then begin xn:=x-1;yn:=y+1;end; if (ancienX>x) and (ancienY<Y) then begin xn:=x-1;yn:=y+1;end;
if (ancienX>x) and (ancienY=y) then begin xn:=x-1;yn:=y+1;end; if (ancienX>x) and (ancienY=y) then begin xn:=x-1;yn:=y+1;end;
if (pos=const_inconnu) then begin Erreur_TCO(x,y);exit;end; if (pos=const_inconnu) then begin Erreur_TCO(x,y);exit;end;
end; end;
16 : if ancienX<x then yn:=y+1 else begin xn:=x-1;yn:=y-1;end; 16 : if ancienX<x then yn:=y+1 else begin xn:=x-1;yn:=y-1;end;
17 : if ancienY<y then begin yn:=y+1;end else begin xn:=x+1;yn:=y-1;end; 17 : if ancienY<y then begin yn:=y+1;end else begin xn:=x+1;yn:=y-1;end;
18 : if AncienX<x then yn:=y-1 else begin yn:=y+1;xn:=x-1;end; 18 : if AncienX<x then yn:=y-1 else begin yn:=y+1;xn:=x-1;end;
@@ -3588,7 +3631,7 @@ begin
if (adresse=0) or (mdl=crois) then if (adresse=0) or (mdl=crois) then
// croisement // croisement
begin begin
if DebugTCO then AfficheDebug('croisement',clyellow); if DebugTCO then AfficheDebug('Croisement',clyellow);
if (ancienX<x) and (ancienY=Y) then xn:=x+1; if (ancienX<x) and (ancienY=Y) then xn:=x+1;
if (ancienX>x) and (ancienY=Y) then xn:=x-1; if (ancienX>x) and (ancienY=Y) then xn:=x-1;
if (ancienX<x) and (ancienY>Y) then begin xn:=x+1;yn:=y-1;end; if (ancienX<x) and (ancienY>Y) then begin xn:=x+1;yn:=y-1;end;
@@ -3603,6 +3646,7 @@ begin
begin begin
j:=Index_Aig(adresse); j:=Index_Aig(adresse);
mdl:=aiguillage[j].modele; mdl:=aiguillage[j].modele;
// tjd ou tjs
if (mdl=tjd) or (mdl=tjs) then if (mdl=tjd) or (mdl=tjs) then
begin begin
pos:=aiguillage[j].position; pos:=aiguillage[j].position;
@@ -3682,9 +3726,54 @@ begin
end; end;
dec(ir); dec(ir);
for i:=1 to ir do // et affichage de la route
Affiche_cellule(routeTCO[i].x,routeTCO[i].y); for i:=1 to ir do
begin
x:=routeTCO[i].x;
y:=routeTCO[i].y;
bimage:=TCO[x,y].BImage;
adresse:=TCO[x,y].Adresse;
tco[x,y].trajet:=0;
if (bimage=21) and (i>1) then
begin
j:=index_aig(adresse);
mdl:=aiguillage[j].modele;
ax:=routeTCO[i-1].x;
ay:=routeTCO[i-1].y;
sx:=routeTCO[i+1].x; // suivant
sy:=routeTCO[i+1].y;
if (ax-x=-1) and (ay-y=0) and (sx-x=1) and (sy-y=0) then tco[x,y].trajet:=1; // de gauche à droite
if (ax-x=1) and (ay-y=0) and (sx-x=-1) and (sy-y=0) then tco[x,y].trajet:=1; // de droite à gauche
if (ax-x=-1) and (ay-y=1) and (sx-x=1) and (sy-y=-1) then tco[x,y].trajet:=2; // de bas gauche vers haut droit
if (ax-x=1) and (ay-y=-1) and (sx-x=-1) and (sy-y=1) then tco[x,y].trajet:=2; // de haut droit vers bas gauche
if (ax-x=-1) and (ay-y=0) and (sx-x=1) and (sy-y=-1) then tco[x,y].trajet:=4; // de gauche vers haut droite
if (ax-x=1) and (ay-y=-1) and (sx-x=-1) and (sy-y=0) then tco[x,y].trajet:=4; // de haut droite vers gauche
if (ax-x=-1) and (ay-y=1) and (sx-x=1) and (sy-y=0) then tco[x,y].trajet:=3; // de bas gauche vers droite
if (ax-x=1) and (ay-y=0) and (sx-x=-1) and (sy-y=1) then tco[x,y].trajet:=3; // de gauche vers haut droite
if tco[x,y].trajet=0 then affiche('Erreur 50 TCO',clred);
end;
if (bimage=22) and (i>1) then
begin
j:=index_aig(adresse);
mdl:=aiguillage[j].modele;
ax:=routeTCO[i-1].x; // précédent
ay:=routeTCO[i-1].y;
sx:=routeTCO[i+1].x; // suivant
sy:=routeTCO[i+1].y;
if (ax-x=-1) and (ay-y=0) and (sx-x=1) and (sy-y=0) then tco[x,y].trajet:=1; // de gauche à droite
if (ax-x=1) and (ay-y=0) and (sx-x=-1) and (sy-y=0) then tco[x,y].trajet:=1; // de droite à gauche
if (ax-x=-1) and (ay-y=-1) and (sx-x=1) and (sy-y=1) then tco[x,y].trajet:=2; // de haut gauche vers bas droit
if (ax-x=1) and (ay-y=1) and (sx-x=-1) and (sy-y=-1) then tco[x,y].trajet:=2; // de bas droit vers haut gauche
if (ax-x=1) and (ay-y=0) and (sx-x=-1) and (sy-y=-1) then tco[x,y].trajet:=3; // de droit vers en haut à gauche
if (ax-x=-1) and (ay-y=-1) and (sx-x=1) and (sy-y=0) then tco[x,y].trajet:=3; // de haut à gauche vers droit
if (ax-x=1) and (ay-y=1) and (sx-x=-1) and (sy-y=0) then tco[x,y].trajet:=4; // de bas à droite vers gauche
if (ax-x=-1) and (ay-y=0) and (sx-x=1) and (sy-y=1) then tco[x,y].trajet:=4; // de gauche vers en bas a droite
if tco[x,y].trajet=0 then affiche('Erreur 51 TCO',clred);
end;
Affiche_cellule(routeTCO[i].x,routeTCO[i].y);
end;
end; end;
procedure TFormTCO.FormActivate(Sender: TObject); procedure TFormTCO.FormActivate(Sender: TObject);
@@ -3732,7 +3821,7 @@ begin
dessin_18(ImagePalette18.canvas,1,1,0); dessin_18(ImagePalette18.canvas,1,1,0);
dessin_19(ImagePalette19.canvas,1,1,0); dessin_19(ImagePalette19.canvas,1,1,0);
dessin_20(ImagePalette20.canvas,1,1,0); dessin_20(ImagePalette20.canvas,1,1,0);
dessin_21(ImagePalette21.canvas,1,1,0); dessin_21(ImagePalette21.canvas,1,1,0);
dessin_22(ImagePalette22.canvas,1,1,0); dessin_22(ImagePalette22.canvas,1,1,0);
dessin_23(ImagePalette23.canvas,1,1,0); dessin_23(ImagePalette23.canvas,1,1,0);
@@ -4412,8 +4501,7 @@ begin
EdittypeImage.Text:=IntToSTR(tco[XClicCell,YClicCell].BImage); EdittypeImage.Text:=IntToSTR(tco[XClicCell,YClicCell].BImage);
end; end;
procedure TFormTCO.ImagePalette22EndDrag(Sender, Target: TObject; X, procedure TFormTCO.ImagePalette22EndDrag(Sender, Target: TObject; X,Y: Integer);
Y: Integer);
begin begin
if not(Target is TImage) then exit; if not(Target is TImage) then exit;
if (Target as TImage).Name<>'ImageTCO' then exit; if (Target as TImage).Name<>'ImageTCO' then exit;
@@ -5058,16 +5146,16 @@ end;
procedure TFormTCO.ButtonSimuClick(Sender: TObject); procedure TFormTCO.ButtonSimuClick(Sender: TObject);
begin begin
aiguillage[Index_Aig(1)].position:=const_droit; aiguillage[Index_Aig(1)].position:=const_droit;
aiguillage[Index_Aig(2)].position:=const_droit; aiguillage[Index_Aig(2)].position:=const_devie;
aiguillage[Index_Aig(3)].position:=const_droit; aiguillage[Index_Aig(3)].position:=const_droit;
aiguillage[Index_Aig(4)].position:=const_devie; aiguillage[Index_Aig(4)].position:=const_devie;
aiguillage[Index_Aig(5)].position:=const_droit; aiguillage[Index_Aig(5)].position:=const_devie;
aiguillage[Index_Aig(7)].position:=const_devie; aiguillage[Index_Aig(7)].position:=const_devie;
aiguillage[Index_Aig(12)].position:=const_droit; aiguillage[Index_Aig(12)].position:=const_devie;
aiguillage[Index_Aig(20)].position:=const_droit; aiguillage[Index_Aig(20)].position:=const_droit;
aiguillage[Index_Aig(21)].position:=const_droit; aiguillage[Index_Aig(21)].position:=const_droit;
aiguillage[Index_Aig(26)].position:=const_droit; aiguillage[Index_Aig(26)].position:=const_devie;
aiguillage[Index_Aig(28)].position:=const_devie; aiguillage[Index_Aig(28)].position:=const_droit;
index_couleur:=1; index_couleur:=1;
aiguillage[Index_Aig(81)].position:=const_droit; aiguillage[Index_Aig(81)].position:=const_droit;
aiguillage[Index_Aig(82)].position:=const_droit; aiguillage[Index_Aig(82)].position:=const_droit;
@@ -5075,9 +5163,9 @@ begin
aiguillage[Index_Aig(119)].position:=const_droit; aiguillage[Index_Aig(119)].position:=const_droit;
aiguillage[Index_Aig(116)].position:=const_droit; aiguillage[Index_Aig(116)].position:=const_droit;
aiguillage[Index_Aig(117)].position:=const_devie; aiguillage[Index_Aig(117)].position:=const_devie;
zone_TCO(530,520,1);
zone_TCO(518,523,1); zone_TCO(515,517,1);
end; end;
procedure TFormTCO.CheckPinvClick(Sender: TObject); procedure TFormTCO.CheckPinvClick(Sender: TObject);
Binary file not shown.
+103
View File
@@ -0,0 +1,103 @@
object FormAig: TFormAig
Left = 400
Top = 204
Width = 363
Height = 204
Caption = 'Pilotage de l'#39'aiguillage'
Color = clMaroon
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
KeyPreview = True
OldCreateOrder = False
OnActivate = FormActivate
OnKeyPress = FormKeyPress
PixelsPerInch = 96
TextHeight = 13
object Label1: TLabel
Left = 80
Top = 8
Width = 173
Height = 23
Caption = 'Pilotage de l'#39'aiguillage'
Font.Charset = ANSI_CHARSET
Font.Color = clWindow
Font.Height = -19
Font.Name = 'Arial Narrow'
Font.Style = [fsBold, fsItalic]
ParentFont = False
end
object LabelAdr1: TLabel
Left = 56
Top = 56
Width = 65
Height = 16
Caption = 'LabelAdr1'
Font.Charset = ANSI_CHARSET
Font.Color = clWindow
Font.Height = -13
Font.Name = 'Arial'
Font.Style = [fsBold]
ParentFont = False
end
object LabelAdr2: TLabel
Left = 224
Top = 56
Width = 65
Height = 16
Caption = 'LabelAdr2'
Font.Charset = ANSI_CHARSET
Font.Color = clWindow
Font.Height = -13
Font.Name = 'Arial'
Font.Style = [fsBold]
ParentFont = False
end
object ButtonOK: TButton
Left = 136
Top = 128
Width = 75
Height = 25
Caption = 'Ok'
ModalResult = 1
TabOrder = 0
end
object ButtonDev: TButton
Left = 8
Top = 88
Width = 75
Height = 25
Caption = 'D'#233'vi'#233
TabOrder = 1
OnClick = ButtonDevClick
end
object ButtonDroit: TButton
Left = 88
Top = 88
Width = 75
Height = 25
Caption = 'Droit'
TabOrder = 2
OnClick = ButtonDroitClick
end
object ButtonDev2: TButton
Left = 184
Top = 88
Width = 75
Height = 25
Caption = 'D'#233'vi'#233
TabOrder = 3
OnClick = ButtonDev2Click
end
object ButtonDroit2: TButton
Left = 264
Top = 88
Width = 75
Height = 25
Caption = 'Droit'
TabOrder = 4
OnClick = ButtonDroit2Click
end
end
+137
View File
@@ -0,0 +1,137 @@
unit Unit_Pilote_aig;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, UnitPrinc, UnitTCO;
type
TFormAig = class(TForm)
ButtonOK: TButton;
Label1: TLabel;
ButtonDev: TButton;
ButtonDroit: TButton;
ButtonDev2: TButton;
ButtonDroit2: TButton;
LabelAdr1: TLabel;
LabelAdr2: TLabel;
procedure FormActivate(Sender: TObject);
procedure ButtonDevClick(Sender: TObject);
procedure ButtonDroitClick(Sender: TObject);
procedure ButtonDev2Click(Sender: TObject);
procedure ButtonDroit2Click(Sender: TObject);
procedure FormKeyPress(Sender: TObject; var Key: Char);
private
{ Déclarations privées }
public
{ Déclarations publiques }
end;
var
FormAig: TFormAig;
aiguille,aiguille2 : integer;
tjdC,aigC : boolean;
implementation
{$R *.dfm}
procedure commande_simple;
begin
with formAig do
begin
LabelAdr2.Visible:=false;
LabelAdr1.Visible:=false;
ButtonDev2.Visible:=false;
ButtonDroit2.Visible:=false;
ButtonOk.Visible:=false;
ButtonDev.Left:=48;
ButtonDroit.Left:=216;
end;
end;
procedure TFormAig.FormActivate(Sender: TObject);
var i : integer;
s : string;
begin
i:=Index_aig(Aiguille);
aigC:=(aiguillage[i].modele=aig);
tjdC:=(aiguillage[i].modele=tjd) or (aiguillage[i].modele=tjs);
if aigC then
begin
s:='Pilotage de l''aiguillage '+intToSTR(aiguille);
commande_simple;
end;
if tjdC then
begin
s:='Pilotage de la TJD '+intToSTR(aiguille);
if aiguillage[i].EtatTJD=4 then
begin
LabelAdr1.Caption:='Adresse1: '+intToSTR(aiguille);
aiguille2:=aiguillage[i].DDevie;
LabelAdr2.Caption:='Adresse2: '+intToSTR(aiguille2);
s:=s+'/'+intToSTR(aiguille2);
LabelAdr2.Visible:=true;
LabelAdr1.Visible:=true;
ButtonDev2.Visible:=true;
ButtonOk.Visible:=true;
ButtonDroit2.Visible:=true;
ButtonDev.Left:=8;
ButtonDroit.Left:=88;
end;
end;
if aiguillage[i].EtatTJD=2 then
begin
commande_simple;
end;
Label1.Caption:=s;
end;
procedure TFormAig.ButtonDevClick(Sender: TObject);
var s : string;
begin
efface_entoure;SelectionAffichee:=false;
pilote_acc(aiguille,const_devie,aigP);
s:='accessoire '+IntToSTR(aiguille)+' dévié';
Affiche(s,clyellow);
if AigC then close;
end;
procedure TFormAig.ButtonDroitClick(Sender: TObject);
var s : string;
begin
efface_entoure;SelectionAffichee:=false;
pilote_acc(aiguille,const_droit,aigP);
s:='accessoire '+IntToSTR(aiguille)+' droit';
Affiche(s,clyellow);
if AigC then close;
end;
procedure TFormAig.ButtonDev2Click(Sender: TObject);
var s : string;
begin
efface_entoure;SelectionAffichee:=false;
pilote_acc(aiguille2,const_devie,aigP);
s:='accessoire '+IntToSTR(aiguille2)+' dévié';
Affiche(s,clyellow);
if AigC then close;
end;
procedure TFormAig.ButtonDroit2Click(Sender: TObject);
var s : string;
begin
efface_entoure;SelectionAffichee:=false;
pilote_acc(aiguille2,const_droit,aigP);
s:='accessoire '+IntToSTR(aiguille2)+' droit';
Affiche(s,clyellow);
if AigC then close;
end;
procedure TFormAig.FormKeyPress(Sender: TObject; var Key: Char);
begin
if key=chr(27) then close;
end;
end.
BIN
View File
Binary file not shown.
+212
View File
@@ -0,0 +1,212 @@
object FormPlace: TFormPlace
Left = 313
Top = 116
BorderStyle = bsDialog
Caption = 'Placement des trains'
ClientHeight = 442
ClientWidth = 307
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
KeyPreview = True
OldCreateOrder = False
OnActivate = FormActivate
OnKeyPress = FormKeyPress
PixelsPerInch = 96
TextHeight = 13
object Label1: TLabel
Left = 32
Top = 8
Width = 229
Height = 20
Caption = 'Placement des trains pour le roulage'
Font.Charset = ANSI_CHARSET
Font.Color = clWindowText
Font.Height = -16
Font.Name = 'Arial Narrow'
Font.Style = [fsBold]
ParentFont = False
end
object LabelTrain1: TLabel
Left = 152
Top = 56
Width = 30
Height = 13
Caption = 'Train1'
end
object LabelTrain2: TLabel
Left = 152
Top = 80
Width = 30
Height = 13
Caption = 'Train2'
end
object LabelTrain3: TLabel
Left = 152
Top = 104
Width = 30
Height = 13
Caption = 'Train3'
end
object LabelTrain4: TLabel
Left = 152
Top = 128
Width = 30
Height = 13
Caption = 'Train4'
end
object LabelTrain5: TLabel
Left = 152
Top = 152
Width = 30
Height = 13
Caption = 'Train5'
end
object LabelTrain6: TLabel
Left = 152
Top = 176
Width = 30
Height = 13
Caption = 'Train7'
end
object Label2: TLabel
Left = 96
Top = 40
Width = 52
Height = 13
Caption = 'D'#233'tecteurs'
end
object LabelTexte: TLabel
Left = 19
Top = 224
Width = 3
Height = 13
end
object Label3: TLabel
Left = 8
Top = 208
Width = 293
Height = 13
Caption = 'Pour ne pas placer un train, mettre 0 en face de son d'#233'tecteur'
end
object Buttonferme: TButton
Left = 16
Top = 400
Width = 75
Height = 25
Caption = 'Fermer'
TabOrder = 0
OnClick = ButtonfermeClick
end
object ButtonInitAig: TButton
Left = 16
Top = 272
Width = 273
Height = 25
Caption = 'Positionner les aiguillages en position initiale'
TabOrder = 1
OnClick = ButtonInitAigClick
end
object ButtonSauve: TButton
Left = 16
Top = 368
Width = 273
Height = 25
Caption = 'Enregistrer la configuration de roulage'
TabOrder = 2
OnClick = ButtonSauveClick
end
object Edit1: TEdit
Left = 96
Top = 56
Width = 49
Height = 21
TabOrder = 3
OnChange = Edit1Change
end
object Edit2: TEdit
Left = 96
Top = 80
Width = 49
Height = 21
TabOrder = 4
OnChange = Edit2Change
end
object Edit3: TEdit
Left = 96
Top = 104
Width = 49
Height = 21
TabOrder = 5
OnChange = Edit3Change
end
object Edit4: TEdit
Left = 96
Top = 128
Width = 49
Height = 21
TabOrder = 6
OnChange = Edit4Change
end
object Edit5: TEdit
Left = 96
Top = 152
Width = 49
Height = 21
TabOrder = 7
OnChange = Edit5Change
end
object Edit6: TEdit
Left = 96
Top = 176
Width = 49
Height = 21
TabOrder = 8
OnChange = Edit6Change
end
object ButtonPlace: TButton
Left = 16
Top = 240
Width = 273
Height = 25
Caption = 'Placer les trains sur les d'#233'tecteurs ci-dessus'
TabOrder = 9
OnClick = ButtonPlaceClick
end
object ButtonLanceRoutage: TButton
Left = 16
Top = 304
Width = 273
Height = 25
Caption = 'Lancer le roulage'
Font.Charset = DEFAULT_CHARSET
Font.Color = clInfoText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = [fsBold]
ParentFont = False
TabOrder = 10
OnClick = ButtonLanceRoutageClick
end
object Button1: TButton
Left = 208
Top = 400
Width = 81
Height = 25
Caption = 'Config trains'
TabOrder = 11
OnClick = Button1Click
end
object ButtonArretroutage: TButton
Left = 16
Top = 336
Width = 273
Height = 25
Caption = 'Arr'#234't du roulage'
TabOrder = 12
OnClick = ButtonArretroutageClick
end
end
+368
View File
@@ -0,0 +1,368 @@
unit Unitplace;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, unitprinc;
type
TFormPlace = class(TForm)
Buttonferme: TButton;
Label1: TLabel;
ButtonInitAig: TButton;
ButtonSauve: TButton;
LabelTrain1: TLabel;
LabelTrain2: TLabel;
LabelTrain3: TLabel;
LabelTrain4: TLabel;
LabelTrain5: TLabel;
Edit1: TEdit;
Edit2: TEdit;
Edit3: TEdit;
Edit4: TEdit;
Edit5: TEdit;
LabelTrain6: TLabel;
Edit6: TEdit;
Label2: TLabel;
ButtonPlace: TButton;
LabelTexte: TLabel;
Label3: TLabel;
ButtonLanceRoutage: TButton;
Button1: TButton;
ButtonArretroutage: TButton;
procedure ButtonfermeClick(Sender: TObject);
procedure ButtonInitAigClick(Sender: TObject);
procedure FormActivate(Sender: TObject);
procedure ButtonPlaceClick(Sender: TObject);
procedure Edit1Change(Sender: TObject);
procedure Edit2Change(Sender: TObject);
procedure Edit3Change(Sender: TObject);
procedure Edit4Change(Sender: TObject);
procedure Edit5Change(Sender: TObject);
procedure Edit6Change(Sender: TObject);
procedure Button1Click(Sender: TObject);
procedure ButtonSauveClick(Sender: TObject);
procedure FormKeyPress(Sender: TObject; var Key: Char);
procedure ButtonLanceRoutageClick(Sender: TObject);
procedure ButtonArretroutageClick(Sender: TObject);
private
{ Déclarations privées }
public
{ Déclarations publiques }
end;
var
FormPlace: TFormPlace;
implementation
uses UnitConfig, UnitTCO;
{$R *.dfm}
procedure TFormPlace.ButtonfermeClick(Sender: TObject);
begin
close;
end;
procedure TFormPlace.ButtonInitAigClick(Sender: TObject);
begin
if cdm_connecte then
begin
Affiche('Placement des trains incompatible en mode CDM rail',clOrange);
exit;
end;
ButtonLanceRoutage.Enabled:=false;
init_aiguillages;
ButtonLanceRoutage.Enabled:=true;
end;
procedure TFormPlace.FormActivate(Sender: TObject);
var i : integer;
begin
LabelTrain1.Caption:=trains[1].nom_train;
Edit1.text:=intToSTR(placement[1].detecteur);
LabelTrain2.Caption:=trains[2].nom_train;
Edit2.text:=intToSTR(placement[2].detecteur);
LabelTrain3.Caption:=trains[3].nom_train;
Edit3.text:=intToSTR(placement[3].detecteur);
LabelTrain4.Caption:=trains[4].nom_train;
Edit4.text:=intToSTR(placement[4].detecteur);
LabelTrain5.Caption:=trains[5].nom_train;
Edit5.text:=intToSTR(placement[5].detecteur);
LabelTrain6.Caption:=trains[6].nom_train;
Edit6.text:=intToSTR(placement[6].detecteur);
end;
procedure TFormPlace.ButtonPlaceClick(Sender: TObject);
var detect,erreur : integer;
s : string;
begin
if cdm_connecte then
begin
Affiche('Placement des trains incompatible en mode CDM rail',clOrange);
exit;
end;
s:=edit1.Text;
if s<>'' then
begin
val(s,detect,erreur);
if (erreur<>0) or (detect>NbMemZone )then LabelTexte.caption:='Erreur détecteur train 1';
if detect<>0 then
begin
detecteur[detect].adrTrain:=trains[1].adresse;
event_detecteur(detect,true,trains[1].nom_train);
Affiche('Positionnement train '+detecteur[detect].train+' sur détecteur '+intToSTR(detect),clLime);
end
else
begin
detecteur[detect].etat:=false;
detecteur[detect].train:='';
detecteur[detect].adrTrain:=0;
end;
end;
s:=edit2.Text;
if s<>'' then
begin
val(s,detect,erreur);
if (erreur<>0) or (detect>NbMemZone )then LabelTexte.caption:='Erreur détecteur train 2';
if detect<>0 then
begin
detecteur[detect].adrTrain:=trains[2].adresse;
event_detecteur(detect,true,trains[2].nom_train);
Affiche('Positionnement train '+detecteur[detect].train+' sur détecteur '+intToSTR(detect),clLime);
end
else
begin
detecteur[detect].etat:=false;
detecteur[detect].train:='';
detecteur[detect].adrTrain:=0;
end;
end;
s:=edit3.Text;
if s<>'' then
begin
val(s,detect,erreur);
if (erreur<>0) or (detect>NbMemZone )then LabelTexte.caption:='Erreur détecteur train 3';
if detect<>0 then
begin
detecteur[detect].adrTrain:=trains[3].adresse;
event_detecteur(detect,true,trains[3].nom_train);
Affiche('Positionnement train '+detecteur[detect].train+' sur détecteur '+intToSTR(detect),clLime);
end
else
begin
detecteur[detect].etat:=false;
detecteur[detect].train:='';
detecteur[detect].adrTrain:=0;
end;
end;
s:=edit4.Text;
if s<>'' then
begin
val(s,detect,erreur);
if (erreur<>0) or (detect>NbMemZone )then LabelTexte.caption:='Erreur détecteur train 4';
if detect<>0 then
begin
detecteur[detect].adrTrain:=trains[4].adresse;
event_detecteur(detect,true,trains[4].nom_train);
Affiche('Positionnement train '+detecteur[detect].train+' sur détecteur '+intToSTR(detect),clLime);
end
else
begin
detecteur[detect].etat:=false;
detecteur[detect].train:='';
detecteur[detect].adrTrain:=0;
end;
end;
s:=edit5.Text;
if s<>'' then
begin
val(s,detect,erreur);
if (erreur<>0) or (detect>NbMemZone )then LabelTexte.caption:='Erreur détecteur train 5';
if detect<>0 then
begin
detecteur[detect].adrTrain:=trains[5].adresse;
event_detecteur(detect,true,trains[5].nom_train);
Affiche('Positionnement train '+detecteur[detect].train+' sur détecteur '+intToSTR(detect),clLime);
end
else
begin
detecteur[detect].etat:=false;
detecteur[detect].train:='';
detecteur[detect].adrTrain:=0;
end;
end;
s:=edit6.Text;
if s<>'' then
begin
val(s,detect,erreur);
if (erreur<>0) or (detect>NbMemZone )then LabelTexte.caption:='Erreur détecteur train 6';
if detect<>0 then
begin
detecteur[detect].adrTrain:=trains[6].adresse;
event_detecteur(detect,true,trains[6].nom_train);
Affiche('Positionnement train '+detecteur[detect].train+' sur détecteur '+intToSTR(detect),clLime);
end
else
begin
detecteur[detect].etat:=false;
detecteur[detect].train:='';
detecteur[detect].adrTrain:=0;
end;
end;
if formTCO.Showing then
begin
affiche_tco;
end;
end;
procedure TFormPlace.Edit1Change(Sender: TObject);
var i,erreur : integer;
begin
val(edit1.Text,i,erreur);
if erreur<>0 then exit;
if index_adresse_detecteur(i)=0 then
begin
LabelTexte.caption:='Détecteur '+intToSTR(i)+' inexistant';
exit;
end;
labelTexte.caption:='';
placement[1].train:=trains[1].nom_train;
placement[1].detecteur:=i;
end;
procedure TFormPlace.Edit2Change(Sender: TObject);
var i,erreur : integer;
begin
val(edit2.Text,i,erreur);
if erreur<>0 then exit;
if index_adresse_detecteur(i)=0 then
begin
LabelTexte.caption:='Détecteur '+intToSTR(i)+' inexistant';
exit;
end;
labelTexte.caption:='';
placement[2].train:=trains[2].nom_train;
placement[2].detecteur:=i;
end;
procedure TFormPlace.Edit3Change(Sender: TObject);
var i,erreur : integer;
begin
val(edit3.Text,i,erreur);
if erreur<>0 then exit;
if index_adresse_detecteur(i)=0 then
begin
LabelTexte.caption:='Détecteur '+intToSTR(i)+' inexistant';
exit;
end;
labelTexte.caption:='';
placement[3].train:=trains[3].nom_train;
placement[3].detecteur:=i;
end;
procedure TFormPlace.Edit4Change(Sender: TObject);
var i,erreur : integer;
begin
val(edit4.Text,i,erreur);
if erreur<>0 then exit;
if index_adresse_detecteur(i)=0 then
begin
LabelTexte.caption:='Détecteur '+intToSTR(i)+' inexistant';
exit;
end;
labelTexte.caption:='';
placement[4].train:=trains[4].nom_train;
placement[4].detecteur:=i;
end;
procedure TFormPlace.Edit5Change(Sender: TObject);
var i,erreur : integer;
begin
val(edit5.Text,i,erreur);
if erreur<>0 then exit;
if index_adresse_detecteur(i)=0 then
begin
LabelTexte.caption:='Détecteur '+intToSTR(i)+' inexistant';
exit;
end;
labelTexte.caption:='';
placement[5].train:=trains[5].nom_train;
placement[5].detecteur:=i;
end;
procedure TFormPlace.Edit6Change(Sender: TObject);
var i,erreur : integer;
begin
val(edit6.Text,i,erreur);
if erreur<>0 then exit;
if index_adresse_detecteur(i)=0 then
begin
LabelTexte.caption:='Détecteur '+intToSTR(i)+' inexistant';
exit;
end;
labelTexte.caption:='';
placement[6].train:=trains[6].nom_train;
placement[6].detecteur:=i;
end;
procedure TFormPlace.Button1Click(Sender: TObject);
begin
formconfig.PageControl.ActivePage:=formconfig.TabSheetTrains;
formconfig.showmodal;
formconfig.Close;
end;
procedure TFormPlace.ButtonSauveClick(Sender: TObject);
begin
sauve_config;
end;
procedure TFormPlace.FormKeyPress(Sender: TObject; var Key: Char);
begin
if key=chr(27) then close;
end;
procedure TFormPlace.ButtonLanceRoutageClick(Sender: TObject);
var i,j,adrDet,AdrTrain : integer;
trouve : boolean;
begin
if cdm_connecte then
begin
Affiche('Placement des trains incompatible en mode CDM rail',clOrange);
exit;
end;
trouve:=false;
for i:=1 to NDetecteurs do
begin
adrDet:=Adresse_detecteur[i];
if Detecteur[adrDet].etat and (detecteur[adrDet].train<>'') then
begin
Affiche('Lancement du train '+detecteur[adrDet].train+' depuis détecteur '+intToSTR(adrDet),clYellow);
AdrTrain:=detecteur[AdrDet].AdrTrain;
j:=index_train_adresse(AdrTrain);
vitesse_loco('',adrTrain,trains[j].VitNominale,true);
trouve:=true;
end;
end;
if not(trouve) then Affiche('Pas de train placé',clOrange);
end;
procedure TFormPlace.ButtonArretroutageClick(Sender: TObject);
var i : integer;
begin
roulage:=false;
Affiche('Arrêt du roulage de tous les trains',clorange);
for i:=1 to ntrains do
vitesse_loco('',trains[i].adresse,0,true);
end;
end.
BIN
View File
Binary file not shown.
+7 -9
View File
@@ -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 , ComCtrls ,WinInet, ExtCtrls , StrUtils; Dialogs, StdCtrls , ComCtrls ,WinInet, ExtCtrls , StrUtils, unitPrinc;
type type
TFormVersion = class(TForm) TFormVersion = class(TForm)
@@ -23,13 +23,11 @@ var
Lance_verif : integer; Lance_verif : integer;
verifVersion,notificationVersion : boolean; verifVersion,notificationVersion : boolean;
Const Version='5.1'; // sert à la comparaison de la version publiée Const Version='5.2'; // 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
uses UnitPrinc;
{$R *.dfm} {$R *.dfm}
Procedure Aff(s : string); Procedure Aff(s : string);
@@ -130,8 +128,8 @@ begin
begin begin
i:=pos('version ',s); i:=pos('version ',s);
trouve_version:=i<>0; trouve_version:=i<>0;
if trouve_version then if trouve_version then
begin begin
s2:=s;zone_comm:=true; s2:=s;zone_comm:=true;
//Affiche('trouvé version',clOrange); //Affiche('trouvé version',clOrange);
end; end;
@@ -141,8 +139,8 @@ begin
i:=pos('.zip',s); i:=pos('.zip',s);
trouve_zip:=i<>0; trouve_zip:=i<>0;
//if trouve_zip then Affiche(s,clyellow); //if trouve_zip then Affiche(s,clyellow);
if trouve_zip then if trouve_zip then
begin begin
s3:=s; s3:=s;
//zone_comm:=false; //zone_comm:=false;
end; end;
@@ -177,7 +175,7 @@ begin
end; end;
end; end;
closefile(fichier); closefile(fichier);
if trouve_version and trouve_zip then if trouve_version and trouve_zip then
begin begin
// isoler le champ version // isoler le champ version
+6 -1
View File
@@ -129,4 +129,9 @@ version 5.1 : Gestion d
Gestion ports COM>10 Gestion ports COM>10
Ajout fonctions ajouter/supprimer lignes/colonnes dans le TCO Ajout fonctions ajouter/supprimer lignes/colonnes dans le TCO
Gestion protocole DCC++ Gestion protocole DCC++
version 5.2 : Nouvel algorithme pour le décodeur digikeijs 4018
Déclaration des trains en mode autonome
Suivi des trains sur les détecteurs enclenchés en mode autonome
Fermeture des fenêtres secondaires par appui sur Esc/Echap
Correction bug ouverture des PN par actionneurs