diff --git a/Importation.dfm b/Importation.dfm index 552adde..3dc41cf 100644 --- a/Importation.dfm +++ b/Importation.dfm @@ -11,6 +11,7 @@ object FormImportation: TFormImportation Font.Name = 'MS Sans Serif' Font.Style = [] OldCreateOrder = False + Position = poMainFormCenter OnCreate = FormCreate PixelsPerInch = 96 TextHeight = 13 diff --git a/Notice d'utilisation des signaux_complexes_GL_V8.4.pdf b/Notice d'utilisation des signaux_complexes_GL_V8.41.pdf similarity index 77% rename from Notice d'utilisation des signaux_complexes_GL_V8.4.pdf rename to Notice d'utilisation des signaux_complexes_GL_V8.41.pdf index 4a4c2a0..3f22c05 100644 Binary files a/Notice d'utilisation des signaux_complexes_GL_V8.4.pdf and b/Notice d'utilisation des signaux_complexes_GL_V8.41.pdf differ diff --git a/Signaux_complexes_GL.cfg b/Signaux_complexes_GL.cfg index bcc5ab2..8d97c47 100644 --- a/Signaux_complexes_GL.cfg +++ b/Signaux_complexes_GL.cfg @@ -14,8 +14,8 @@ -$N+ -$O- -$P+ --$Q+ --$R+ +-$Q- +-$R- -$S- -$T- -$U- diff --git a/Signaux_complexes_GL.dof b/Signaux_complexes_GL.dof index 454559d..5ccec48 100644 --- a/Signaux_complexes_GL.dof +++ b/Signaux_complexes_GL.dof @@ -17,8 +17,8 @@ M=0 N=1 O=0 P=1 -Q=1 -R=1 +Q=0 +R=0 S=0 T=0 U=0 diff --git a/Signaux_complexes_GL.dpr b/Signaux_complexes_GL.dpr index 7602ce3..754fd43 100644 --- a/Signaux_complexes_GL.dpr +++ b/Signaux_complexes_GL.dpr @@ -23,6 +23,7 @@ uses begin // la form TCO ne doit pas etre créée ici!! Application.Initialize; + Application.Title := 'Signaux complexes GL'; Application.CreateForm(TFormPrinc, FormPrinc); Application.CreateForm(TFormVersion, FormVersion); Application.CreateForm(TFormPilote, FormPilote); diff --git a/Signaux_complexes_GL.exe b/Signaux_complexes_GL.exe deleted file mode 100644 index d7cc07e..0000000 Binary files a/Signaux_complexes_GL.exe and /dev/null differ diff --git a/Signaux_complexes_GL.map b/Signaux_complexes_GL.map index 1acdc49..84c2cec 100644 --- a/Signaux_complexes_GL.map +++ b/Signaux_complexes_GL.map @@ -1,8 +1,8 @@ Start Length Name Class - 0001:00000000 001AA234H .text CODE - 0002:00000000 00002C54H .data DATA - 0002:00002C54 045E3389H .bss BSS + 0001:00000000 00193814H .text CODE + 0002:00000000 00002C58H .data DATA + 0002:00002C58 045E3399H .bss BSS Detailed map of segments @@ -10,95 +10,95 @@ Detailed map of segments 0001:00000000 00005EC7 C=CODE S=.text G=(none) M=System ACBP=A9 0001:00005EC8 00000140 C=CODE S=.text G=(none) M=SysInit ACBP=A9 0001:00006008 00000108 C=CODE S=.text G=(none) M=Types ACBP=A9 - 0001:00006110 00000F08 C=CODE S=.text G=(none) M=Windows ACBP=A9 - 0001:00007018 00000038 C=CODE S=.text G=(none) M=Messages ACBP=A9 - 0001:00007050 00000338 C=CODE S=.text G=(none) M=SysConst ACBP=A9 - 0001:00007388 00006E28 C=CODE S=.text G=(none) M=SysUtils ACBP=A9 - 0001:0000E1B0 0000081B C=CODE S=.text G=(none) M=VarUtils ACBP=A9 - 0001:0000E9CC 0000809A C=CODE S=.text G=(none) M=Variants ACBP=A9 - 0001:00016A68 000001A0 C=CODE S=.text G=(none) M=RTLConsts ACBP=A9 - 0001:00016C08 0000083C C=CODE S=.text G=(none) M=TypInfo ACBP=A9 - 0001:00017444 00000358 C=CODE S=.text G=(none) M=ActiveX ACBP=A9 - 0001:0001779C 0000A7EA C=CODE S=.text G=(none) M=Classes ACBP=A9 - 0001:00021F88 00000370 C=CODE S=.text G=(none) M=Consts ACBP=A9 - 0001:000222F8 00009BFB C=CODE S=.text G=(none) M=Graphics ACBP=A9 - 0001:0002BEF4 00000124 C=CODE S=.text G=(none) M=Math ACBP=A9 - 0001:0002C018 000002B8 C=CODE S=.text G=(none) M=Contnrs ACBP=A9 - 0001:0002C2D0 00000198 C=CODE S=.text G=(none) M=CommCtrl ACBP=A9 - 0001:0002C468 00000787 C=CODE S=.text G=(none) M=MultiMon ACBP=A9 - 0001:0002CBF0 00000038 C=CODE S=.text G=(none) M=Imm ACBP=A9 - 0001:0002CC28 00000FF8 C=CODE S=.text G=(none) M=HelpIntfs ACBP=A9 - 0001:0002DC20 00000058 C=CODE S=.text G=(none) M=WinSpool ACBP=A9 - 0001:0002DC78 000010C8 C=CODE S=.text G=(none) M=Printers ACBP=A9 - 0001:0002ED40 0000031F C=CODE S=.text G=(none) M=FlatSB ACBP=A9 - 0001:0002F060 000003F0 C=CODE S=.text G=(none) M=SyncObjs ACBP=A9 - 0001:0002F450 000009BB C=CODE S=.text G=(none) M=UxTheme ACBP=A9 - 0001:0002FE0C 00000038 C=CODE S=.text G=(none) M=RichEdit ACBP=A9 - 0001:0002FE44 00000038 C=CODE S=.text G=(none) M=ToolWin ACBP=A9 - 0001:0002FE7C 00000040 C=CODE S=.text G=(none) M=ShellAPI ACBP=A9 - 0001:0002FEBC 00000038 C=CODE S=.text G=(none) M=RegStr ACBP=A9 - 0001:0002FEF4 00000058 C=CODE S=.text G=(none) M=WinInet ACBP=A9 - 0001:0002FF4C 00000038 C=CODE S=.text G=(none) M=UrlMon ACBP=A9 - 0001:0002FF84 0000006C C=CODE S=.text G=(none) M=ShlObj ACBP=A9 - 0001:0002FFF0 00000060 C=CODE S=.text G=(none) M=CommDlg ACBP=A9 - 0001:00030050 00000038 C=CODE S=.text G=(none) M=Dlgs ACBP=A9 - 0001:00030088 000036D1 C=CODE S=.text G=(none) M=Dialogs ACBP=A9 - 0001:0003375C 00004ADA C=CODE S=.text G=(none) M=ExtCtrls ACBP=A9 - 0001:00038238 00000090 C=CODE S=.text G=(none) M=ComStrs ACBP=A9 - 0001:000382C8 000007A0 C=CODE S=.text G=(none) M=Clipbrd ACBP=A9 - 0001:00038A68 00000128 C=CODE S=.text G=(none) M=StrUtils ACBP=A9 - 0001:00038B90 00003821 C=CODE S=.text G=(none) M=Buttons ACBP=A9 - 0001:0003C3B4 00000038 C=CODE S=.text G=(none) M=ExtDlgs ACBP=A9 - 0001:0003C3EC 00000068 C=CODE S=.text G=(none) M=IniFiles ACBP=A9 - 0001:0003C454 00000068 C=CODE S=.text G=(none) M=Registry ACBP=A9 - 0001:0003C4BC 0000006C C=CODE S=.text G=(none) M=Mapi ACBP=A9 - 0001:0003C528 00000058 C=CODE S=.text G=(none) M=ExtActns ACBP=A9 - 0001:0003C580 00000038 C=CODE S=.text G=(none) M=ListActns ACBP=A9 - 0001:0003C5B8 00009948 C=CODE S=.text G=(none) M=ComCtrls ACBP=A9 - 0001:00045F00 00000EA0 C=CODE S=.text G=(none) M=Themes ACBP=A9 - 0001:00046DA0 0000C698 C=CODE S=.text G=(none) M=StdCtrls ACBP=A9 - 0001:00053438 00000168 C=CODE S=.text G=(none) M=StdActns ACBP=A9 - 0001:000535A0 00000D1F C=CODE S=.text G=(none) M=WinHelpViewer ACBP=A9 - 0001:000542C0 00011403 C=CODE S=.text G=(none) M=Controls ACBP=A9 - 0001:000656C4 00001292 C=CODE S=.text G=(none) M=ActnList ACBP=A9 - 0001:00066958 00001B9C C=CODE S=.text G=(none) M=ImgList ACBP=A9 - 0001:000684F4 000066E1 C=CODE S=.text G=(none) M=Menus ACBP=A9 - 0001:0006EBD8 0000CEFC C=CODE S=.text G=(none) M=Forms ACBP=A9 - 0001:0007BAD4 00000060 C=CODE S=.text G=(none) M=ComConst ACBP=A9 - 0001:0007BB34 00001259 C=CODE S=.text G=(none) M=ComObj ACBP=A9 - 0001:0007CD90 00000038 C=CODE S=.text G=(none) M=StdVCL ACBP=A9 - 0001:0007CDC8 00001793 C=CODE S=.text G=(none) M=AxCtrls ACBP=A9 - 0001:0007E55C 00000060 C=CODE S=.text G=(none) M=OleConst ACBP=A9 - 0001:0007E5BC 00003519 C=CODE S=.text G=(none) M=OleCtrls ACBP=A9 - 0001:00081AD8 00000050 C=CODE S=.text G=(none) M=JConsts ACBP=A9 - 0001:00081B28 000133EC C=CODE S=.text G=(none) M=jpeg ACBP=A9 - 0001:00094F14 00000314 C=CODE S=.text G=(none) M=TlHelp32 ACBP=A9 - 0001:00095228 00000128 C=CODE S=.text G=(none) M=WinSock ACBP=A9 - 0001:00095350 00003A78 C=CODE S=.text G=(none) M=ScktComp ACBP=A9 - 0001:00098DC8 000008EA C=CODE S=.text G=(none) M=OleServer ACBP=A9 - 0001:000996B4 00000598 C=CODE S=.text G=(none) M=MSCommLib_TLB ACBP=A9 - 0001:00099C4C 00000040 C=CODE S=.text G=(none) M=MMSystem ACBP=A9 - 0001:00099C8C 00000038 C=CODE S=.text G=(none) M=Nb30 ACBP=A9 - 0001:00099CC4 00000A18 C=CODE S=.text G=(none) M=MaskUtils ACBP=A9 - 0001:0009A6DC 00002108 C=CODE S=.text G=(none) M=Mask ACBP=A9 - 0001:0009C7E4 0000924C C=CODE S=.text G=(none) M=Grids ACBP=A9 - 0001:000A5A30 000019A8 C=CODE S=.text G=(none) M=UnitPilote ACBP=A9 - 0001:000A73D8 00000574 C=CODE S=.text G=(none) M=Importation ACBP=A9 - 0001:000A794C 000192B0 C=CODE S=.text G=(none) M=UnitAnalyseSegCDM ACBP=A9 - 0001:000C0BFC 00002D2C C=CODE S=.text G=(none) M=UnitConfigTCO ACBP=A9 - 0001:000C3928 00000D10 C=CODE S=.text G=(none) M=Unit_Pilote_aig ACBP=A9 - 0001:000C4638 00004DE4 C=CODE S=.text G=(none) M=UnitConfigCellTCO ACBP=A9 - 0001:000C941C 0004587C C=CODE S=.text G=(none) M=UnitTCO ACBP=A9 - 0001:0010EC98 000031F0 C=CODE S=.text G=(none) M=UnitSR ACBP=A9 - 0001:00111E88 00002950 C=CODE S=.text G=(none) M=UnitCDF ACBP=A9 - 0001:001147D8 00044EF4 C=CODE S=.text G=(none) M=UnitConfig ACBP=A9 - 0001:001596CC 00001857 C=CODE S=.text G=(none) M=verif_version ACBP=A9 - 0001:0015AF24 000011D0 C=CODE S=.text G=(none) M=UnitPareFeu ACBP=A9 - 0001:0015C0F4 00002BC8 C=CODE S=.text G=(none) M=UnitDebug ACBP=A9 - 0001:0015ECBC 00000D2C C=CODE S=.text G=(none) M=UnitSimule ACBP=A9 - 0001:0015F9E8 00002688 C=CODE S=.text G=(none) M=Unitplace ACBP=A9 - 0001:00162070 00047D34 C=CODE S=.text G=(none) M=UnitPrinc ACBP=A9 - 0001:001A9DA4 0000048D C=CODE S=.text G=(none) M=Signaux_complexes_GL ACBP=A9 + 0001:00006110 00000F10 C=CODE S=.text G=(none) M=Windows ACBP=A9 + 0001:00007020 00000038 C=CODE S=.text G=(none) M=Messages ACBP=A9 + 0001:00007058 00000338 C=CODE S=.text G=(none) M=SysConst ACBP=A9 + 0001:00007390 00006E28 C=CODE S=.text G=(none) M=SysUtils ACBP=A9 + 0001:0000E1B8 0000081B C=CODE S=.text G=(none) M=VarUtils ACBP=A9 + 0001:0000E9D4 0000809A C=CODE S=.text G=(none) M=Variants ACBP=A9 + 0001:00016A70 000001A0 C=CODE S=.text G=(none) M=RTLConsts ACBP=A9 + 0001:00016C10 0000083C C=CODE S=.text G=(none) M=TypInfo ACBP=A9 + 0001:0001744C 00000358 C=CODE S=.text G=(none) M=ActiveX ACBP=A9 + 0001:000177A4 0000A7EA C=CODE S=.text G=(none) M=Classes ACBP=A9 + 0001:00021F90 00000370 C=CODE S=.text G=(none) M=Consts ACBP=A9 + 0001:00022300 00009BFB C=CODE S=.text G=(none) M=Graphics ACBP=A9 + 0001:0002BEFC 00000124 C=CODE S=.text G=(none) M=Math ACBP=A9 + 0001:0002C020 000002B8 C=CODE S=.text G=(none) M=Contnrs ACBP=A9 + 0001:0002C2D8 00000198 C=CODE S=.text G=(none) M=CommCtrl ACBP=A9 + 0001:0002C470 00000787 C=CODE S=.text G=(none) M=MultiMon ACBP=A9 + 0001:0002CBF8 00000038 C=CODE S=.text G=(none) M=Imm ACBP=A9 + 0001:0002CC30 00000FF8 C=CODE S=.text G=(none) M=HelpIntfs ACBP=A9 + 0001:0002DC28 00000058 C=CODE S=.text G=(none) M=WinSpool ACBP=A9 + 0001:0002DC80 000010C8 C=CODE S=.text G=(none) M=Printers ACBP=A9 + 0001:0002ED48 0000031F C=CODE S=.text G=(none) M=FlatSB ACBP=A9 + 0001:0002F068 000003F0 C=CODE S=.text G=(none) M=SyncObjs ACBP=A9 + 0001:0002F458 000009BB C=CODE S=.text G=(none) M=UxTheme ACBP=A9 + 0001:0002FE14 00000038 C=CODE S=.text G=(none) M=RichEdit ACBP=A9 + 0001:0002FE4C 00000038 C=CODE S=.text G=(none) M=ToolWin ACBP=A9 + 0001:0002FE84 00000040 C=CODE S=.text G=(none) M=ShellAPI ACBP=A9 + 0001:0002FEC4 00000038 C=CODE S=.text G=(none) M=RegStr ACBP=A9 + 0001:0002FEFC 00000058 C=CODE S=.text G=(none) M=WinInet ACBP=A9 + 0001:0002FF54 00000038 C=CODE S=.text G=(none) M=UrlMon ACBP=A9 + 0001:0002FF8C 0000006C C=CODE S=.text G=(none) M=ShlObj ACBP=A9 + 0001:0002FFF8 00000060 C=CODE S=.text G=(none) M=CommDlg ACBP=A9 + 0001:00030058 00000038 C=CODE S=.text G=(none) M=Dlgs ACBP=A9 + 0001:00030090 000036D1 C=CODE S=.text G=(none) M=Dialogs ACBP=A9 + 0001:00033764 00004ADA C=CODE S=.text G=(none) M=ExtCtrls ACBP=A9 + 0001:00038240 00000090 C=CODE S=.text G=(none) M=ComStrs ACBP=A9 + 0001:000382D0 000007A0 C=CODE S=.text G=(none) M=Clipbrd ACBP=A9 + 0001:00038A70 00000128 C=CODE S=.text G=(none) M=StrUtils ACBP=A9 + 0001:00038B98 00003821 C=CODE S=.text G=(none) M=Buttons ACBP=A9 + 0001:0003C3BC 00000038 C=CODE S=.text G=(none) M=ExtDlgs ACBP=A9 + 0001:0003C3F4 00000068 C=CODE S=.text G=(none) M=IniFiles ACBP=A9 + 0001:0003C45C 00000068 C=CODE S=.text G=(none) M=Registry ACBP=A9 + 0001:0003C4C4 0000006C C=CODE S=.text G=(none) M=Mapi ACBP=A9 + 0001:0003C530 00000058 C=CODE S=.text G=(none) M=ExtActns ACBP=A9 + 0001:0003C588 00000038 C=CODE S=.text G=(none) M=ListActns ACBP=A9 + 0001:0003C5C0 00009948 C=CODE S=.text G=(none) M=ComCtrls ACBP=A9 + 0001:00045F08 00000EA0 C=CODE S=.text G=(none) M=Themes ACBP=A9 + 0001:00046DA8 0000C698 C=CODE S=.text G=(none) M=StdCtrls ACBP=A9 + 0001:00053440 00000168 C=CODE S=.text G=(none) M=StdActns ACBP=A9 + 0001:000535A8 00000D1F C=CODE S=.text G=(none) M=WinHelpViewer ACBP=A9 + 0001:000542C8 00011403 C=CODE S=.text G=(none) M=Controls ACBP=A9 + 0001:000656CC 00001292 C=CODE S=.text G=(none) M=ActnList ACBP=A9 + 0001:00066960 00001B9C C=CODE S=.text G=(none) M=ImgList ACBP=A9 + 0001:000684FC 000066E1 C=CODE S=.text G=(none) M=Menus ACBP=A9 + 0001:0006EBE0 0000CF8C C=CODE S=.text G=(none) M=Forms ACBP=A9 + 0001:0007BB6C 00000060 C=CODE S=.text G=(none) M=ComConst ACBP=A9 + 0001:0007BBCC 00001259 C=CODE S=.text G=(none) M=ComObj ACBP=A9 + 0001:0007CE28 00000038 C=CODE S=.text G=(none) M=StdVCL ACBP=A9 + 0001:0007CE60 00001793 C=CODE S=.text G=(none) M=AxCtrls ACBP=A9 + 0001:0007E5F4 00000060 C=CODE S=.text G=(none) M=OleConst ACBP=A9 + 0001:0007E654 00003519 C=CODE S=.text G=(none) M=OleCtrls ACBP=A9 + 0001:00081B70 00000050 C=CODE S=.text G=(none) M=JConsts ACBP=A9 + 0001:00081BC0 000133EC C=CODE S=.text G=(none) M=jpeg ACBP=A9 + 0001:00094FAC 00000314 C=CODE S=.text G=(none) M=TlHelp32 ACBP=A9 + 0001:000952C0 00000128 C=CODE S=.text G=(none) M=WinSock ACBP=A9 + 0001:000953E8 00003A78 C=CODE S=.text G=(none) M=ScktComp ACBP=A9 + 0001:00098E60 000008EA C=CODE S=.text G=(none) M=OleServer ACBP=A9 + 0001:0009974C 00000598 C=CODE S=.text G=(none) M=MSCommLib_TLB ACBP=A9 + 0001:00099CE4 00000040 C=CODE S=.text G=(none) M=MMSystem ACBP=A9 + 0001:00099D24 00000038 C=CODE S=.text G=(none) M=Nb30 ACBP=A9 + 0001:00099D5C 00000A18 C=CODE S=.text G=(none) M=MaskUtils ACBP=A9 + 0001:0009A774 00002108 C=CODE S=.text G=(none) M=Mask ACBP=A9 + 0001:0009C87C 0000924C C=CODE S=.text G=(none) M=Grids ACBP=A9 + 0001:000A5AC8 0000191C C=CODE S=.text G=(none) M=UnitPilote ACBP=A9 + 0001:000A73E4 00000574 C=CODE S=.text G=(none) M=Importation ACBP=A9 + 0001:000A7958 000192C0 C=CODE S=.text G=(none) M=UnitAnalyseSegCDM ACBP=A9 + 0001:000C0C18 00002D2C C=CODE S=.text G=(none) M=UnitConfigTCO ACBP=A9 + 0001:000C3944 00000D10 C=CODE S=.text G=(none) M=Unit_Pilote_aig ACBP=A9 + 0001:000C4654 00004F10 C=CODE S=.text G=(none) M=UnitConfigCellTCO ACBP=A9 + 0001:000C9564 00045880 C=CODE S=.text G=(none) M=UnitTCO ACBP=A9 + 0001:0010EDE4 000031F0 C=CODE S=.text G=(none) M=UnitSR ACBP=A9 + 0001:00111FD4 00002950 C=CODE S=.text G=(none) M=UnitCDF ACBP=A9 + 0001:00114924 0003ADE0 C=CODE S=.text G=(none) M=UnitConfig ACBP=A9 + 0001:0014F704 00001863 C=CODE S=.text G=(none) M=verif_version ACBP=A9 + 0001:00150F68 000011D0 C=CODE S=.text G=(none) M=UnitPareFeu ACBP=A9 + 0001:00152138 00002B74 C=CODE S=.text G=(none) M=UnitDebug ACBP=A9 + 0001:00154CAC 00000D2C C=CODE S=.text G=(none) M=UnitSimule ACBP=A9 + 0001:001559D8 0000269C C=CODE S=.text G=(none) M=Unitplace ACBP=A9 + 0001:00158074 0003B2DF C=CODE S=.text G=(none) M=UnitPrinc ACBP=A9 + 0001:00193354 000004C0 C=CODE S=.text G=(none) M=Signaux_complexes_GL ACBP=A9 0002:00000000 000000CC C=DATA S=.data G=DGROUP M=System ACBP=A9 0002:000000CC 00000020 C=DATA S=.data G=DGROUP M=SysInit ACBP=A9 0002:000000EC 00000254 C=DATA S=.data G=DGROUP M=SysUtils ACBP=A9 @@ -215,13 +215,13 @@ Detailed map of segments 0002:00018770 00418700 C=BSS S=.bss G=DGROUP M=UnitTCO ACBP=A9 0002:00430E70 00000010 C=BSS S=.bss G=DGROUP M=UnitSR ACBP=A9 0002:00430E80 00000014 C=BSS S=.bss G=DGROUP M=UnitCDF ACBP=A9 - 0002:00430E94 00000500 C=BSS S=.bss G=DGROUP M=UnitConfig ACBP=A9 - 0002:00431394 00000018 C=BSS S=.bss G=DGROUP M=verif_version ACBP=A9 - 0002:004313AC 00000004 C=BSS S=.bss G=DGROUP M=UnitPareFeu ACBP=A9 - 0002:004313B0 0000002C C=BSS S=.bss G=DGROUP M=UnitDebug ACBP=A9 - 0002:004313DC 0000000C C=BSS S=.bss G=DGROUP M=UnitSimule ACBP=A9 - 0002:004313E8 00000008 C=BSS S=.bss G=DGROUP M=Unitplace ACBP=A9 - 0002:004313F0 041B4F98 C=BSS S=.bss G=DGROUP M=UnitPrinc ACBP=A9 + 0002:00430E94 0000050C C=BSS S=.bss G=DGROUP M=UnitConfig ACBP=A9 + 0002:004313A0 00000018 C=BSS S=.bss G=DGROUP M=verif_version ACBP=A9 + 0002:004313B8 00000004 C=BSS S=.bss G=DGROUP M=UnitPareFeu ACBP=A9 + 0002:004313BC 0000002C C=BSS S=.bss G=DGROUP M=UnitDebug ACBP=A9 + 0002:004313E8 0000000C C=BSS S=.bss G=DGROUP M=UnitSimule ACBP=A9 + 0002:004313F4 00000008 C=BSS S=.bss G=DGROUP M=Unitplace ACBP=A9 + 0002:004313FC 041B4F9C C=BSS S=.bss G=DGROUP M=UnitPrinc ACBP=A9 Bound resource files @@ -247,4 +247,4 @@ Signaux_complexes_GL.res Signaux_complexes_GL.drf -Program entry point at 0001:001AA0B4 +Program entry point at 0001:00193664 diff --git a/UnitAnalyseSegCDM.dfm b/UnitAnalyseSegCDM.dfm index 07bc989..77aabbf 100644 --- a/UnitAnalyseSegCDM.dfm +++ b/UnitAnalyseSegCDM.dfm @@ -1,6 +1,6 @@ object FormAnalyseCDM: TFormAnalyseCDM - Left = 212 - Top = 69 + Left = 198 + Top = 41 AutoScroll = False Caption = 'Fen'#234'tre r'#233'seau CDM' ClientHeight = 648 diff --git a/UnitAnalyseSegCDM.pas b/UnitAnalyseSegCDM.pas index 653776d..9f9fce0 100644 --- a/UnitAnalyseSegCDM.pas +++ b/UnitAnalyseSegCDM.pas @@ -334,7 +334,7 @@ var i,erreur : integer; s,s2: string; begin //------------------------Lecture inter---------------------------- - if debugAnalyse then AfficheDebug('Compile inter',clWhite); + if debugAnalyse then AfficheDebug('Compile intersections',clWhite); inc(nInter); segment[nSeg-1].ninter:=nInter; setlength(segment[nSeg-1].inter,ninter); @@ -1814,7 +1814,7 @@ begin nInter:=Segment[i].nInter; for j:=0 to nInter-1 do begin - s:='Inter '+Segment[i].Inter[j].typ; + s:='Intersection '+Segment[i].Inter[j].typ; //Affiche(s,ClYellow); end; end; diff --git a/UnitConfig.dfm b/UnitConfig.dfm index 34cc35e..386a5d0 100644 --- a/UnitConfig.dfm +++ b/UnitConfig.dfm @@ -681,7 +681,7 @@ object FormConfig: TFormConfig Top = 8 Width = 633 Height = 505 - ActivePage = TabSheetAig + ActivePage = TabSheetCDM Font.Charset = DEFAULT_CHARSET Font.Color = clBlack Font.Height = -11 @@ -744,12 +744,12 @@ object FormConfig: TFormConfig Left = 16 Top = 96 Width = 273 - Height = 209 + Height = 225 Caption = 'Au d'#233'marrage de Signaux_Complexes ' TabOrder = 1 object Label13: TLabel Left = 8 - Top = 160 + Top = 176 Width = 242 Height = 13 Caption = 'Nom du fichier LAY '#224' utiliser au d'#233'marrage de CDM' @@ -814,7 +814,7 @@ object FormConfig: TFormConfig end object EditLAY: TEdit Left = 8 - Top = 176 + Top = 192 Width = 249 Height = 21 Hint = 'Nom du LAY avec .lay' @@ -985,7 +985,7 @@ object FormConfig: TFormConfig end object GroupBox8: TGroupBox Left = 16 - Top = 312 + Top = 328 Width = 273 Height = 97 Caption = 'Services CommIP CDM Rail' @@ -1047,7 +1047,7 @@ object FormConfig: TFormConfig Left = 312 Top = 224 Width = 297 - Height = 217 + Height = 201 Caption = 'Divers' TabOrder = 5 object Label31: TLabel @@ -1156,7 +1156,7 @@ object FormConfig: TFormConfig object CheckBoxSombre: TCheckBox Left = 8 Top = 132 - Width = 209 + Width = 137 Height = 17 Hint = 'Red'#233'marrer signaux_complexes pour prise en compte apr'#232's changeme' + @@ -1179,8 +1179,8 @@ object FormConfig: TFormConfig end end object ButtonPFCDM: TButton - Left = 32 - Top = 416 + Left = 336 + Top = 430 Width = 241 Height = 25 Hint = @@ -1330,7 +1330,6 @@ object FormConfig: TFormConfig Height = 49 BevelInner = bvLowered BevelKind = bkFlat - BorderStyle = bsNone Lines.Strings = ( '1. Port COM de l'#39'adresse USB de l'#39'interface XpressNet. ' 'COM de 1 '#224' 255 - Si COMX : Signaux complexes d'#233'tecte le ' @@ -1342,27 +1341,25 @@ object FormConfig: TFormConfig Left = 312 Top = 64 Width = 297 - Height = 73 + Height = 81 BevelInner = bvLowered BevelKind = bkFlat - BorderStyle = bsNone Lines.Strings = ( '2. Valeur de temporisation entre deux octets transf'#233'r'#233's '#224' ' 'l'#39'interface. Elle peut '#234'tre nulle. ' - 'Pour les interfaces s'#233'rie sans protocole (0) comme le GENLI, il ' - 'est conseill'#233' de mettre 30 (ms). Pour les interfaces avec ' + 'Pour les interfaces s'#233'rie sans protocole (0) comme le GENLI, ' + 'il est conseill'#233' de mettre 30 (ms). Pour les interfaces avec ' 'protocole mat'#233'riel RTS-CTS (2) cette variable est ignor'#233'e.') ReadOnly = True TabOrder = 4 end object Memo3: TMemo Left = 312 - Top = 144 + Top = 152 Width = 297 Height = 89 BevelInner = bvLowered BevelKind = bkFlat - BorderStyle = bsNone Lines.Strings = ( '3. Valeur maximale par tranche de 100 ms qui d'#233'finit le temps ' 'd'#39'attente de la r'#233'ponse de l'#39'interface apr'#232's ' diff --git a/UnitConfig.pas b/UnitConfig.pas index c2f5926..650a594 100644 --- a/UnitConfig.pas +++ b/UnitConfig.pas @@ -580,6 +580,7 @@ nb_det_dist_ch='nb_det_dist'; IpV4_PC_ch='IpV4_PC'; ServicesCDM_ch='ServicesCDM'; retro_ch='retro'; +Ecran_ch='Ecran'; Z21_ch='Z21'; Init_aig_ch='Init_Aig'; LAY_ch='Lay'; @@ -647,7 +648,7 @@ var ligneClicBr,AncligneClicBr,ligneClicAct,AncLigneClicAct,IndexSignalclic,NumTrameCDM, Algo_localisation,Verif_AdrXpressNet,ligneclicTrain,AncligneclicTrain,AntiTimeoutEthLenz, ligneDCC,decCourant,AffMemoFenetre,ligneClicAccPeriph,AncligneClicAccPeriph,ligneCherche, - compt_Ligne,Style_aff,Ancien_Style : integer; + compt_Ligne,Style_aff,Ancien_Style,Ecran_SC : integer; ack_cdm,clicliste,config_modifie,clicproprietes,confasauver,trouve_MaxPort, modif_branches,ConfigPrete,trouve_section_dccpp,trouve_section_trains,trouve_section_acccomusb, @@ -667,13 +668,13 @@ var EditZdet1V2F,EditZdet2V2F,EditZdet1V2O,EditZdet2V2O, EditZdet1V3F,EditZdet2V3F,EditZdet1V3O,EditZdet2V3O, EditZdet1V4F,EditZdet2V4F,EditZdet1V4O,EditZdet2V4O, - EditZdet1V5F,EditZdet2V5F,EditZdet1V5O,EditZdet2V5O : Tedit; + EditZdet1V5F,EditZdet2V5F,EditZdet1V5O,EditZdet2V5O,EditOuvreEcran : Tedit; EditT : Array[1..10] of Tedit; TextBoxCde : array[1..19] of Tedit; LabelPortCde,LbPnVoie1,LbAPnVoie1,LbAPnVoie2,LbAPnVoie3,LbAPnVoie4,LbAPnVoie5,LbATitre, LbZTitre,LbZPnVoie1,LbZPnVoie2,LbZPnVoie3,LbZPnVoie4,LbZPnVoie5,LabelMP,LabelNumeroP, - LabelStyle : Tlabel; + LabelStyle,LabelOuvreEcran : Tlabel; LabelDecCde : array[1..19] of TLabel; @@ -1100,17 +1101,17 @@ begin s:=IntToSTR(adresse)+','; // forme - D=directionnel ajouter 10 aspect:=Signaux[i].aspect; - if (aspect<10) or (aspect>=20) then s:=s+IntToSTR(aspect)+',' else s:=s+'D'+intToSTR(aspect-10)+','; + if isDirectionnel(i) then s:=s+'D'+intToSTR(aspect-10)+',' else s:=s+IntToSTR(aspect)+','; // bouton feu blanc, n'existe pas pour un feu directionnel (aspect>10) - if (aspect<10) or (aspect>=20) then begin if Signaux[i].feublanc then s:=s+'1,' else s:=s+'0,';end; + if not(isDirectionnel(i)) then begin if Signaux[i].feublanc then s:=s+'1,' else s:=s+'0,';end; // décodeur s:=s+IntToSTR(Signaux[i].decodeur)+','; // detecteur et élement suivant (4 maxi) // signal non directionnel - if (aspect<10) or (aspect>=20) then + if not(isDirectionnel(i)) then begin s:=s+'('+IntToSTR(Signaux[i].Adr_det1)+','+TypeEl_To_char(Signaux[i].Btype_suiv1)+IntToSTR(Signaux[i].Adr_el_suiv1); j:=Signaux[i].Adr_det2; @@ -1225,6 +1226,7 @@ var s,chaine,sa : string; c : char; multiple,fini : boolean; begin + //Affiche(chaine_signal,clyellow); decode_ligne_signal:=true; // pas de doublon if i=0 then begin @@ -1269,7 +1271,12 @@ begin val(sa,l,erreur); // nombre de feux du signal directionnel if l>6 then begin - Affiche('Erreur 672 ligne '+chaine_signal+' 6 feux maximum pour un panneau directionnel',clred); + Affiche('Erreur 672.1 ligne '+chaine_signal+' 6 feux maximum pour un panneau directionnel',clred); + exit; + end; + if l<3 then + begin + Affiche('Erreur 672.2 ligne '+chaine_signal+' 3 feux minimum pour un panneau directionnel',clred); exit; end; Signaux[i].aspect:=l+10;Delete(s,1,j); @@ -1390,13 +1397,12 @@ begin if (j>4) or (not(multiple)) then begin Affiche('Erreur 678: fichier de configuration ligne erronnée : '+chaine_signal,clred); - closefile(fichier); exit; end; k:=pos(',',s); delete(s,1,k); //Affiche('s='+s,clyellow); - if length(s)=0 then begin Affiche('Erreur 679: fichier de configuration ligne erronnée : '+chaine_signal,clred); closefile(fichier);exit;end; + if length(s)=0 then begin Affiche('Erreur 679: fichier de configuration ligne erronnée : '+chaine_signal,clred);exit;end; Signaux[i].VerrouCarre:=s[1]='1'; delete(s,1,1); if length(s)>0 then if s[1]=',' then delete(s,1,1); @@ -1704,7 +1710,7 @@ var s: string; fichierN : text; i,j,n,k : integer; begin - assign(fichierN,NomConfig); + assignFile(fichierN,NomConfig); rewrite(fichierN); // entête @@ -1786,6 +1792,9 @@ begin // plein écran writeln(fichierN,Fenetre_ch+'=',fenetre); + // écran Signaux complexes + writeln(fichierN,Ecran_ch+'=',intToSTR(Ecran_SC)); + // mémo writeln(fichierN,AffMemoFenetre_ch+'=',AffMemoFenetre); @@ -2110,7 +2119,6 @@ begin // positionne une scrollbar dans la listbox - pour l'enlever, envoyer 0 dans pixelLength SendMessage(formconfig.ListBoxSig.Handle,LB_SETHORIZONTALEXTENT,PixelLength,0); end; - end; @@ -3383,7 +3391,6 @@ var s,sa,SOrigine: string; trouve_fenetre:=true; delete(s,i,length(sa)); val(s,fenetre,erreur); - if fenetre=1 then Formprinc.windowState:=wsMaximized; end; // mémo fenetre @@ -3571,9 +3578,21 @@ var s,sa,SOrigine: string; trouve_retro:=true; delete(s,i,length(sa)); val(s,i,erreur); - ServeurRetroCDM:=i; + ServeurRetroCDM:=i; end; + sa:=uppercase(ecran_ch)+'='; + i:=pos(sa,s); + if i=1 then + begin + inc(nv); + delete(s,i,length(sa)); + val(s,i,erreur); + if i<1 then i:=1; + Ecran_SC:=i; + end; + + sa:=uppercase(Z21_ch)+'='; i:=pos(sa,s); if i=1 then @@ -3793,7 +3812,7 @@ begin end; //Affiche('Lecture du fichier de configuration '+NomConfig,clyellow); try - assign(fichier,NomConfig); + assignFile(fichier,NomConfig); reset(fichier); except Affiche('Fichier '+NomConfig+' non trouvé : création d''un fichier vide par défaut',clred); @@ -3803,6 +3822,7 @@ begin verifVersion:=true; Valeur_entete:=1; TempoOctet:=50; + Ecran_sc:=1; Srvc_Aig:=true; Srvc_Act:=true; Srvc_Det:=true; @@ -3823,7 +3843,7 @@ begin TailleFonte:=10; Nb_Det_Dist:=3; genere_config; - assign(fichier,NomConfig); + assignFile(fichier,NomConfig); reset(fichier); end; lit_flux; @@ -3873,6 +3893,10 @@ begin if not(trouve_section_sig) then Affiche('Manque section '+section_sig_ch,clred); if not(trouve_section_branche) then Affiche('Manque section '+section_branches_ch,clred); + {$IF CompilerVersion >= 28.0} + sombre:=false; + {$IFEND} + // trouver les détecteurs amont des signaux et les range dans la structure des signaux for i:=1 to NbreSignaux do begin @@ -3978,6 +4002,10 @@ begin if erreur<>0 then begin labelInfo.Caption:='Valeur temporisation octet incorrecte';ok:=false;end; TempoOctet:=i; + val(EditOuvreEcran.Text,i,erreur); + if erreur<>0 then begin labelInfo.Caption:='Valeur écran incorrecte';ok:=false;end; + ecran_sc:=i; + val(EditTempoReponse.text,i,erreur); if erreur<>0 then begin labelInfo.Caption:='Valeur temporisation de réponse interface';ok:=false;end; TimoutMaxInterface:=i; @@ -4176,6 +4204,7 @@ begin {$IF CompilerVersion >= 28.0} ComboStyle.itemIndex:=Style_Aff; {$IFEND} + EditOuvreEcran.Text:=intToSTR(ecran_SC); EditComUSB.Text:=PortCom; EditFonte.text:=IntToSTR(TailleFonte); editdebug.Text:=IntToSTR(debug); @@ -4682,11 +4711,10 @@ begin composant(c,couleurfond,couleurTexte); end; - // onglet cdmrail - for i:=0 to TabSheetCDM.ComponentCount-1 do + // onglet cdmrail GB5 + for i:=0 to GroupBox5.ComponentCount-1 do begin - c:=TabSheetCDM.Components[i]; - Affiche(c.Name,clred); + c:=GroupBox5.Components[i]; composant(c,couleurfond,couleurTexte); end; @@ -4694,6 +4722,7 @@ begin for i:=0 to TabSheetDecodeurs.ComponentCount-1 do begin c:=TabSheetDecodeurs.Components[i]; + //Affiche(c.Name,clyellow); composant(c,couleurfond,couleurTexte); end; @@ -4753,7 +4782,7 @@ begin Compt_ligne:=0; ConfigPrete:=true; richBranche.HideSelection:=false; // pour pouvoir copier coller la fenetre - groupBox21.Top:=304; + //groupBox21.Top:=304; GroupBox21.Left:=8; ButtonPropage.Hint:='Change les adresses dans les points de connexions'+#13+ 'des aiguillages, des branches et des signaux'+#13+ @@ -4762,7 +4791,31 @@ begin EditNbreAdr.Text:='2'; - // création des champs dynamiques de l'onglet décodeurs + // création des champs dynamiques de l'onglet CDM Rail + EditOuvreEcran:=TEdit.create(GroupBox5); + with EditOuvreEcran do + begin + Name:='EditOuvreEcran'; + left:=220;Top:=152;Width:=20;Height:=21; + text:=''; + parent:=GroupBox5; + visible:=true; + Text:='1'; + Hint:='Numéro d''écran sur lequel Signaux_Complexes s''ouvrira'; + showHint:=true; + onChange:=formConfig.modif_editT; + end; + LabelOuvreEcran:=Tlabel.Create(GroupBox5); + with LabelOuvreEcran do + begin + Name:='LabelOuvreEcran'; + left:=20;Top:=156;Width:=110;Height:=13; + caption:='Ouvrir Signaux_Complexes sur écran'; + parent:=GroupBox5; + ShowHint:=false; + visible:=true; + end; + // création des champs dynamiques de l'onglet décodeurs for i:=1 to 10 do begin y:=i*40+20; @@ -6354,24 +6407,23 @@ end; // mise à jour des champs du signal d'après le tableau feux Procedure aff_champs_signaux(index : integer); -var i,j,l,d,p,k,nc,decodeur : integer; +var j,l,d,p,k,nc,decodeur : integer; s : string; begin if Affevt then affiche('Aff_champs_sig_feux('+intToSTR(index)+')',clyellow); if index<1 then exit; clicListe:=true; - i:=index; - FormConfig.EditAdrSig.text:=InttoSTr(Signaux[i].adresse); + FormConfig.EditAdrSig.text:=InttoSTr(Signaux[index].adresse); with formconfig.ImageSignal do begin Picture.Bitmap.TransparentMode:=tmAuto; Picture.Bitmap.TransparentColor:=clblue; Transparent:=true; - picture.Bitmap:=Select_dessin_Signal(Signaux[i].aspect); + picture.Bitmap:=Select_dessin_Signal(Signaux[index].aspect); end; - if Signaux[i].contrevoie then inverse_image(formConfig.ImageSignal,Formprinc.ImageSignal20); + if Signaux[index].contrevoie then inverse_image(formConfig.ImageSignal,Formprinc.ImageSignal20); with formconfig do begin @@ -6380,9 +6432,9 @@ begin EditDet2.Text:=''; EditSuiv2.Text:=''; EditDet3.Text:=''; EditSuiv3.Text:=''; EditDet4.Text:=''; EditSuiv4.Text:=''; - ComboBoxDec.ItemIndex:=Signaux[i].decodeur; + ComboBoxDec.ItemIndex:=Signaux[index].decodeur; - decodeur:=Signaux[i].decodeur; + decodeur:=Signaux[index].decodeur; ButtonConfigSR.Visible:=false; case decodeur of @@ -6392,7 +6444,7 @@ begin EditSpecUni.Visible:=true; LabelUni.Caption:='Spec Unisemaf'; LabelUni.Visible:=true; - EditSpecUni.Text:=IntToSTR(Signaux[i].Unisemaf); + EditSpecUni.Text:=IntToSTR(Signaux[index].Unisemaf); editSpecUni.Hint:='Paramètre de description supplémentaire du décodeur Unisemaf'; editSpecUni.ShowHint:=true; end; @@ -6407,7 +6459,7 @@ begin editSpecUni.Hint:='Nombre d''adresses occupées par le signal'; editSpecUni.ShowHint:=true; EditSpecUni.Visible:=true; - EditSpecUni.Text:=IntToSTR(Signaux[i].Na); + EditSpecUni.Text:=IntToSTR(Signaux[index].Na); end else labelInfo.Caption:=''; end; @@ -6417,7 +6469,7 @@ begin // plus tard !! if decodeur>=11 then ButtonConfigSR.Visible:=true; - d:=Signaux[i].aspect; + d:=Signaux[index].aspect; case d of 2 : ComboBoxAsp.ItemIndex:=0; 3 : ComboBoxAsp.ItemIndex:=1; @@ -6448,7 +6500,7 @@ begin begin checkFVC.Visible:=true; checkFRC.Visible:=true; - end + end else begin checkFVC.Visible:=false; @@ -6460,9 +6512,9 @@ begin begin CheckBoxVersContrevoie.Visible:=true; CheckBoxContrevoie.Visible:=true; - CheckBoxContrevoie.Checked:=Signaux[i].contrevoie; - CheckBoxVersContrevoie.Checked:=Signaux[i].Verscontrevoie; - if Signaux[i].Btype_suiv1=Aig then s:='Permet d''afficher le chevron sur le signal si l''aiguillage '+intToSTR(Signaux[i].Adr_el_suiv1)+' est dévié' + CheckBoxContrevoie.Checked:=Signaux[index].contrevoie; + CheckBoxVersContrevoie.Checked:=Signaux[index].Verscontrevoie; + if Signaux[index].Btype_suiv1=Aig then s:='Permet d''afficher le chevron sur le signal si l''aiguillage '+intToSTR(Signaux[index].Adr_el_suiv1)+' est dévié' else s:='Permet d''afficher le chevron sur le signal si son aiguillage est dévié;'+char(13)+'mais ce signal n''est pas suivi d''un aiguillage'; CheckBoxversContrevoie.Hint:=s; CheckBoxFB.caption:='Avec demande Blanc rouge'; @@ -6481,7 +6533,7 @@ begin end; // signal normal - if (d<10) or (d>=20) then + if not(isDirectionnel(index)) then begin Label17.Caption:='Conditions supplémentaires d''affichage du carré par les aiguillages :'; label17.Width:=131; @@ -6492,44 +6544,47 @@ begin EditDet1.Visible:=true;EditDet2.Visible:=true;EditDet3.Visible:=true;EditDet4.Visible:=true; EditSuiv1.Visible:=true;EditSuiv2.Visible:=true;EditSuiv3.Visible:=true;EditSuiv4.Visible:=true; Label24.Visible:=true; Label25.Visible:=true;Label26.Visible:=true;Label27.Visible:=true; - EditDet1.Text:=IntToSTR(Signaux[i].Adr_det1); - EditSuiv1.Text:=TypeEl_To_char(Signaux[i].Btype_suiv1)+IntToSTR(Signaux[i].Adr_el_suiv1); + EditDet1.Text:=IntToSTR(Signaux[index].Adr_det1); + EditSuiv1.Text:=TypeEl_To_char(Signaux[index].Btype_suiv1)+IntToSTR(Signaux[index].Adr_el_suiv1); - EditSuiv1.Hint:=chaine_element(Signaux[i].Btype_suiv1,Signaux[i].Adr_el_suiv1); - j:=Signaux[i].Adr_det2; + EditSuiv1.Hint:=chaine_element(Signaux[index].Btype_suiv1,Signaux[index].Adr_el_suiv1); + j:=Signaux[index].Adr_det2; if j<>0 then begin - Editdet2.Text:=IntToSTR(j);EditSuiv2.Text:=TypeEl_To_char(Signaux[i].Btype_suiv2)+IntToSTR(Signaux[i].Adr_el_suiv2); - EditSuiv2.Hint:=chaine_element(Signaux[i].Btype_suiv2,Signaux[i].Adr_el_suiv2); + Editdet2.Text:=IntToSTR(j);EditSuiv2.Text:=TypeEl_To_char(Signaux[index].Btype_suiv2)+IntToSTR(Signaux[index].Adr_el_suiv2); + EditSuiv2.Hint:=chaine_element(Signaux[index].Btype_suiv2,Signaux[index].Adr_el_suiv2); end else begin EditDet2.Text:='';EditSuiv2.Text:='';EditSuiv2.Hint:='';end; - j:=Signaux[i].Adr_det3; + j:=Signaux[index].Adr_det3; if j<>0 then begin - EditDet3.Text:=IntToSTR(j);EditSuiv3.Text:=TypeEl_To_char(Signaux[i].Btype_suiv3)+IntToSTR(Signaux[i].Adr_el_suiv3); - EditSuiv3.Hint:=chaine_element(Signaux[i].Btype_suiv3,Signaux[i].Adr_el_suiv3); + EditDet3.Text:=IntToSTR(j);EditSuiv3.Text:=TypeEl_To_char(Signaux[index].Btype_suiv3)+IntToSTR(Signaux[index].Adr_el_suiv3); + EditSuiv3.Hint:=chaine_element(Signaux[index].Btype_suiv3,Signaux[index].Adr_el_suiv3); end else begin EditDet3.Text:='';EditSuiv3.Text:='';EditSuiv3.Hint:='';end; - j:=Signaux[i].Adr_det4; + j:=Signaux[index].Adr_det4; if j<>0 then begin - EditDet4.Text:=IntToSTR(j);EditSuiv4.Text:=TypeEl_To_char(Signaux[i].Btype_suiv4)+IntToSTR(Signaux[i].Adr_el_suiv4); - EditSuiv4.Hint:=chaine_element(Signaux[i].Btype_suiv4,Signaux[i].Adr_el_suiv4); + EditDet4.Text:=IntToSTR(j);EditSuiv4.Text:=TypeEl_To_char(Signaux[index].Btype_suiv4)+IntToSTR(Signaux[index].Adr_el_suiv4); + EditSuiv4.Hint:=chaine_element(Signaux[index].Btype_suiv4,Signaux[index].Adr_el_suiv4); end - else begin EditDet4.Text:='';EditSuiv4.Text:='';EditSuiv4.Hint:='';end; - checkVerrouCarre.Checked:=Signaux[i].VerrouCarre; - checkBoxFB.Checked:=Signaux[i].FeuBlanc; - checkFVC.Checked:=Signaux[i].checkFV; - checkFRC.Checked:=Signaux[i].checkFR; + else + begin + EditDet4.Text:='';EditSuiv4.Text:='';EditSuiv4.Hint:=''; + end; + checkVerrouCarre.Checked:=Signaux[index].VerrouCarre; + checkBoxFB.Checked:=Signaux[index].FeuBlanc; + checkFVC.Checked:=Signaux[index].checkFV; + checkFRC.Checked:=Signaux[index].checkFR; // conditions supplémentaires du carré par aiguillages l:=1; repeat - nc:=Length(Signaux[i].condcarre[l])-1 ; + nc:=Length(Signaux[index].condcarre[l])-1 ; if nc<>-1 then begin s:=''; for k:=1 to nc do begin - s:=s+'A'+IntToSTR(Signaux[i].condcarre[l][k].Adresse)+Signaux[i].condcarre[l][k].PosAig; + s:=s+'A'+IntToSTR(Signaux[index].condcarre[l][k].Adresse)+Signaux[index].condcarre[l][k].PosAig; if k-1 then begin s:=''; for k:=1 to nc do begin - s:=s+'A'+IntToSTR(Signaux[i].condFeuBlanc[l][k].Adresse)+Signaux[i].condFeuBlanc[l][k].PosAig; + s:=s+'A'+IntToSTR(Signaux[index].condFeuBlanc[l][k].Adresse)+Signaux[index].condFeuBlanc[l][k].PosAig; if k10 then + if isDirectionnel(i) then begin nombre_adresses_signal:=x-10; exit; @@ -9489,7 +9544,7 @@ begin adr2:=aiguillage[i].Adresse; if ((adr2>=adr) and (adr2<=adr+nc-1)) then begin - affiche('Erreur 9.1 : signal '+intToSTR(adr)+' ('+intToSTR(nc)+' adresses) et aiguillage '+intToSTR(adr2)+' se chevauchent',clred); + affiche('Erreur 7.1 : signal '+intToSTR(adr)+' ('+intToSTR(nc)+' adresses) et aiguillage '+intToSTR(adr2)+' se chevauchent',clred); ok:=false; end; end; @@ -9502,7 +9557,7 @@ begin ((adr+nc-1>adr2) and (adr+nc-10 then begin if km=det then // détecteur @@ -10268,6 +10328,25 @@ begin until((model=rien) and (detect=0)); end; + // vérifier si les signaux peuvent afficher un carré + for j:=1 to NbreSignaux do + begin + adr:=Signaux[j].Adresse; + nc:=signaux[j].aspect; + if (signaux[j].Btype_suiv1=aig) then + begin + adr2:=signaux[j].Adr_el_suiv1; // adresse de l'aiguillage + adr3:=signaux[j].Adr_det1; // adresse détecteur + IndexAig:=Index_aig(adr2); + // si le détecteur se trouve sur une position déviée ou droite de l'aiguillage + if ((aiguillage[IndexAig].ADevie=adr3) or (aiguillage[IndexAig].ADroit=adr3)) and (nc=3) then + begin + Affiche('Le signal '+intToSTR(adr)+' devrait comporter au moins 4 feux pour afficher un carré car',clOrange); + Affiche('il est positionné avant l''aiguillage '+intToSTR(adr2)+' pris en talon',clOrange); + end; + end; + end; + verif_coherence:=ok; end; @@ -11157,7 +11236,7 @@ begin j:=MemoCarre.Selstart; clicMemo:=MemoCarre.Perform(EM_LINEFROMCHAR,j,0); // numéro de la ligne du curseur aspect:=Signaux[ligneClicSig+1].aspect; - dir:=aspect>10; + dir:=isDirectionnel(ligneClicSig+1); if dir and (clicMemo>aspect-10) then begin @@ -12430,6 +12509,20 @@ begin te:=Sender as Tedit; s:=lowercase(te.Name); + if pos('EditOuvreEcran',s)<>0 then + begin + adr:=extract_int(s); + val(s,i,erreur); + if (erreur<>0) or (i<1) then + begin + labelInfo.caption:='Erreur écran'; + exit; + end; + labelInfo.caption:=''; + Ecran_SC:=i; + exit; + end; + if pos('tditt',s)<>0 then begin adr:=extract_int(s); @@ -12859,7 +12952,6 @@ begin clicMemo:=MemoCarre.Perform(EM_LINEFROMCHAR,j,0); // numéro de la ligne du curseur aspect:=Signaux[ligneClicSig+1].aspect; - if (clicMemo>5) then begin clicListe:=true; @@ -12868,7 +12960,6 @@ begin clicListe:=false; exit; end; - // signal normal // boucle de ligne @@ -13699,7 +13790,7 @@ procedure TFormConfig.ColorDialogFondShow(Sender: TObject); end; procedure TFormConfig.ButtonPropageClick(Sender: TObject); - var i,adresse,AncienAdresse,AdresseBr,v,erreur : integer; + var x,y,i,adresse,AncienAdresse,AdresseBr,v,erreur : integer; typ : tEquipement; s,Nb : string; begin @@ -13832,12 +13923,12 @@ begin // --------- signaux for i:=1 to NbreSignaux do begin - if (signaux[i].Adr_el_suiv1=AncienAdresse) and (signaux[i].Btype_suiv1=aig) then + if (signaux[i].Adr_el_suiv1=AncienAdresse) and (signaux[i].Btype_suiv1=aig) then begin signaux[i].Adr_el_suiv1:=adresse; Affiche('Changement dans signal '+intToSTR(signaux[i].adresse),clYellow); config_modifie:=true; - end; + end; if (signaux[i].Adr_el_suiv2=AncienAdresse) and (signaux[i].Btype_suiv1=aig) then begin signaux[i].Adr_el_suiv2:=adresse; @@ -13850,14 +13941,28 @@ begin Affiche('Changement dans signal '+intToSTR(signaux[i].adresse),clYellow); config_modifie:=true; end; - if (signaux[i].Adr_el_suiv4=AncienAdresse) and (signaux[i].Btype_suiv1=aig) then + if (signaux[i].Adr_el_suiv4=AncienAdresse) and (signaux[i].Btype_suiv1=aig) then begin signaux[i].Adr_el_suiv4:=adresse; Affiche('Changement dans signal '+intToSTR(signaux[i].adresse),clYellow); config_modifie:=true; end; end; - + + // TCOs + for i:=1 to NbreTCO do + begin + for y:=1 to NbreCellY[i] do + for x:=1 to NbreCellX[i] do + begin + if tco[i,x,y].Adresse=AncienAdresse then + begin + tco[i,x,y].Adresse:=Adresse; + Affiche('Changement dans TCO '+intToSTR(i)+' cellule '+intToSTR(x)+','+intToSTR(y),clyellow); + end; + end; + end; + clicListe:=false; end; @@ -13963,6 +14068,8 @@ begin change_adr_aig; end; + + end. diff --git a/UnitConfigCellTCO.dfm b/UnitConfigCellTCO.dfm index 5a4f956..4bbd19a 100644 --- a/UnitConfigCellTCO.dfm +++ b/UnitConfigCellTCO.dfm @@ -147,7 +147,7 @@ object FormConfCellTCO: TFormConfCellTCO Left = 8 Top = 152 Width = 249 - Height = 73 + Height = 57 Caption = 'Orientation du signal' Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText @@ -172,9 +172,9 @@ object FormConfCellTCO: TFormConfCellTCO OnClick = RadioButtonHGClick end object RadioButtonV: TRadioButton - Left = 16 - Top = 48 - Width = 169 + Left = 136 + Top = 16 + Width = 105 Height = 17 Caption = 'Vertical' Font.Charset = DEFAULT_CHARSET @@ -201,10 +201,19 @@ object FormConfCellTCO: TFormConfCellTCO TabOrder = 2 OnClick = RadioButtonHDClick end + object RadioButtonV180: TRadioButton + Left = 136 + Top = 32 + Width = 97 + Height = 17 + Caption = 'Vertical 180'#176 + TabOrder = 3 + OnClick = RadioButtonV180Click + end end object GroupBoxImplantation: TGroupBox Left = 8 - Top = 232 + Top = 224 Width = 249 Height = 57 Caption = 'Implantation du signal' @@ -291,8 +300,8 @@ object FormConfCellTCO: TFormConfCellTCO TabOrder = 5 end object GroupBoxAction: TGroupBox - Left = 8 - Top = 80 + Left = 16 + Top = 240 Width = 249 Height = 129 Caption = 'Action' diff --git a/UnitConfigCellTCO.pas b/UnitConfigCellTCO.pas index fae281d..f48fbd0 100644 --- a/UnitConfigCellTCO.pas +++ b/UnitConfigCellTCO.pas @@ -41,6 +41,7 @@ type EditAdrSortie: TEdit; EditEtat: TEdit; Labela: TLabel; + RadioButtonV180: TRadioButton; procedure EditAdrElementChange(Sender: TObject); procedure EditTexteCCTCOChange(Sender: TObject); procedure ButtonFonteClick(Sender: TObject); @@ -67,6 +68,7 @@ type procedure EditAdrSortieChange(Sender: TObject); procedure EditEtatChange(Sender: TObject); procedure RadioButtonActionClick(Sender: TObject); + procedure RadioButtonV180Click(Sender: TObject); private { Déclarations privées } public @@ -261,10 +263,12 @@ begin with formConfCellTCO do begin RadioButtonV.Enabled:=false; + RadioButtonV180.Enabled:=false; RadioButtonHG.Enabled:=false; RadioButtonHD.Enabled:=false; RadioButtonG.Enabled:=false; RadioButtonD.Enabled:=false; + ImagePaletteCC.transparent:=false; end; @@ -274,6 +278,7 @@ begin with formConfCellTCO do begin RadioButtonV.Enabled:=false; + RadioButtonV180.Enabled:=false; RadioButtonHG.Enabled:=false; RadioButtonHD.Enabled:=false; RadioButtonG.Enabled:=false; @@ -316,29 +321,38 @@ begin with formconfCellTCO do begin RadioButtonV.Enabled:=true; + RadioButtonV180.Enabled:=true; RadioButtonHG.Enabled:=true; RadioButtonHD.Enabled:=true; RadioButtonG.Enabled:=true; RadioButtonD.Enabled:=true; oriente:=tco[indexTCO,XclicCell[indexTCO],YclicCell[indexTCO]].Feuoriente; - if oriente=1 then - begin + case oriente of + 1: begin RadioButtonV.checked:=true; + RadioButtonV180.checked:=false; RadioButtonHG.checked:=false; RadioButtonHD.checked:=false; end; - if oriente=2 then - begin + 2: begin RadioButtonV.checked:=false; + RadioButtonV180.checked:=false; RadioButtonHG.checked:=true; RadioButtonHD.checked:=false; end; - if oriente=3 then - begin + 3: begin RadioButtonV.checked:=false; + RadioButtonV180.checked:=false; RadioButtonHG.checked:=false; RadioButtonHD.checked:=true; end; + 4: begin + RadioButtonV.checked:=false; + RadioButtonV180.checked:=true; + RadioButtonHG.checked:=false; + RadioButtonHD.checked:=false; + end; + end; PiedFeu:=tco[indexTCO,XclicCell[indexTCO],YclicCell[indexTCO]].PiedFeu; if PiedFeu=1 then @@ -542,6 +556,11 @@ begin Vertical(indexTCOcourant); end; +procedure TFormConfCellTCO.RadioButtonV180Click(Sender: TObject); +begin + Vertical180(indexTCOCourant); +end; + procedure TFormConfCellTCO.RadioButtonHGClick(Sender: TObject); begin tourne90G(indexTCOcourant); @@ -896,6 +915,8 @@ begin end; begin + + end. diff --git a/UnitDebug.dfm b/UnitDebug.dfm index 086fdae..802d638 100644 --- a/UnitDebug.dfm +++ b/UnitDebug.dfm @@ -193,7 +193,7 @@ object FormDebug: TFormDebug OnClick = ButtonSigSuivClick end object ButtonCanSuivSig: TButton - Left = 56 + Left = 72 Top = 16 Width = 65 Height = 49 @@ -216,7 +216,7 @@ object FormDebug: TFormDebug TabOrder = 2 end object ButtonCP: TButton - Left = 120 + Left = 152 Top = 16 Width = 81 Height = 49 @@ -226,7 +226,7 @@ object FormDebug: TFormDebug OnClick = ButtonCPClick end object Button2: TButton - Left = 200 + Left = 248 Top = 16 Width = 57 Height = 49 @@ -235,16 +235,6 @@ object FormDebug: TFormDebug WordWrap = True OnClick = Button2Click end - object ButtonReserve: TButton - Left = 256 - Top = 16 - Width = 49 - Height = 49 - Caption = 'R'#233'serve canton signal' - TabOrder = 5 - WordWrap = True - OnClick = ButtonReserveClick - end end object GroupBox4: TGroupBox Left = 8 diff --git a/UnitDebug.pas b/UnitDebug.pas index bb8c67f..d5dbc97 100644 --- a/UnitDebug.pas +++ b/UnitDebug.pas @@ -64,7 +64,6 @@ type MemoEvtDet: TRichEdit; CheckDetSIg: TCheckBox; CheckBoxPrinc: TCheckBox; - ButtonReserve: TButton; procedure FormCreate(Sender: TObject); procedure ButtonEcrLogClick(Sender: TObject); procedure EditNivDebugKeyPress(Sender: TObject; var Key: Char); @@ -104,7 +103,6 @@ type procedure MemoEvtDetChange(Sender: TObject); procedure CheckDetSIgClick(Sender: TObject); procedure CheckBoxPrincClick(Sender: TObject); - procedure ButtonReserveClick(Sender: TObject); private { Déclarations privées } public @@ -116,7 +114,7 @@ var NivDebug,signalDebug,compt_erreur,positionErreur,LigneErreur : integer; AffSignal,AffAffect,initform,AffFD,debug_dec_sig,debugTCO,DebugAffiche,AFfDetSIg, ProcPrinc : boolean; - N_event_det : integer; // index du dernier évènement (de 1 à 20) + N_event_det : integer; // index du dernier évènement (de 1 à 20) N_Event_tick : integer ; // dernier index @@ -579,7 +577,7 @@ begin end; if protocole=2 then AfficheDebug('D10: Commande DCC++ pas encore implantée',clred); end; - + Self.ActiveControl:=nil; end; @@ -623,7 +621,7 @@ begin s:=checksum(s); envoi(s); // envoi de la trame et attente Ack end; - if protocole=2 then AfficheDebug('D11: Commande DCC++ pas encore implantée',clred) + if protocole=2 then AfficheDebug('D11: Commande DCC++ pas encore implantée',clred) end; Self.ActiveControl:=nil; @@ -656,18 +654,5 @@ begin ProcPrinc:=checkBoxPrinc.checked; end; -procedure TFormDebug.ButtonReserveClick(Sender: TObject); -begin - {Val(EditSigSuiv.Text,Adr,erreur); if erreur<>0 then exit; - ancdebug:=NivDebug; - NivDebug:=3; - i:=index_feu(adr); - feux[i].Adr_det1; - Cond_Carre(Adr); - d - reserve_canton( - NivDebug:=AncDebug; } - reserve_canton(524,521,1,1,3); -end; end. diff --git a/UnitPilote.pas b/UnitPilote.pas index dfb892e..387ba3e 100644 --- a/UnitPilote.pas +++ b/UnitPilote.pas @@ -297,7 +297,7 @@ procedure TFormPilote.ButtonPiloteClick(Sender: TObject); var i,index,e : integer; begin index:=index_Signal(AdrPilote); - if (Signaux[index].aspect>10) and (Signaux[index].aspect<20 )then + if isDirectionnel(index) then begin val(EditNbreFeux.Text,i,e); Signaux[0].EtatSignal:=i; @@ -404,7 +404,7 @@ begin LabelTitrePilote.Caption:='Pilotage du signal '+intToSTR(AdrPilote); Signaux[0].EtatSignal:=Signaux[i].EtatSignal; - if (Signaux[i].aspect>10) and (Signaux[i].aspect<20) then + if isDirectionnel(i) then begin // signaux directionnels GroupBox1.Visible:=false; diff --git a/UnitPrinc.dfm b/UnitPrinc.dfm index 9277635..9a79465 100644 --- a/UnitPrinc.dfm +++ b/UnitPrinc.dfm @@ -1,8 +1,8 @@ object FormPrinc: TFormPrinc - Left = 107 - Top = 204 + Left = 113 + Top = 196 Width = 1149 - Height = 689 + Height = 699 Anchors = [akLeft, akTop, akRight] Caption = 'Signaux complexes' Color = clBtnFace @@ -13,14 +13,13 @@ object FormPrinc: TFormPrinc Font.Style = [] Menu = MainMenu1 OldCreateOrder = False - Position = poScreenCenter Scaled = False OnClose = FormClose OnCreate = FormCreate OnResize = FormResize DesignSize = ( 1133 - 631) + 641) PixelsPerInch = 96 TextHeight = 13 object LabelTitre: TLabel @@ -1429,7 +1428,7 @@ object FormPrinc: TFormPrinc end object StatusBar1: TStatusBar Left = 0 - Top = 609 + Top = 619 Width = 1133 Height = 22 Panels = < @@ -1591,8 +1590,8 @@ object FormPrinc: TFormPrinc end end object GroupBox3: TGroupBox - Left = 489 - Top = 104 + Left = 497 + Top = 64 Width = 265 Height = 129 Anchors = [akTop, akRight] @@ -1980,8 +1979,8 @@ object FormPrinc: TFormPrinc end end object GroupBox2: TGroupBox - Left = 609 - Top = 104 + Left = 721 + Top = 56 Width = 265 Height = 129 Anchors = [akTop, akRight] @@ -2041,24 +2040,6 @@ object FormPrinc: TFormPrinc TabOrder = 3 end end - object PanelBouton: TPanel - Left = 952 - Top = 200 - Width = 64 - Height = 67 - BorderStyle = bsSingle - Color = clGreen - TabOrder = 6 - Visible = False - object SpeedButton1: TSpeedButton - Left = 0 - Top = 0 - Width = 57 - Height = 57 - Caption = 'bouton maison' - Flat = True - end - end end object MSCommCde1: TMSComm Left = 1064 diff --git a/UnitPrinc.pas b/UnitPrinc.pas index 7384121..6fc3e8e 100644 --- a/UnitPrinc.pas +++ b/UnitPrinc.pas @@ -1,5 +1,5 @@ Unit UnitPrinc; -// 25/1 22h +// 27/1 10 (******************************************** Programme signaux complexes Graphique Lenz Delphi 7 + activeX Tmscomm + clientSocket @@ -230,8 +230,6 @@ type Copierltatdesaiguillageseninitialisation1: TMenuItem; ServerSocket: TServerSocket; Listedesclientsconnects1: TMenuItem; - PanelBouton: TPanel; - SpeedButton1: TSpeedButton; procedure FormCreate(Sender: TObject); procedure MSCommUSBInterfaceComm(Sender: TObject); @@ -583,8 +581,8 @@ var TraceListe,clignotant,nack,Maj_signaux_cours,configNulle,LanceCDM,AvecInitAiguillages, AvecDemandeInterfaceUSB,AvecDemandeInterfaceEth,aff_acc,affiche_aigdcc,modeStkRetro, retEtatDet,roulage,init_aig_cours,affevt,placeAffiche,clicComboTrain,clicAdrTrain, - avec_splitter,fichier_module_cdm,Diffusion,cdmDevant,avecRESA,serveurIPCDM_Touche, - Z21,sombre,serveur_ouvert : boolean; + fichier_module_cdm,Diffusion,cdmDevant,avecRESA,serveurIPCDM_Touche, + Z21,sombre,serveur_ouvert,pasChgTBV : boolean; tick,Premier_tick : longint; @@ -593,7 +591,7 @@ var FormPrinc: TFormPrinc; Enregistrement,chaine_Envoi,chaine_recue,Id_CDM,Af,version_Interface,entete,suffixe,Lay, - CheminProgrammes : string; + CheminProgrammes,cheminWin : string; Ancien_detecteur : array[0..NbMaxDet] of boolean; // anciens état des détecteurs et adresses des détecteurs et leur état detecteur : array[0..NbMaxDet] of // détecteurs indexés par l'adresse @@ -630,7 +628,7 @@ var record train : string; adrTrain : integer; // adresse du train - Nbre : integer; // nombre de zones (ci dessous) + Nbre : integer; // nombre de zones (ci dessous) Zone : array[1..MaxZones] of record det1,det2 : integer; end; end; @@ -639,9 +637,9 @@ var record tick : longint; adresse : integer ; - train : integer; // numéro du train si détecteur - modele : Tequipement ; // détecteur, aiguillage, actionneur - etat : integer ; // état du détecteur de l'aiguillage ou de l'actionneur + train : integer; // numéro du train si détecteur + modele : Tequipement ; // détecteur, aiguillage, actionneur + etat : integer ; // état du détecteur de l'aiguillage ou de l'actionneur reaffecte : integer ; // =1 réaffecté au bon train dans le cas de 2 détecteurs contigus qui ne s'enchainent pas bien =2 réaffecté par changement aiguillage end; @@ -656,7 +654,7 @@ var record etat : boolean; // mémoires de zones des détecteurs train : string; - IndexTrain, // index du tableau de tous les trains + IndexTrain, // index du tableau de tous les trains AdrTrain : integer; end; @@ -874,6 +872,7 @@ procedure AffTexteIncliBordeTexture(c : TCanvas; x,y : integer; Fonte : tFont; clBord : TColor; EpBord : integer; PenMode : TPenMode; Texture : tBitMap; texte : string; AngleDD : longint); procedure change_style; +function isDirectionnel(index : integer) : boolean; implementation @@ -897,19 +896,28 @@ begin end; } -// change le style en fonction de Style_aff -// Cette procédure doit être appellée depuis le module principal UnitPrinc +// change le style en fonction de Style_aff pour Delphi11 (compilateur>=28) +// Cette procédure doit être appellée depuis le module principal UnitPrinc sinon exception violation procedure change_style; +var i : integer; begin {$IF CompilerVersion >= 28.0} if Ancien_Style<>Style_Aff then begin - TStyleManager.TrySetStyle(TStyleManager.StyleNames[0]); // repasse en windows pour éviter exception + TStyleManager.TrySetStyle(TStyleManager.StyleNames[0]); // repasse en windows (style 0) pour éviter exception TStyleManager.TrySetStyle(TStyleManager.StyleNames[Style_Aff]); - // permet que le richedit affiche en couleurs + // le style windows permet que le richedit affiche en couleurs Formprinc.FenRich.StyleName:='Windows'; - if formDebug<>nil then FormDebug.RichDebug.StyleName:='Windows'; + if formDebug<>nil then + begin + FormDebug.RichDebug.StyleName:='Windows'; + formDebug.MemoEvtDet.StyleName:='Windows'; + end; if formConfig<>nil then FormConfig.RichBranche.StyleName:='Windows'; + for i:=1 to NbreTCO do + begin + if FormTCO[i]<>nil then FormTCO[i].ScrollBox.StyleName:='Windows'; + end; Ancien_style:=Style_aff; end; {$IFEND} @@ -922,6 +930,13 @@ begin inc(etape); end; +function isDirectionnel(index : integer) : boolean; +var a : integer; +begin + a:=Signaux[index].aspect; + isDirectionnel:=(a>=12) and (a<=16); +end; + procedure Tformprinc.DoHint(Sender : Tobject); // le sender est tApplication var s,nomForm: string; FormeTCO : boolean; @@ -1093,12 +1108,12 @@ begin end; -// dessine un cercle plein dans le feu +// dessine un cercle plein dans le signal procedure cercle(ACanvas : Tcanvas;x,y,rayon : integer;couleur : Tcolor); begin with Acanvas do begin - brush.Style:=bsSolid; + //brush.Style:=bsSolid; &&&& brush.Color:=couleur; pen.Color:=clBlack; pen.Width:=1; @@ -1245,7 +1260,7 @@ end; // dessine les feux sur une cible à 3 feux procedure dessine_signal3(Acanvas : Tcanvas;x,y : integer;frX,frY : real;EtatSignal : word;orientation : integer); var Temp,rayon,xSem,Ysem,xJaune,Yjaune,Xvert,Yvert, - LgImage,HtImage,code,combine,AncCode : integer; + LgImage,HtImage,code,combine : integer; ech : real; begin // Affiche('dessine_feu3',clred); @@ -2415,7 +2430,7 @@ begin if TypeSignal=3 then Signaux[rang].EtatSignal:=semaphore_F; if (TypeSignal>3) and (TypeSignal<10) and Signaux[rang].VerrouCarre then Signaux[rang].EtatSignal:=carre_F; if (TypeSignal>3) and (TypeSignal<10) and not(Signaux[rang].VerrouCarre) then Signaux[rang].EtatSignal:=semaphore_F; - if (TypeSignal>10) and (TypeSignal<20) then Signaux[rang].EtatSignal:=0; + if isDirectionnel(rang) then Signaux[rang].EtatSignal:=0; if TypeSignal=20 then // signal belge begin @@ -2477,29 +2492,33 @@ begin NbreImagePLigne:=i; for i:=1 to NbreSignaux do begin - with Signaux[i].img do + if Signaux[i].Img<>nil then begin - Top:=(HtImg+espY+20)*((i-1) div NbreImagePLigne); // détermine les points d'origine - Left:=10+ (LargImg+5)*((i-1) mod (NbreImagePLigne)); - repaint; - end; + with Signaux[i].img do + begin + Top:=(HtImg+espY+20)*((i-1) div NbreImagePLigne); // détermine les points d'origine + Left:=10+ (LargImg+5)*((i-1) mod (NbreImagePLigne)); + repaint; + end; - with Signaux[i].lbl do - begin - Top:=HtImg+((HtImg+EspY+20)*((i-1) div NbreImagePLigne)); - Left:=10+ (LargImg+5)*((i-1) mod (NbreImagePLigne)); - repaint; - end; - - if Signaux[i].FeuBlanc then - with Signaux[i].checkFB do - begin - Top:=HtImg+15+((HtImg+EspY+20)*((i-1) div NbreImagePLigne)); - Left:=10+ (LargImg+5)*((i-1) mod (NbreImagePLigne)); - repaint; - end; - end; + with Signaux[i].lbl do + begin + Top:=HtImg+((HtImg+EspY+20)*((i-1) div NbreImagePLigne)); + Left:=10+ (LargImg+5)*((i-1) mod (NbreImagePLigne)); + repaint; + end; + if Signaux[i].FeuBlanc then + with Signaux[i].checkFB do + begin + Top:=HtImg+15+((HtImg+EspY+20)*((i-1) div NbreImagePLigne)); + Left:=10+ (LargImg+5)*((i-1) mod (NbreImagePLigne)); + repaint; + end; + end + else + Affiche('Anomalie données du signal '+intToSTR(signaux[i].adresse),clred); + end end; // ajoute en bout de chaine le checksum d'une trame pour XpressNet @@ -2967,11 +2986,20 @@ end; // répétition=avec répétition de la commande dans 1s procedure vitesse_loco(nom_train :string;index : integer;adr_loco : integer;vitesse : integer;sens,repetition : boolean); var s : string; - v : integer; + v,erreur : integer; begin if not(hors_tension) and ((portCommOuvert or parSocketLenz)) then begin Affiche('vitesse train '+inttostr(adr_loco)+' '+inttostr(vitesse),clLime); + + // mettre à jour la trackBar si le train sélectionné=editAdrTrain + val(Formprinc.EditAdrTrain.Text,v,erreur); + if v=adr_loco then + begin + pasChgTBV:=true; // évite de repositionner la trackbar + Formprinc.TrackBarVit.Position:=vitesse; + pasChgTBV:=false; + end; if protocole=1 then begin //AfficheDebug('X9 train '+inttostr(loco)+' '+inttostr(vitesse),clOrange); @@ -4929,7 +4957,6 @@ begin detecteur_suivant:=AdrSuiv; end; - // pilotage d'un signal, et mise à jour du graphisme du signal dans les 3 fenetres procedure envoi_signal(Adr : integer); var i,it,j,index_train,adresse,detect,detsuiv,a,b,aspect,x,y,TailleX,TailleY,Orientation, @@ -4951,7 +4978,7 @@ begin if (Signaux[i].AncienEtat<>Signaux[i].EtatSignal) then begin - if (Signaux[i].aspect<10) or (Signaux[i].aspect>=20) then // si signal non directionnel + if not(isDirectionnel(i)) then // si signal non directionnel begin dec:=Signaux[i].decodeur; // envoie la commande au décodeur @@ -5285,9 +5312,14 @@ begin branche_trouve:=0; IndexBranche_trouve:=0; + if el>NbMaxDet then + begin + Affiche('Erreur 78 : trouve_element el='+inttoStr(el),clred); + exit; + end; + if typeEL=det then begin - //Affiche('det ',clred); branche_trouve:=detecteur[el].NumBranche; // le détecteur det se trouve dans indexBranche_trouve:=detecteur[el].IndexBranche; // NumBranche et Indexbranche - detecteur[] sont indexés par l'adresse end; @@ -6090,7 +6122,7 @@ begin s:='1026 - position TJD/S '+IntToSTR(Adr)+'='+intToSTR(aiguillage[index].position)+' / '+intToSTR(index)+'='+intToSTR(aiguillage[index2].position)+' inconnue'; AfficheDebug(s,clOrange); end; - suivant_alg3:=9996; // position inconnue + suivant_alg3:=9996; // position inconnue AigMal:=aiguillage[index].adresse; exit; end; @@ -6167,7 +6199,8 @@ begin if aiguillage[index].position=const_inconnu then begin AigMal:=aiguillage[index].adresse; - suivant_alg3:=9996;exit; + suivant_alg3:=9996; + exit; end; // pour échappement s:='Aiguillage triple '+IntToSTR(Adr)+' : configuration des aiguilles interdite'; if CDM_connecte then s:=s+': '+IntToSTR(aiguillage[index].position); @@ -6554,6 +6587,11 @@ begin afdeb:=false;//TraceListe ; it:=0; if afdeb then afficheDebug('Det_contigu '+intToSTR(det1)+' '+intToSTr(det2),clyellow); + if (det1>NbMaxDet) or (det2>NbMaxDet) then + begin + Affiche('Erreur 87 : Det_contigu '+intToSTR(det1)+' '+intToSTr(det2),clred); + exit; + end; tp:=det; if det1=0 then tp:=buttoir; @@ -7479,7 +7517,7 @@ begin exit; end; - if (Signaux[i].aspect>10) and (Signaux[i].aspect<20) then + if isDirectionnel(i) then begin s:='La demande de carré d''un signal directionnel '+IntToSTR(Adresse)+' est irrecevable'; Affiche(s,clred); @@ -7664,6 +7702,12 @@ begin //traceDet:=true; if NivDebug>=2 then AfficheDebug('Cherche signal suivant au détecteur '+IntToSTR(det1),clyellow); + if (det1>NbMaxDet) or (det2>NbMaxDet) then + begin + Affiche('Erreur 64 : signal_suivant_det '+intToSTR(det1)+' '+intToSTr(det2),clred); + exit; + end; + // trouve l'élément suivant contigu det_contigu(det2,det1,i,Typ); if i=0 then @@ -7824,7 +7868,7 @@ begin AdrSignalsuivant:=0; exit; end; - if (Signaux[i].aspect>10) and (Signaux[i].aspect<20) then + if isDirectionnel(i) then begin s:='La demande de l''état du signal suivant depuis un signal directionnel '+IntToSTR(Adresse)+' est irrecevable'; Affiche(s,clred); @@ -9026,7 +9070,7 @@ begin end else begin - if affsignal then AfficheDebug('test 403',clyellow); + if affsignal then AfficheDebug('Evaluation signal '+intToSTR(ADrSIgnal)+' test 403',clyellow); // si signal suivant affiche rappel if TestBit(etat,rappel_30) or TestBit(etat,rappel_60) then begin @@ -9041,6 +9085,12 @@ begin //if AffSignal then AfficheDebug('Mise du Feu au ralen 60',clyellow); Maj_Etat_Signal(AdrSignal,ral_60); // si signal suivant est au rappel60, il faut tester s'il est à l'avertissement aussi if TestBit(etat,jaune) then Maj_Etat_Signal(AdrSignal,jaune_cli); + + if TestBit(etat,jaune) then + begin + Maj_Etat_Signal(AdrSignal,jaune_cli); + //if affsignal then AfficheDebug('401.Mise du feu au jaune cli',clyellow); + end; end; end else @@ -9250,6 +9300,13 @@ begin else if avecResa then s:=s+intToSTR(NumTrain); afficheDebug(s,clorange); end; + + if (detecteur1>NbMaxDet) or (detecteur2>NbMaxDet) then + begin + Affiche('Erreur 63 : reserve_canton '+intToSTR(detecteur1)+' '+intToSTr(detecteur2),clred); + exit; + end; + // y a t-il un signal sur le détecteur1 cas2:=false; @@ -9543,7 +9600,14 @@ begin end; AdrSuiv:=detecteur_suivant_el(det1,det,det3,det,1); - det4:=detecteur_suivant_EL(det3,det,AdrSuiv,det,1); + if adrSuiv>NbMaxDet then + begin + if adrsuiv=9996 then affiche_evt('Erreur position inconnue aiguillage ',clred) + else + Affiche_evt('Erreur 1-0 '+intToSTR(AdrSuiv)+' : pas de suivant detecteur_suivant_el '+intToSTR(det1)+' '+intToSTR(det3),clred); + exit; + end; + //*** route validée *** if (det10 then - begin - s:='Erreur signal '+intToSTR(AdrFeu)+' au rouge et perte détecteur: ignoré'; - Affiche_Evt(s,clred); - if traceListe then AfficheDebug(s,clred); - event_det_tick[N_event_tick].reaffecte:=4; // fd sur un feu à 0 - exit; - end; - end;} + //if roulage then + //begin + // AdrFeu:=event_det_train[i].signal_rouge; + // if AdrFeu<>0 then + // begin + // s:='Erreur signal '+intToSTR(AdrFeu)+' au rouge et perte détecteur: ignoré'; + // Affiche_Evt(s,clred); + // if traceListe then AfficheDebug(s,clred); + // event_det_tick[N_event_tick].reaffecte:=4; // fd sur un feu à 0 + // exit; + // end; + //end; if (det29990 then + begin + if det4=9996 then affiche_evt('Erreur 2-0 position inconnue aiguillage ',clred) + else Affiche_evt('Erreur 2-0 '+intToSTR(Det4)+' : pas de suivant detecteur_suivant_el '+intToSTR(det3)+' '+intToSTR(AdrSuiv),clred); + end + else reserve_canton(AdrSuiv,det4,adrTrainLoc,i,2); Maj_Signaux(false); @@ -9887,7 +9964,6 @@ begin end; end; - if (nbre=2) and etat then begin if TraceListe or (NivDebug=3) or ProcPrinc then AfficheDebug('2-1 traitement Train n°'+intToSTR(i)+' 2 détecteurs',couleur); @@ -9922,10 +9998,15 @@ begin pilote_train(det2,det3,adrtrainLoc,i); // pilote le train sur det3 // test si on peut réserver le canton suivant det_suiv:=det_suiv_cont(det2,det3,1); - if det_suiv<9990 then reserve_canton(det3,det_suiv,AdrTrainLoc,i,2); - // libère canton - { libere_canton(det2,det3); - if TCOActive then for tco:=1 to nbreTCO do Maj_Aig_TCO(tco); // rafraichit les aiguillages déreservés } + if det_suiv<9990 then reserve_canton(det3,det_suiv,AdrTrainLoc,i,2) + else + begin + if det_suiv=9996 then affiche_evt('Erreur 2-0 position inconnue aiguillage ',clred) + else Affiche_evt('Erreur 2-1 '+intToSTR(Det_Suiv)+' : pas de suivant detecteur_suivant_el '+intToSTR(det2)+' '+intToSTR(det3),clred); + end; + // libère canton + // libere_canton(det2,det3); + // if TCOActive then for tco:=1 to nbreTCO do Maj_Aig_TCO(tco); // rafraichit les aiguillages déreservés end else begin @@ -9978,16 +10059,16 @@ begin efface_trajet(det3,i); end; - {if rebond and (event_det_train[i].det[2].adresse=det3) then - begin - s:='7. Rebond dét. '+intToSTR(det3)+' déjà affecté au train '+IntToSTR(i); - FormDebug.MemoEvtDet.lines.add(s); - if dupliqueEvt then AfficheDebug(s,clyellow); + //if rebond and (event_det_train[i].det[2].adresse=det3) then + //begin + // s:='7. Rebond dét. '+intToSTR(det3)+' déjà affecté au train '+IntToSTR(i); + // FormDebug.MemoEvtDet.lines.add(s); + // if dupliqueEvt then AfficheDebug(s,clyellow); // désaffecter la zone - memzone[det2,det_suiv].etat:=false; - memZone[det1,det2].etat:=true; - exit; // rebond :sortir - end; } + // memzone[det2,det_suiv].etat:=false; + // memZone[det1,det2].etat:=true; + // exit; // rebond :sortir + //end; end; traite:=true; // non traité: train suivant end; @@ -10064,7 +10145,7 @@ begin begin AdrSignal:=Signaux[i].Adresse; AdrDetSignal:=Signaux[i].Adr_Det1; - if (AdrDetSignal=Det3) and (Signaux[i].aspect<10) then + if (AdrDetSignal=Det3) and not(isDirectionnel(i)) then begin AdrSuiv:=Signaux[i].Adr_el_suiv1; TypeSuiv:=Signaux[i].Btype_suiv1; @@ -10263,25 +10344,25 @@ procedure ferme_pn_usb(i : integer); var v,cmd,numacc : integer; s : string; begin - numacc:=Tablo_pn[i].AdresseFerme; // numéro de périphérique - if numacc=0 then exit; - if (numAcc>NbMaxi_Periph) or (numacc=0) then - begin - Affiche('Erreur 56 : numéro de périphérique hors limite pour PN '+intToSTR(i),clred); - exit; - end; - v:=Tablo_periph[numacc].NumCom; // numéro de com - if v=0 then exit; - if Tablo_com_cde[numacc].PortOuvert then - begin - s:=Tablo_PN[i].CommandeF; - if Tablo_periph[numacc].cr then s:=s+#13; - cmd:=Tablo_periph[numacc].numComposant; - if cmd=1 then Formprinc.MSCommCde1.Output:=s; - if cmd=2 then Formprinc.MSCommCde2.Output:=s; - Affiche('Envoie port COM'+intToSTR(v)+' commande: '+s,clWhite); - end - else Affiche('Envoi commande impossible ; COM'+intToSTR(v)+' non détecté',clred); + numacc:=Tablo_pn[i].AdresseFerme; // numéro de périphérique + if numacc=0 then exit; + if (numAcc>NbMaxi_Periph) or (numacc=0) then + begin + Affiche('Erreur 56 : numéro de périphérique hors limite pour PN '+intToSTR(i),clred); + exit; + end; + v:=Tablo_periph[numacc].NumCom; // numéro de com + if v=0 then exit; + if Tablo_com_cde[numacc].PortOuvert then + begin + s:=Tablo_PN[i].CommandeF; + if Tablo_periph[numacc].cr then s:=s+#13; + cmd:=Tablo_periph[numacc].numComposant; + if cmd=1 then Formprinc.MSCommCde1.Output:=s; + if cmd=2 then Formprinc.MSCommCde2.Output:=s; + Affiche('Envoie port COM'+intToSTR(v)+' commande: '+s,clWhite); + end + else Affiche('Envoi commande impossible ; COM'+intToSTR(v)+' non détecté',clred); end; // ouvre le pn par port com usb @@ -10289,24 +10370,24 @@ procedure ouvre_pn_usb(i : integer); var v,cmd,numacc : integer; s : string; begin - numacc:=Tablo_pn[i].AdresseFerme; // numéro d'accessoire - if (numAcc>NbMaxi_Periph) or (numacc=0) then - begin - Affiche('Erreur 57 : numéro de périphérique hors limite pour PN '+intToSTR(i),clred); - exit; - end; - v:=Tablo_periph[numacc].NumCom; // numéro de com - if v=0 then exit; - if Tablo_com_cde[numacc].PortOuvert then - begin - s:=Tablo_PN[i].CommandeO; - if Tablo_periph[numacc].cr then s:=s+#13; - cmd:=Tablo_periph[numacc].numComposant; - if cmd=1 then Formprinc.MSCommCde1.Output:=s; - if cmd=2 then Formprinc.MSCommCde2.Output:=s; - Affiche('Envoie port COM'+intToSTR(v)+' commande: '+s,clWhite); - end - else Affiche('Envoi commande impossible ; COM'+intToSTR(v)+' non détecté',clred); + numacc:=Tablo_pn[i].AdresseFerme; // numéro d'accessoire + if (numAcc>NbMaxi_Periph) or (numacc=0) then + begin + Affiche('Erreur 57 : numéro de périphérique hors limite pour PN '+intToSTR(i),clred); + exit; + end; + v:=Tablo_periph[numacc].NumCom; // numéro de com + if v=0 then exit; + if Tablo_com_cde[numacc].PortOuvert then + begin + s:=Tablo_PN[i].CommandeO; + if Tablo_periph[numacc].cr then s:=s+#13; + cmd:=Tablo_periph[numacc].numComposant; + if cmd=1 then Formprinc.MSCommCde1.Output:=s; + if cmd=2 then Formprinc.MSCommCde2.Output:=s; + Affiche('Envoie port COM'+intToSTR(v)+' commande: '+s,clWhite); + end + else Affiche('Envoi commande impossible ; COM'+intToSTR(v)+' non détecté',clred); end; // ouvre le pn par socket i = index tablo_pn @@ -10314,14 +10395,14 @@ procedure ouvre_pn_socket(i : integer); var numacc,cmd : integer; s : string; begin - numacc:=Tablo_pn[i].AdresseFerme; // numéro d'accessoire - if numacc=0 then exit; - s:=Tablo_PN[i].CommandeO; - if Tablo_periph[numacc].cr then s:=s+#13; - cmd:=Tablo_periph[numacc].numComposant; - if cmd=1 then Formprinc.ClientSocketCde1.Socket.SendText(s); - if cmd=2 then Formprinc.ClientSocketCde2.Socket.SendText(s); - Affiche('Envoie socket'+intToSTR(numacc)+' commande: '+s,clWhite); + numacc:=Tablo_pn[i].AdresseFerme; // numéro d'accessoire + if numacc=0 then exit; + s:=Tablo_PN[i].CommandeO; + if Tablo_periph[numacc].cr then s:=s+#13; + cmd:=Tablo_periph[numacc].numComposant; + if cmd=1 then Formprinc.ClientSocketCde1.Socket.SendText(s); + if cmd=2 then Formprinc.ClientSocketCde2.Socket.SendText(s); + Affiche('Envoie socket'+intToSTR(numacc)+' commande: '+s,clWhite); end; // ferme le pn par socket i = index tablo_pn @@ -10329,14 +10410,14 @@ procedure ferme_pn_socket(i : integer); var numacc,cmd : integer; s : string; begin - numacc:=Tablo_pn[i].AdresseFerme; // numéro d'accessoire - if numacc=0 then exit; - s:=Tablo_PN[i].CommandeF; - if Tablo_periph[numacc].cr then s:=s+#13; - cmd:=Tablo_periph[numacc].numComposant; - if cmd=1 then Formprinc.ClientSocketCde1.Socket.SendText(s); - if cmd=2 then Formprinc.ClientSocketCde2.Socket.SendText(s); - Affiche('Envoie socket'+intToSTR(numacc)+' commande: '+s,clWhite); + numacc:=Tablo_pn[i].AdresseFerme; // numéro d'accessoire + if numacc=0 then exit; + s:=Tablo_PN[i].CommandeF; + if Tablo_periph[numacc].cr then s:=s+#13; + cmd:=Tablo_periph[numacc].numComposant; + if cmd=1 then Formprinc.ClientSocketCde1.Socket.SendText(s); + if cmd=2 then Formprinc.ClientSocketCde2.Socket.SendText(s); + Affiche('Envoie socket'+intToSTR(numacc)+' commande: '+s,clWhite); end; @@ -10789,9 +10870,8 @@ begin begin AdrSignal:=Signaux[i].Adresse; AdrDetSignal:=Signaux[i].Adr_Det1; - if (AdrDetSignal=Adresse) and (Signaux[i].aspect<10) then + if (AdrDetSignal=Adresse) and not(isDirectionnel(i)) then begin - AdrSuiv:=Signaux[i].Adr_el_suiv1; TypeSuiv:=Signaux[i].Btype_suiv1; if AffSignal then AfficheDebug('Pour signal '+intToSTR(AdrSignal)+' detecteursuivant('+intToSTR(AdrSuiv)+','+BTypeToChaine(typeSuiv)+','+intToSTR(AdrDetSignal)+',1)',clyellow); @@ -12115,14 +12195,14 @@ end; // le numéro de port function connecte_port_usb(port : integer) : integer; var i,j : integer; - trouve : boolean; + trouve,portOK : boolean; s,sc : string; begin result:=0; trouve:=false; With Formprinc.MSCommUSBInterface do begin - if debug=1 then Affiche('Test port com'+intToSTR(port),clLime); + //if debug=1 then Affiche('Test port com'+intToSTR(port),clLime); version_interface:=''; i:=pos(':',portCom); j:=pos(',',PortCom); @@ -12137,7 +12217,13 @@ begin SThreshold:=1; RThreshold:=1; InputLen:=0; - CommPort:=Port; + portOK:=true; + try + CommPort:=Port; + except + Affiche('Port COM'+intToSTR(port)+' invalide',clred); + portOK:=false; + end; if protocole=2 then DTREnable:=false // évite de reset de l'arduino à la connexion else DTREnable:=True; if prot_serie=4 then RTSEnable:=True //pour la genli @@ -12145,11 +12231,15 @@ begin InputMode:=comInputModeBinary; end; - portCommOuvert:=true; - try - Formprinc.MSCommUSBInterface.portopen:=true; - except - portCommOuvert:=false; + portCommOuvert:=false; + if portOK then + begin + portCommOuvert:=true; + try + Formprinc.MSCommUSBInterface.portopen:=true; + except + portCommOuvert:=false; + end; end; if portCommOuvert then @@ -12240,7 +12330,6 @@ begin begin numport:=1; repeat - //Affiche('Test port COM'+intToSTR(numport),clyellow); With Formprinc.MSCommUSBInterface do begin //Affiche('Test port com'+intToSTR(numport),clyellow); @@ -12645,7 +12734,7 @@ end; // positionnement des aiguillages au démarrage : seulement en mode autonome procedure init_aiguillages; -var i,pos,index : integer; +var i,pos : integer; s : string; model : Tequipement; begin @@ -12658,15 +12747,13 @@ begin init_aig_cours:=true; for i:=1 to maxaiguillage do begin - index:=index_aig(i); - - model:=aiguillage[index].modele; + model:=aiguillage[i].modele; if (model<>rien) and (model<>crois) then // si l'aiguillage existe et différent de croisement begin - pos:=aiguillage[index].posInit; + pos:=aiguillage[i].posInit; if (pos=const_devie) or (pos=const_droit) then begin - s:='Init aiguillage '+intToSTR(i)+'='+intToSTR(pos); + s:='Init aiguillage '+intToSTR(aiguillage[i].Adresse)+'='+intToSTR(pos); case pos of const_devie : s:=s+' (dévié)'; const_droit : s:=s+' (droit)'; @@ -12674,23 +12761,21 @@ begin s:=s+' non positionné'; end; Affiche(s,clcyan); - aiguillage[index].position:=pos; + aiguillage[i].position:=pos; end; end; end; for i:=1 to maxaiguillage do begin - index:=index_aig(i); - - model:=aiguillage[index].modele; + model:=aiguillage[i].modele; if (model<>rien) and (model<>crois) then // si l'aiguillage existe et différent de croisement begin - pos:=aiguillage[index].posInit; + pos:=aiguillage[i].posInit; if (pos=const_devie) or (pos=const_droit) then begin - pilote_acc(i,pos,aigP); + pilote_acc(aiguillage[i].Adresse,pos,aigP); if portCommOuvert or parSocketLenz or CDM_connecte then sleep(Tempo_Aig); end; end; @@ -12831,10 +12916,10 @@ begin GroupBox1.Top:=5; Affiche_signaux; - if not(avec_Splitter) then GrandPanel.Width:=i; end; end; +// positionne la couleur de fond et le texte du composant procedure composant(c : tComponent;fond,texte : tColor); var cGB : TGroupBox; cTE : tEdit; @@ -12926,9 +13011,9 @@ begin end; end; +// couleurs de la fenetre principale procedure couleurs_Princ; -var - fond,texte : tColor; +var fond,texte : tColor; i : integer; c : Tcomponent; cSc: tScrollBox; @@ -12960,6 +13045,7 @@ begin end; end; +// mettre à jour les couleurs de fond des fenêtres procedure maj_couleurs; begin couleurs_princ; @@ -12971,6 +13057,15 @@ begin couleurs_pilote; end; +// renvoie la taille d'un fichier +function FileSize(const aFilename: String): Int64; +var info: TWin32FileAttributeData; +begin + result:=-1; + if not GetFileAttributesEx(PChar(aFileName),GetFileExInfoStandard,@info) then exit; + result:=Int64(info.nFileSizeLow) or Int64(info.nFileSizeHigh shl 32); +end; + // démarrage principal du programme signaux_complexes procedure TFormPrinc.FormCreate(Sender: TObject); var n,t,i,index,OrgMilieu : integer; @@ -12985,6 +13080,7 @@ begin configPrete:=false; // form config prete PremierFD:=false; sauve_tco:=false; + pasChgTBV:=false; ntrains:=0; ntrains_cdm:=0; protocole:=1; @@ -13035,7 +13131,6 @@ begin etape:=1; affevt:=false; EvtClicDet:=false; - avec_splitter:=true; Algo_localisation:=1; // normal AntiTimeoutEthLenz:=0; Verif_AdrXpressNet:=1; @@ -13061,12 +13156,19 @@ begin begin OsBits:=64; CheminProgrammes:=GetCurrentProcessEnvVar('PROGRAMFILES(X86)'); + cheminWin:=GetCurrentProcessEnvVar('windir')+'\SysWOW64'; end else begin OsBits:=32; CheminProgrammes:=GetCurrentProcessEnvVar('PROGRAMFILES'); + cheminWin:=GetCurrentProcessEnvVar('windir')+'\System32'; end; + + // vérifier ocx tmscomm + i:=filesize(cheminwin+'\mscomm32.ocx'); + if (i<>103744) and (i<>-1) then Affiche('Version fichier '+cheminwin+'\mscomm32.ocx incorrecte',clred); + // version d'OS pour info application.ProcessMessages; @@ -13114,7 +13216,27 @@ begin procetape('Lecture de la configuration'); lit_config; - serveur_ouvert:=true; + n:=Screen.MonitorCount-1; + if n>9 then n:=9; + for i:=0 to n do + begin + //Affiche('Ecran '+intToSTR(i),clyellow); + ecran[i+1].x0:=Screen.Monitors[i].BoundsRect.Left; + ecran[i+1].y0:=Screen.Monitors[i].BoundsRect.Top; + ecran[i+1].larg:=Screen.Monitors[i].BoundsRect.right-Screen.Monitors[i].BoundsRect.left; + ecran[i+1].Haut:=Screen.Monitors[i].BoundsRect.bottom-Screen.Monitors[i].BoundsRect.top; + + { Affiche('left='+intToSTR(Screen.Monitors[i].BoundsRect.left)+' top='+intToSTR(Screen.Monitors[i].BoundsRect.Top)+' '+ + 'right='+intToSTR(Screen.Monitors[i].BoundsRect.right)+' bottom='+intToSTR(Screen.Monitors[i].BoundsRect.bottom),clLime); + + Affiche(intToSTR(ecran[i+1].x0)+' '+intToSTR(ecran[i+1].y0)+' '+ + intToSTR(ecran[i+1].larg)+' '+intToSTR(ecran[i+1].haut),clyellow); } + end; + + if ecran_sc<1 then ecran_SC:=1; + if Ecran_SC>Screen.MonitorCount then Ecran_SC:=1; + + serveur_ouvert:=true; serverSocket.Port:=PortServeur; try ServerSocket.Open; @@ -13164,22 +13286,7 @@ begin if debug=1 then Affiche('Création TCO',clLime); // il faut afficher la fenetre TCO pour l'init aiguillage sinon violation - n:=Screen.MonitorCount-1; - if n>9 then n:=9; - for i:=0 to n do - begin - //Affiche('Ecran '+intToSTR(i),clyellow); - ecran[i+1].x0:=Screen.Monitors[i].BoundsRect.Left; - ecran[i+1].y0:=Screen.Monitors[i].BoundsRect.Top; - ecran[i+1].larg:=Screen.Monitors[i].BoundsRect.right-Screen.Monitors[i].BoundsRect.left; - ecran[i+1].Haut:=Screen.Monitors[i].BoundsRect.bottom-Screen.Monitors[i].BoundsRect.top; - { Affiche('left='+intToSTR(Screen.Monitors[i].BoundsRect.left)+' top='+intToSTR(Screen.Monitors[i].BoundsRect.Top)+' '+ - 'right='+intToSTR(Screen.Monitors[i].BoundsRect.right)+' bottom='+intToSTR(Screen.Monitors[i].BoundsRect.bottom),clLime); - - Affiche(intToSTR(ecran[i+1].x0)+' '+intToSTR(ecran[i+1].y0)+' '+ - intToSTR(ecran[i+1].larg)+' '+intToSTR(ecran[i+1].haut),clyellow); } - end; OrgMilieu:=formprinc.width div 2; with statusbar1 do begin @@ -13202,9 +13309,8 @@ begin Anchors:=[akLeft,akTop,akRight,akBottom]; end; - if avec_splitter then + with Fenrich do begin - with Fenrich do begin left:=5; Align:=AlLeft; // si on ne met pas AlignLeft, alors le splitter n'est pas accrochable @@ -13232,30 +13338,6 @@ begin top:=GroupBox3.Top+GroupBox3.Height+5; end; positionne_elements(splitterV.left); - - end - - // ---------sans splitter ------------- - else - begin - splitterV.Visible:=false; - with Fenrich do - begin - Align:=alLeft; - left:=5; - top:=0; - - width:=GrandPanel.Width-orgMilieu-10; - height:=GrandPanel.Height; - //Anchors:=[akLeft,akTop,akRight,akBottom]; - GroupBox1.Left:=orgMilieu+12; - GroupBox3.Left:=orgMilieu+12; - ScrollBox1.Left:=orgMilieu+12; - ScrollBox1.width:=GrandPanel.Width-orgMilieu-5; - ScrollBox1.top:=GroupBox3.Top+GroupBox3.Height+5; - ScrollBox1.Anchors:=[akTop,akRight,akBottom]; - Panel1.Left:=GroupBox1.Left+GroupBox1.Width+5; - end; end; if (PosSplitter>0) and (PosSPlitter0 then begin @@ -14107,7 +14189,7 @@ begin if tablo_com_cde[index].PortOuvert then begin tablo_com_cde[index].PortOuvert:=false; - if index=1 then Formprinc.ClientSocketCde1.Close; + if index=1 then Formprinc.ClientSocketCde1.close; if index=2 then Formprinc.ClientSocketCde1.close; if debug>0 then Affiche('Socket '+intToSTR(Tablo_periph[index].NumCom)+' périphérique déconnecté',clyellow); Formprinc.StatusBar1.Panels[3].Text:=''; @@ -15478,15 +15560,7 @@ procedure TFormPrinc.ButtonAffTCOClick(Sender: TObject); var i : integer; begin for i:=1 to NbreTCO do - { begin - if formTCO[i]<>nil then - begin - formTCO[i].windowState:=wsNormal; //Maximized; - formTCO[i].show; - formTCO[i].BringToFront; - end; - end;} - Affiche_Fenetre_TCO(i,true); + Affiche_Fenetre_TCO(i,true); end; procedure TFormPrinc.ButtonLanceCDMClick(Sender: TObject); @@ -15840,8 +15914,8 @@ var s: string; i,adresse : integer; begin clicliste:=false; - s:=((Tpopupmenu(Tmenuitem(sender).GetParentMenu).PopupComponent) as TImage).name; // nom du composant, pout récupérer l'adresse du feu (ex: ImageFeu260) - //Affiche(s,clOrange); // nom de l'image du signal (ex: ImageFeu2) + s:=((Tpopupmenu(Tmenuitem(sender).GetParentMenu).PopupComponent) as TImage).name; // nom du composant, pout récupérer l'adresse du signal (ex: ImageFeu260) + //Affiche(s,clOrange); // nom de l'image du signal (ex: ImageSignak2) i:=extract_int(s); // extraire l'index (ex 2) adresse:=Signaux[i].adresse; @@ -16007,6 +16081,8 @@ var s : string; i,adr,vit,erreur : integer; sens : boolean; begin + if affEvt then Affiche('Changement TrackBarVit',clyellow); + if pasChgTBV then exit; EditVitesse.Text:=intToSTR(TrackBarVit.position); s:=editAdrTrain.Text; val(s,adr,erreur); @@ -17042,6 +17118,9 @@ begin menu_tco(NbreTCO); TCO_modifie:=true; config_modifie:=true; + {$IF CompilerVersion >= 28.0} + formTCO[nbreTCO].StyleName:='windows'; + {$IFEND} formTCO[nbreTCO].show; // génère formActivate ce qui implique que le nom de la form soit à jour, et que le TCO soit initialisé FormConfigTCO.show; @@ -17451,10 +17530,7 @@ begin if n>1 then affiche(intToSTR(n)+' clients connectés',clyellow); end; - - - - -end. +begin + end. diff --git a/UnitSimule.dfm b/UnitSimule.dfm index c8c245e..c18bada 100644 --- a/UnitSimule.dfm +++ b/UnitSimule.dfm @@ -13,6 +13,7 @@ object FormSimulation: TFormSimulation Font.Name = 'MS Sans Serif' Font.Style = [] OldCreateOrder = False + Position = poMainFormCenter OnCreate = FormCreate PixelsPerInch = 96 TextHeight = 13 diff --git a/UnitTCO.dfm b/UnitTCO.dfm index 45d39b6..55354d1 100644 --- a/UnitTCO.dfm +++ b/UnitTCO.dfm @@ -1,6 +1,6 @@ object FormTCO: TFormTCO - Left = 65 - Top = 39 + Left = 73 + Top = 79 Width = 1212 Height = 661 VertScrollBar.Visible = False @@ -24,8 +24,8 @@ object FormTCO: TFormTCO OnKeyPress = FormKeyPress OnMouseWheel = FormMouseWheel DesignSize = ( - 1204 - 610) + 1196 + 602) PixelsPerInch = 96 TextHeight = 13 object LabelZoom: TLabel @@ -955,7 +955,7 @@ object FormTCO: TFormTCO Left = 8 Top = 3 Width = 225 - Height = 125 + Height = 134 Caption = 'Configuration cellule' Font.Charset = ANSI_CHARSET Font.Color = clBackground @@ -965,8 +965,8 @@ object FormTCO: TFormTCO ParentFont = False TabOrder = 4 object Label41: TLabel - Left = 64 - Top = 20 + Left = 72 + Top = 18 Width = 103 Height = 16 Caption = 'Adresse de l'#39#233'l'#233'ment: ' @@ -978,7 +978,7 @@ object FormTCO: TFormTCO ParentFont = False end object Label71: TLabel - Left = 72 + Left = 80 Top = 36 Width = 93 Height = 16 @@ -991,7 +991,7 @@ object FormTCO: TFormTCO ParentFont = False end object Label230: TLabel - Left = 88 + Left = 48 Top = 56 Width = 27 Height = 16 @@ -1005,7 +1005,7 @@ object FormTCO: TFormTCO end object Label65: TLabel Left = 40 - Top = 74 + Top = 80 Width = 75 Height = 16 Caption = 'position du texte' @@ -1018,13 +1018,13 @@ object FormTCO: TFormTCO end object ShapeCoulFond: TShape Left = 200 - Top = 98 + Top = 106 Width = 18 Height = 18 end object EditAdrElement: TEdit - Left = 176 - Top = 20 + Left = 184 + Top = 14 Width = 33 Height = 21 Font.Charset = ANSI_CHARSET @@ -1038,8 +1038,8 @@ object FormTCO: TFormTCO OnClick = EditAdrElementClick end object EditTypeImage: TEdit - Left = 176 - Top = 36 + Left = 184 + Top = 34 Width = 33 Height = 21 Font.Charset = ANSI_CHARSET @@ -1053,8 +1053,8 @@ object FormTCO: TFormTCO OnChange = EditTypeImageChange end object ButtonFonte: TButton - Left = 32 - Top = 58 + Left = 8 + Top = 56 Width = 41 Height = 17 Caption = 'Fonte' @@ -1062,9 +1062,9 @@ object FormTCO: TFormTCO OnClick = ButtonFonteClick end object EditTexte: TEdit - Left = 120 + Left = 80 Top = 54 - Width = 89 + Width = 137 Height = 21 Font.Charset = ANSI_CHARSET Font.Color = clBackground @@ -1077,7 +1077,7 @@ object FormTCO: TFormTCO end object ComboRepr: TComboBox Left = 120 - Top = 72 + Top = 78 Width = 89 Height = 21 Style = csDropDownList @@ -1101,7 +1101,7 @@ object FormTCO: TFormTCO end object CheckPinv: TCheckBox Left = 8 - Top = 98 + Top = 106 Width = 113 Height = 17 Hint = 'Cocher si l'#39'aiguillage est repr'#233'sent'#233' invers'#233 @@ -1119,7 +1119,7 @@ object FormTCO: TFormTCO end object ButtonCoulFond: TButton Left = 120 - Top = 98 + Top = 106 Width = 81 Height = 18 Caption = 'Couleur de fond' diff --git a/UnitTCO.pas b/UnitTCO.pas index 304013c..1acf971 100644 --- a/UnitTCO.pas +++ b/UnitTCO.pas @@ -582,6 +582,7 @@ procedure Tourne90G(indexTCO : integer); procedure Tourne90D(indexTCO : integer); procedure Maj_TCO(indexTCO,Adresse : integer); procedure Vertical(indexTCO : integer); +procedure Vertical180(indexTCO : integer); procedure signalG(indexTCO : integer); procedure signalD(indexTCO : integer); procedure lire_fichier_tco(indexTCO : integer); @@ -1026,8 +1027,7 @@ begin //Affiche(GetCurrentDir,clYellow); {$I+} try - // assign(fichier,fichierTCO[indexTCO]); - assign(fichier,NomfichierTCO[indexTCO]); + assignFile(fichier,NomfichierTCO[indexTCO]); reset(fichier); except init_tco(indexTCO); @@ -8615,7 +8615,7 @@ begin if (aspect=3) and (Oriente=1) and (pied=1) then begin xt:=round(45*frxGlob[indexTCO]);yt:=1;end; // signal à gauche if (aspect=3) and (Oriente=2) and (pied=1) then begin xt:=round(10*frxGlob[indexTCO]);yt:=round(40*fryGlob[indexTCO]);end; // signal à G if (aspect=3) and (Oriente=2) and (pied=2) then begin xt:=round(20*frxGlob[indexTCO]);yt:=0;end; // signal à droite - if (aspect=3) and (Oriente=3) then begin xt:=round(10*frxGlob[indexTCO]);yt:=hauteurCell[indexTCO];end; + if (aspect=3) and (Oriente=3) then begin xt:=round(40*frxGlob[indexTCO]);yt:=round(36*fryGlob[indexTCO]);end; if (aspect=3) and (Oriente=4) and (pied=1) then begin xt:=round(35*frxGlob[indexTCO]);yt:=round(1*frYGlob[indexTCO]);end; if (aspect=3) and (Oriente=4) and (pied=2) then begin xt:=round(3*frxGlob[indexTCO]);yt:=round(1*frYGlob[indexTCO]);end; @@ -13051,7 +13051,7 @@ begin tourne90D(indextco); end; -procedure vertical_180(indexTCO : integer); +procedure vertical180(indexTCO : integer); var BImage ,aspect,Adresse : integer; begin if actualize then exit; @@ -13153,7 +13153,7 @@ begin c:=popupmenu1.PopupComponent ; // imageTCO c:=c.GetParentComponent; // scrollBox c:=c.GetParentComponent; // formTCO - vertical_180(index_tco(c)); + vertical180(index_tco(c)); end; procedure TFormTCO.TrackBarZoomChange(Sender: TObject); @@ -13256,6 +13256,7 @@ begin ScrollBox.Height:=ClientHeight-32; BandeauMasque:=true; defocusControl(ButtonMasquer,true); + Bandeau.Caption:='Afficher le bandeau'; end; procedure TFormTCO.ImageTCODblClick(Sender: TObject); @@ -13331,7 +13332,7 @@ begin efface_entoure(indexTCO); SelectionAffichee[indexTCO]:=false; - if (Signaux[i].aspect>10) and (Signaux[i].aspect<20) then + if isDirectionnel(i) then begin GroupBox1.Visible:=false; GroupBox2.Visible:=false; diff --git a/Unitplace.dfm b/Unitplace.dfm index 1dcf1c6..4037fb9 100644 --- a/Unitplace.dfm +++ b/Unitplace.dfm @@ -13,6 +13,7 @@ object FormPlace: TFormPlace Font.Style = [] KeyPreview = True OldCreateOrder = False + Position = poMainFormCenter OnActivate = FormActivate OnCreate = FormCreate OnKeyPress = FormKeyPress diff --git a/Unitplace.pas b/Unitplace.pas index bce6d93..44c2e35 100644 --- a/Unitplace.pas +++ b/Unitplace.pas @@ -131,6 +131,7 @@ begin EditDir6.Text:=IntToSTR(placement[6].detdir); Edit6.text:=intToSTR(placement[6].detecteur); CheckInverse6.Checked:=placement[6].inverse; + defocusControl(ButtonInitAig,false); end; procedure TFormPlace.ButtonPlaceClick(Sender: TObject); diff --git a/verif_version.pas b/verif_version.pas index c4c12e3..075a734 100644 --- a/verif_version.pas +++ b/verif_version.pas @@ -25,7 +25,7 @@ var verifVersion,notificationVersion : boolean; date_creation,nombre_tel : string; -Const Version='8.4'; // sert à la comparaison de la version publiée +Const Version='8.41'; // sert à la comparaison de la version publiée SousVersion=' '; // A B C ... en cas d'absence de sous version mettre un espace function GetCurrentProcessEnvVar(const VariableName: string): string; diff --git a/versions.txt b/versions.txt index 87a84f7..3e39bc3 100644 --- a/versions.txt +++ b/versions.txt @@ -227,4 +227,6 @@ version 8.38 : Ajout de l'importation depuis le r Amélioration du traitement des trames inconnues en XpressNet. version 8.4 : Création de la version D11 (deux exécutables disponibles après installation) qui permet de choisir des styles d'affichage. Lire la documentation pages 6 et 7. +version 8.41 : Améliorations diverses dans les traitements + Possibilité d'ouvrir signaux_complexes sur un écran au choix.