diff --git a/Notice avancée pour les signaux complexes GL.pdf b/Notice avancée pour les signaux complexes GL.pdf deleted file mode 100644 index f4432a8..0000000 Binary files a/Notice avancée pour les signaux complexes GL.pdf and /dev/null differ diff --git a/Notice d'utilisation des signaux_complexes_GL_V1.61.pdf b/Notice d'utilisation des signaux_complexes_GL_V1.7.pdf similarity index 61% rename from Notice d'utilisation des signaux_complexes_GL_V1.61.pdf rename to Notice d'utilisation des signaux_complexes_GL_V1.7.pdf index bcbde27..8a4ea2f 100644 Binary files a/Notice d'utilisation des signaux_complexes_GL_V1.61.pdf and b/Notice d'utilisation des signaux_complexes_GL_V1.7.pdf differ diff --git a/UnitConfig.dcu b/UnitConfig.dcu index 4910eaa..810d41b 100644 Binary files a/UnitConfig.dcu and b/UnitConfig.dcu differ diff --git a/UnitConfig.dfm b/UnitConfig.dfm index 697085c..0910733 100644 --- a/UnitConfig.dfm +++ b/UnitConfig.dfm @@ -1,13 +1,13 @@ object FormConfig: TFormConfig - Left = 318 - Top = 157 + Left = 250 + Top = 200 Hint = 'Modifie les fichiers de configuration selon les s'#233'lections chois' + 'ies' BorderStyle = bsDialog Caption = 'Configuration g'#233'n'#233'rale' - ClientHeight = 644 - ClientWidth = 592 + ClientHeight = 472 + ClientWidth = 858 Color = clBtnFace Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText @@ -17,6 +17,7 @@ object FormConfig: TFormConfig OldCreateOrder = False Position = poScreenCenter OnActivate = FormActivate + OnCreate = FormCreate PixelsPerInch = 96 TextHeight = 13 object LabelInfo: TLabel @@ -33,9 +34,9 @@ object FormConfig: TFormConfig WordWrap = True end object Image1: TImage - Left = 304 - Top = 392 - Width = 257 + Left = 600 + Top = 128 + Width = 249 Height = 177 Picture.Data = { 0A544A504547496D6167655BA20000FFD8FFE000104A46494600010101006000 @@ -1340,426 +1341,695 @@ object FormConfig: TFormConfig 8ACBD9799A732EC7FFD9} Stretch = True end - object GroupBox1: TGroupBox - Left = 8 - Top = 8 - Width = 273 - Height = 81 - Caption = 'CDM Rail' - TabOrder = 0 - object Label1: TLabel - Left = 14 - Top = 26 - Width = 150 - Height = 13 - Caption = 'Adresse IP du serveur CDM rail ' - end - object Label2: TLabel - Left = 14 - Top = 50 - Width = 115 - Height = 13 - Caption = 'Port du serveur CDM rail' - end - object EditAdrIPCDM: TEdit - Left = 176 - Top = 24 - Width = 81 - Height = 21 - TabStop = False - TabOrder = 0 - Text = 'EditAdrIPCDM' - end - object EditPortCDM: TEdit - Left = 176 - Top = 48 - Width = 81 - Height = 21 - TabStop = False - TabOrder = 1 - Text = 'EditPortCDM' - end - end - object GroupBox2: TGroupBox - Left = 288 - Top = 8 - Width = 297 - Height = 153 - Caption = 'Acc'#232's USB - S'#233'rie '#224' l'#39'interface vers la centrale LENZ' - TabOrder = 1 - object Label3: TLabel - Left = 16 - Top = 56 - Width = 128 - Height = 13 - Caption = 'Protocole s'#233'rie USB (COM)' - end - object Label4: TLabel - Left = 16 - Top = 80 - Width = 126 - Height = 26 - Caption = 'Temporisation d'#39'envoi des octets de la trame (ms)' - WordWrap = True - end - object Label5: TLabel - Left = 16 - Top = 112 - Width = 152 - Height = 26 - Caption = 'Temporisation d'#39'attente de la r'#233'ponse de l'#39'interface (x 100 ms)' - WordWrap = True - end - object Label9: TLabel - Left = 16 - Top = 16 - Width = 249 - Height = 26 - Caption = 'Ces param'#232'tres sont utilis'#233's en fonctionnement sans CDM Rail' - WordWrap = True - end - object EditcomUSB: TEdit - Left = 160 - Top = 56 - Width = 121 - Height = 21 - TabStop = False - TabOrder = 0 - Text = 'EditcomUSB' - end - object EditTempoOctetUSB: TEdit - Left = 232 - Top = 88 - Width = 49 - Height = 21 - TabStop = False - TabOrder = 1 - Text = 'EditTempoOctetUSB' - end - object EditTempoReponse: TEdit - Left = 232 - Top = 120 - Width = 49 - Height = 21 - TabStop = False - TabOrder = 2 - Text = 'EditTempoReponse' - end + object Label11: TLabel + Left = 600 + Top = 32 + Width = 244 + Height = 31 + Caption = 'Signaux complexes GL' + Font.Charset = ANSI_CHARSET + Font.Color = clWindowText + Font.Height = -27 + Font.Name = 'Arial Narrow' + Font.Style = [fsBold, fsItalic] + ParentFont = False end object ButtonAppliquerEtFermer: TButton - Left = 48 - Top = 600 + Left = 384 + Top = 440 Width = 201 Height = 25 Caption = 'Enregistrer la configuration et Fermer' ParentShowHint = False ShowHint = True - TabOrder = 2 + TabOrder = 0 OnClick = ButtonAppliquerEtFermerClick end - object GroupBox3: TGroupBox - Left = 288 - Top = 280 - Width = 297 - Height = 105 - Caption = 'Acc'#232's r'#233'seau '#224' l'#39'interface vers la centrale LENZ Ethernet' - TabOrder = 3 - object Label7: TLabel - Left = 14 - Top = 56 - Width = 95 - Height = 13 - Caption = 'Adresse IP interface' - end - object Label8: TLabel - Left = 14 - Top = 82 - Width = 82 - Height = 13 - Caption = 'Port de l'#39'interface' - end - object Label11: TLabel - Left = 8 - Top = 16 - Width = 249 - Height = 13 - Caption = 'Ces param'#232'tres sont utilis'#233's en fonctionnement sans ' - end - object Label12: TLabel - Left = 8 - Top = 32 - Width = 40 - Height = 13 - Caption = 'CDM rail' - end - object EditIPLenz: TEdit - Left = 176 - Top = 56 - Width = 81 - Height = 21 - TabStop = False - TabOrder = 0 - Text = 'EditIPLenz' - end - object EditportLenz: TEdit - Left = 176 - Top = 80 - Width = 81 - Height = 21 - TabStop = False - TabOrder = 1 - Text = 'EditportLenz' - end - end - object GroupBox4: TGroupBox - Left = 288 - Top = 168 - Width = 297 - Height = 105 - Caption = 'Ent'#234'te des trames vers l'#39'interface' - TabOrder = 4 - object Label14: TLabel - Left = 16 - Top = 16 - Width = 249 - Height = 26 - Caption = 'Ces param'#232'tres sont utilis'#233's en fonctionnement sans CDM Rail' - WordWrap = True - end - object RadioButton1: TRadioButton - Left = 8 - Top = 48 - Width = 225 - Height = 17 - Caption = 'Sans ent'#234'te (interfaces s'#233'rie)' - TabOrder = 0 - end - object RadioButton2: TRadioButton - Left = 8 - Top = 64 - Width = 225 - Height = 17 - Caption = 'Ent'#234'te FF FE (interfaces natives USB)' - TabOrder = 1 - end - object RadioButton3: TRadioButton - Left = 8 - Top = 80 - Width = 265 - Height = 17 - Caption = 'Ent'#234'te E4 - Suffixe 0D 0D 0A (arduino XpressNet)' - TabOrder = 2 - end - end object Button2: TButton - Left = 328 - Top = 600 + Left = 24 + Top = 440 Width = 201 Height = 25 Caption = 'Fermer sans enregistrer la configuration' - TabOrder = 5 + TabOrder = 1 OnClick = Button2Click end - object GroupBox5: TGroupBox + object PageControl: TPageControl Left = 8 - Top = 96 - Width = 273 - Height = 161 - Caption = 'Au d'#233'marrage ' - TabOrder = 6 - object Label13: TLabel - Left = 8 - Top = 100 - Width = 242 - Height = 26 - Caption = - 'Nom du fichier LAY '#224' ouvrir au d'#233'marrage de CDM rail (n'#233'cessite ' + - 'la version mini 7.03 de CDM Rail)' - WordWrap = True + Top = 8 + Width = 585 + Height = 417 + ActivePage = TabSheetAutonome + Font.Charset = DEFAULT_CHARSET + Font.Color = clBackground + Font.Height = -11 + Font.Name = 'MS Sans Serif' + Font.Style = [] + ParentFont = False + TabOrder = 2 + object TabSheetCDM: TTabSheet + Caption = 'CDM Rail' + object GroupBox1: TGroupBox + Left = 8 + Top = 8 + Width = 273 + Height = 81 + Caption = 'CDM Rail' + TabOrder = 0 + object Label1: TLabel + Left = 14 + Top = 26 + Width = 150 + Height = 13 + Caption = 'Adresse IP du serveur CDM rail ' + end + object Label2: TLabel + Left = 14 + Top = 50 + Width = 115 + Height = 13 + Caption = 'Port du serveur CDM rail' + end + object EditAdrIPCDM: TEdit + Left = 176 + Top = 24 + Width = 81 + Height = 21 + TabStop = False + TabOrder = 0 + Text = 'EditAdrIPCDM' + end + object EditPortCDM: TEdit + Left = 176 + Top = 48 + Width = 81 + Height = 21 + TabStop = False + TabOrder = 1 + Text = 'EditPortCDM' + end + end + object GroupBox5: TGroupBox + Left = 8 + Top = 96 + Width = 273 + Height = 161 + Caption = 'Au d'#233'marrage ' + TabOrder = 1 + object Label13: TLabel + Left = 8 + Top = 100 + Width = 242 + Height = 26 + Caption = + 'Nom du fichier LAY '#224' ouvrir au d'#233'marrage de CDM rail (n'#233'cessite ' + + 'la version mini 7.03 de CDM Rail)' + WordWrap = True + end + object CheckVerifVersion: TCheckBox + Left = 8 + Top = 24 + Width = 249 + Height = 17 + Caption = 'V'#233'rifications de nouvelle version au d'#233'marrage' + TabOrder = 0 + end + object CheckInfoVersion: TCheckBox + Left = 8 + Top = 40 + Width = 241 + Height = 17 + Caption = 'Information sur la version actuelle' + TabOrder = 1 + end + object CheckLanceCDM: TCheckBox + Left = 8 + Top = 72 + Width = 241 + Height = 25 + Caption = 'Lancer CDM Rail au d'#233'marrage' + TabOrder = 2 + WordWrap = True + end + object CheckAvecTCO: TCheckBox + Left = 8 + Top = 56 + Width = 201 + Height = 17 + Caption = 'Avec TCO' + TabOrder = 3 + end + object EditNomLay: TEdit + Left = 16 + Top = 130 + Width = 241 + Height = 21 + TabOrder = 4 + Text = 'EditNomLay' + end + end + object GroupBox6: TGroupBox + Left = 296 + Top = 8 + Width = 273 + Height = 169 + Caption = 'Au d'#233'marrage de CDM Rail : interface ' + TabOrder = 2 + object RadioButton4: TRadioButton + Left = 8 + Top = 16 + Width = 185 + Height = 17 + Caption = 'Ne pas d'#233'marrer d'#39'interface' + TabOrder = 0 + end + object RadioButton5: TRadioButton + Left = 8 + Top = 32 + Width = 225 + Height = 17 + Caption = 'XpressNet (lenz.roco)' + TabOrder = 1 + end + object RadioButton6: TRadioButton + Left = 8 + Top = 48 + Width = 217 + Height = 17 + Caption = 'P50X intellibox' + TabOrder = 2 + end + object RadioButton7: TRadioButton + Left = 8 + Top = 64 + Width = 249 + Height = 17 + Caption = 'Sprog' + TabOrder = 3 + end + object RadioButton8: TRadioButton + Left = 8 + Top = 80 + Width = 113 + Height = 17 + Caption = 'HSI88/HSI88-USB' + TabOrder = 4 + end + object RadioButton9: TRadioButton + Left = 8 + Top = 96 + Width = 193 + Height = 17 + Caption = 'ECOS ESU' + TabOrder = 5 + end + object RadioButton10: TRadioButton + Left = 8 + Top = 128 + Width = 233 + Height = 17 + Caption = 'FIS88 FeedBack (S88/S88N)' + TabOrder = 6 + end + object RadioButton11: TRadioButton + Left = 8 + Top = 112 + Width = 209 + Height = 17 + Caption = 'RS2PC (Rs FeedBack interface)' + TabOrder = 7 + end + object RadioButton12: TRadioButton + Left = 8 + Top = 144 + Width = 209 + Height = 17 + Caption = 'DCC++' + TabOrder = 8 + end + end + object GroupBox7: TGroupBox + Left = 296 + Top = 184 + Width = 273 + Height = 145 + Caption = 'Au d'#233'marrage de CDM Rail : interface de' + TabOrder = 3 + object Label10: TLabel + Left = 8 + Top = 16 + Width = 146 + Height = 13 + Caption = 'r'#233'trosignalisation pour RS Lenz' + end + object RadioButton13: TRadioButton + Left = 8 + Top = 32 + Width = 209 + Height = 17 + Caption = 'Automatique' + TabOrder = 0 + end + object RadioButton14: TRadioButton + Left = 8 + Top = 48 + Width = 217 + Height = 17 + Caption = 'LI-USB' + TabOrder = 1 + end + object RadioButton15: TRadioButton + Left = 8 + Top = 64 + Width = 217 + Height = 17 + Caption = 'LI-101F' + TabOrder = 2 + end + object RadioButton16: TRadioButton + Left = 8 + Top = 80 + Width = 217 + Height = 17 + Caption = 'LI-100F' + TabOrder = 3 + end + object RadioButton17: TRadioButton + Left = 8 + Top = 96 + Width = 209 + Height = 17 + Caption = 'LI-100' + TabOrder = 4 + end + object RadioButton18: TRadioButton + Left = 8 + Top = 112 + Width = 113 + Height = 17 + Caption = 'Genli' + TabOrder = 5 + end + end + object GroupBox8: TGroupBox + Left = 8 + Top = 264 + Width = 273 + Height = 113 + Caption = 'Services CommIP CDM Rail' + TabOrder = 4 + object Label6: TLabel + Left = 8 + Top = 18 + Width = 215 + Height = 13 + Caption = 'Liste des '#233'v'#232'nements envoy'#233's par CDM Rail:' + end + object CheckBoxServAig: TCheckBox + Left = 8 + Top = 40 + Width = 113 + Height = 17 + Caption = 'Aiguillages' + TabOrder = 0 + end + object CheckBoxServDet: TCheckBox + Left = 8 + Top = 56 + Width = 89 + Height = 17 + Caption = 'D'#233'tecteurs' + TabOrder = 1 + end + object CheckBoxServAct: TCheckBox + Left = 8 + Top = 72 + Width = 81 + Height = 17 + Caption = 'Actionneurs' + TabOrder = 2 + end + object CheckServPosTrains: TCheckBox + Left = 8 + Top = 88 + Width = 121 + Height = 17 + Caption = 'Position des trains' + TabOrder = 3 + end + object CheckBoxSrvSig: TCheckBox + Left = 144 + Top = 40 + Width = 113 + Height = 17 + Caption = 'Signaux' + TabOrder = 4 + end + end end - object CheckVerifVersion: TCheckBox - Left = 8 - Top = 24 - Width = 249 - Height = 17 - Caption = 'V'#233'rifications de nouvelle version au d'#233'marrage' - TabOrder = 0 + object TabSheetAutonome: TTabSheet + Caption = 'Mode autonome' + ImageIndex = 1 + object Label9: TLabel + Left = 0 + Top = 368 + Width = 305 + Height = 18 + Caption = 'Ces param'#232'tres sont utilis'#233's en fonctionnement sans CDM Rail' + WordWrap = True + end + object GroupBox2: TGroupBox + Left = 8 + Top = 8 + Width = 297 + Height = 129 + Caption = 'Acc'#232's USB - S'#233'rie '#224' l'#39'interface vers la centrale LENZ' + TabOrder = 0 + object Label3: TLabel + Left = 16 + Top = 24 + Width = 140 + Height = 13 + Caption = '1. Protocole s'#233'rie USB (COM)' + end + object Label4: TLabel + Left = 16 + Top = 48 + Width = 126 + Height = 26 + Caption = '2. Temporisation d'#39'envoi des octets de la trame (ms)' + WordWrap = True + end + object Label5: TLabel + Left = 16 + Top = 88 + Width = 152 + Height = 26 + Caption = + '3. Temporisation d'#39'attente de la r'#233'ponse de l'#39'interface (x 100 m' + + 's)' + WordWrap = True + end + object EditcomUSB: TEdit + Left = 160 + Top = 24 + Width = 121 + Height = 21 + TabStop = False + TabOrder = 0 + Text = 'EditcomUSB' + end + object EditTempoOctetUSB: TEdit + Left = 232 + Top = 56 + Width = 49 + Height = 21 + TabStop = False + TabOrder = 1 + Text = 'EditTempoOctetUSB' + end + object EditTempoReponse: TEdit + Left = 232 + Top = 88 + Width = 49 + Height = 21 + TabStop = False + TabOrder = 2 + Text = 'EditTempoReponse' + end + end + object GroupBox4: TGroupBox + Left = 8 + Top = 144 + Width = 297 + Height = 81 + Caption = '4. Ent'#234'te des trames vers l'#39'interface' + TabOrder = 1 + object RadioButton1: TRadioButton + Left = 8 + Top = 24 + Width = 225 + Height = 17 + Caption = '0 : Sans ent'#234'te (interfaces s'#233'rie)' + TabOrder = 0 + end + object RadioButton2: TRadioButton + Left = 8 + Top = 40 + Width = 225 + Height = 17 + Caption = '1 : Ent'#234'te FF FE (interfaces natives USB)' + TabOrder = 1 + end + object RadioButton3: TRadioButton + Left = 8 + Top = 56 + Width = 265 + Height = 17 + Caption = '2 : Ent'#234'te E4 - Suffixe 0D 0D 0A (arduino XpressNet)' + TabOrder = 2 + end + end + object GroupBox3: TGroupBox + Left = 8 + Top = 232 + Width = 297 + Height = 73 + Caption = 'Acc'#232's r'#233'seau '#224' l'#39'interface vers la centrale LENZ Ethernet' + TabOrder = 2 + object Label7: TLabel + Left = 14 + Top = 24 + Width = 95 + Height = 13 + Caption = 'Adresse IP interface' + end + object Label8: TLabel + Left = 14 + Top = 50 + Width = 82 + Height = 13 + Caption = 'Port de l'#39'interface' + end + object EditIPLenz: TEdit + Left = 176 + Top = 24 + Width = 81 + Height = 21 + TabStop = False + TabOrder = 0 + Text = 'EditIPLenz' + end + object EditportLenz: TEdit + Left = 176 + Top = 48 + Width = 81 + Height = 21 + TabStop = False + TabOrder = 1 + Text = 'EditportLenz' + end + end + object Memo1: TMemo + Left = 312 + Top = 8 + Width = 257 + Height = 97 + BevelInner = bvLowered + BevelKind = bkFlat + BorderStyle = bsNone + Lines.Strings = ( + '1. Port COM de l'#39'adresse USB de l'#39'interface LI-USB - ' + 'LI100 - LI100F - LI101F - GENLI.' + 'Attention de COM1 '#224' 9 - Si le port de l'#39'interface ' + 'USB>9, il faut le changer manuellement dans le ' + 'gestionnaire des p'#233'riph'#233'riques. Mettre 0 si inutilis'#233'e. ' + 'Le programme ne tentera pas de se connecter '#224' la ' + 'centrale si CDM rail est d'#233'tect'#233'.') + ReadOnly = True + TabOrder = 3 + end + object Memo2: TMemo + Left = 312 + Top = 112 + Width = 257 + Height = 97 + 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 la positionner '#224' une ' + 'valeur de l'#39'ordre de 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 = 216 + Width = 257 + 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 ' + 'une trame qui lui est transf'#233'r'#233'e. Cette valeur est '#224' ' + 'tester en fonction de votre interface. En cas de ' + 'd'#233'passement de la valeur, un message '#171' pas de ' + 'r'#233'ponse de l'#39'interface '#187' sera affich'#233'.') + ReadOnly = True + TabOrder = 5 + end + object Memo4: TMemo + Left = 312 + Top = 312 + Width = 257 + Height = 73 + BevelInner = bvLowered + BevelKind = bkFlat + BorderStyle = bsNone + Lines.Strings = ( + '4. Pour l'#39'utilisation d'#39'interfaces s'#233'rie (GENLI), cette ' + 'valeur doit '#234'tre '#224' 0. Pour les interfaces utilisant ' + 'nativement de l'#39'USB, cette valeur doit '#234'tre '#224' 1. La ' + 'valeur 2 est utilis'#233'e exclusivement pour des ' + 'interfaces '#224' base d'#39'arduino pour xpressnet.') + ReadOnly = True + TabOrder = 6 + end + object GroupBox9: TGroupBox + Left = 8 + Top = 312 + Width = 297 + Height = 41 + Caption = 'Divers' + TabOrder = 7 + object CheckBoxRazSignaux: TCheckBox + Left = 8 + Top = 16 + Width = 177 + Height = 17 + Hint = 'Envoie un 0 apr'#232's chaque commande sur un signal au d'#233'codeur' + Caption = 'Raz signaux apr'#232's commande' + ParentShowHint = False + ShowHint = True + TabOrder = 0 + end + end end - object CheckInfoVersion: TCheckBox - Left = 8 - Top = 40 - Width = 241 - Height = 17 - Caption = 'Information sur la version actuelle' - TabOrder = 1 + object TabSheet1: TTabSheet + Caption = 'Aiguillages' + ImageIndex = 2 + object Label12: TLabel + Left = 0 + Top = 8 + Width = 266 + Height = 13 + Caption = 'Liste de mod'#233'lisation des aiguillages du fichier config.cfg' + end + object MemoAig: TMemo + Left = 0 + Top = 24 + Width = 569 + Height = 361 + Color = clInfoText + Font.Charset = DEFAULT_CHARSET + Font.Color = clAqua + Font.Height = -11 + Font.Name = 'MS Sans Serif' + Font.Style = [] + ParentFont = False + ReadOnly = True + ScrollBars = ssVertical + TabOrder = 0 + end end - object CheckLanceCDM: TCheckBox - Left = 8 - Top = 72 - Width = 241 - Height = 25 - Caption = 'Lancer CDM Rail au d'#233'marrage' - TabOrder = 2 - WordWrap = True + object TabSheet2: TTabSheet + Caption = 'Branches' + ImageIndex = 3 + object Label14: TLabel + Left = 0 + Top = 8 + Width = 261 + Height = 13 + Caption = 'Liste de mod'#233'lisation des branches du fichier config.cfg' + end + object MemoBranches: TMemo + Left = 0 + Top = 24 + Width = 569 + Height = 361 + Color = clInfoText + Font.Charset = DEFAULT_CHARSET + Font.Color = clAqua + Font.Height = -11 + Font.Name = 'MS Sans Serif' + Font.Style = [] + ParentFont = False + ReadOnly = True + ScrollBars = ssVertical + TabOrder = 0 + end end - object CheckAvecTCO: TCheckBox - Left = 8 - Top = 56 - Width = 201 - Height = 17 - Caption = 'Avec TCO' - TabOrder = 3 + object TabSheet3: TTabSheet + Caption = 'Signaux' + ImageIndex = 4 + object Label15: TLabel + Left = 0 + Top = 8 + Width = 253 + Height = 13 + Caption = 'Liste de mod'#233'lisation des signaux du fichier config.cfg' + end + object MemoSignaux: TMemo + Left = 0 + Top = 24 + Width = 569 + Height = 361 + Color = clInfoText + Font.Charset = DEFAULT_CHARSET + Font.Color = clAqua + Font.Height = -11 + Font.Name = 'MS Sans Serif' + Font.Style = [] + ParentFont = False + ReadOnly = True + ScrollBars = ssVertical + TabOrder = 0 + end end - object EditNomLay: TEdit - Left = 16 - Top = 130 - Width = 241 - Height = 21 - TabOrder = 4 - Text = 'EditNomLay' - end - end - object GroupBox6: TGroupBox - Left = 8 - Top = 264 - Width = 273 - Height = 169 - Caption = 'Au d'#233'marrage de CDM Rail : interface ' - TabOrder = 7 - object RadioButton4: TRadioButton - Left = 8 - Top = 16 - Width = 185 - Height = 17 - Caption = 'Ne pas d'#233'marrer d'#39'interface' - TabOrder = 0 - end - object RadioButton5: TRadioButton - Left = 8 - Top = 32 - Width = 225 - Height = 17 - Caption = 'XpressNet (lenz.roco)' - TabOrder = 1 - end - object RadioButton6: TRadioButton - Left = 8 - Top = 48 - Width = 217 - Height = 17 - Caption = 'P50X intellibox' - TabOrder = 2 - end - object RadioButton7: TRadioButton - Left = 8 - Top = 64 - Width = 249 - Height = 17 - Caption = 'Sprog' - TabOrder = 3 - end - object RadioButton8: TRadioButton - Left = 8 - Top = 80 - Width = 113 - Height = 17 - Caption = 'HSI88/HSI88-USB' - TabOrder = 4 - end - object RadioButton9: TRadioButton - Left = 8 - Top = 96 - Width = 193 - Height = 17 - Caption = 'ECOS ESU' - TabOrder = 5 - end - object RadioButton10: TRadioButton - Left = 8 - Top = 128 - Width = 233 - Height = 17 - Caption = 'FIS88 FeedBack (S88/S88N)' - TabOrder = 6 - end - object RadioButton11: TRadioButton - Left = 8 - Top = 112 - Width = 209 - Height = 17 - Caption = 'RS2PC (Rs FeedBack interface)' - TabOrder = 7 - end - object RadioButton12: TRadioButton - Left = 8 - Top = 144 - Width = 209 - Height = 17 - Caption = 'DCC++' - TabOrder = 8 - end - end - object GroupBox7: TGroupBox - Left = 8 - Top = 440 - Width = 273 - Height = 145 - Caption = 'Au d'#233'marrage de CDM Rail : interface de' - TabOrder = 8 - object Label10: TLabel - Left = 8 - Top = 16 - Width = 146 - Height = 13 - Caption = 'r'#233'trosignalisation pour RS Lenz' - end - object RadioButton13: TRadioButton - Left = 8 - Top = 32 - Width = 209 - Height = 17 - Caption = 'Automatique' - TabOrder = 0 - end - object RadioButton14: TRadioButton - Left = 8 - Top = 48 - Width = 217 - Height = 17 - Caption = 'LI-USB' - TabOrder = 1 - end - object RadioButton15: TRadioButton - Left = 8 - Top = 64 - Width = 217 - Height = 17 - Caption = 'LI-101F' - TabOrder = 2 - end - object RadioButton16: TRadioButton - Left = 8 - Top = 80 - Width = 217 - Height = 17 - Caption = 'LI-100F' - TabOrder = 3 - end - object RadioButton17: TRadioButton - Left = 8 - Top = 96 - Width = 209 - Height = 17 - Caption = 'LI-100' - TabOrder = 4 - end - object RadioButton18: TRadioButton - Left = 8 - Top = 112 - Width = 113 - Height = 17 - Caption = 'Genli' - TabOrder = 5 + object TabSheet4: TTabSheet + Caption = 'Actionneurs' + ImageIndex = 5 + object Label16: TLabel + Left = 0 + Top = 8 + Width = 272 + Height = 13 + Caption = 'Liste de mod'#233'lisation des actionneurs du fichier config.cfg' + end + object MemoAct: TMemo + Left = 0 + Top = 24 + Width = 569 + Height = 361 + Color = clInfoText + Font.Charset = DEFAULT_CHARSET + Font.Color = clAqua + Font.Height = -11 + Font.Name = 'MS Sans Serif' + Font.Style = [] + ParentFont = False + ReadOnly = True + ScrollBars = ssVertical + TabOrder = 0 + end end end end diff --git a/UnitConfig.pas b/UnitConfig.pas index 2a8ac29..1b64222 100644 --- a/UnitConfig.pas +++ b/UnitConfig.pas @@ -4,43 +4,29 @@ interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, - Dialogs, ExtCtrls, StdCtrls , verif_version, jpeg ; + Dialogs, ExtCtrls, StdCtrls , verif_version, jpeg, ComCtrls ; type TFormConfig = class(TForm) - GroupBox1: TGroupBox; - Label1: TLabel; - EditAdrIPCDM: TEdit; - Label2: TLabel; - EditPortCDM: TEdit; - GroupBox2: TGroupBox; - Label3: TLabel; - EditcomUSB: TEdit; - Label4: TLabel; - EditTempoOctetUSB: TEdit; - Label5: TLabel; - EditTempoReponse: TEdit; ButtonAppliquerEtFermer: TButton; - GroupBox3: TGroupBox; - Label7: TLabel; - EditIPLenz: TEdit; - Label8: TLabel; - EditportLenz: TEdit; - GroupBox4: TGroupBox; - RadioButton1: TRadioButton; - RadioButton2: TRadioButton; - RadioButton3: TRadioButton; LabelInfo: TLabel; Button2: TButton; - Label11: TLabel; - Label12: TLabel; + Image1: TImage; + PageControl: TPageControl; + TabSheetCDM: TTabSheet; + TabSheetAutonome: TTabSheet; + GroupBox1: TGroupBox; + Label1: TLabel; + Label2: TLabel; + EditAdrIPCDM: TEdit; + EditPortCDM: TEdit; GroupBox5: TGroupBox; + Label13: TLabel; CheckVerifVersion: TCheckBox; CheckInfoVersion: TCheckBox; CheckLanceCDM: TCheckBox; CheckAvecTCO: TCheckBox; EditNomLay: TEdit; - Label13: TLabel; GroupBox6: TGroupBox; RadioButton4: TRadioButton; RadioButton5: TRadioButton; @@ -52,19 +38,60 @@ type RadioButton11: TRadioButton; RadioButton12: TRadioButton; GroupBox7: TGroupBox; + Label10: TLabel; RadioButton13: TRadioButton; RadioButton14: TRadioButton; RadioButton15: TRadioButton; RadioButton16: TRadioButton; RadioButton17: TRadioButton; RadioButton18: TRadioButton; - Label14: TLabel; + GroupBox2: TGroupBox; + Label3: TLabel; + Label4: TLabel; + Label5: TLabel; + EditcomUSB: TEdit; + EditTempoOctetUSB: TEdit; + EditTempoReponse: TEdit; + GroupBox4: TGroupBox; + RadioButton1: TRadioButton; + RadioButton2: TRadioButton; + RadioButton3: TRadioButton; + GroupBox3: TGroupBox; + Label7: TLabel; + Label8: TLabel; + EditIPLenz: TEdit; + EditportLenz: TEdit; + GroupBox8: TGroupBox; + CheckBoxServAig: TCheckBox; + CheckBoxServDet: TCheckBox; + CheckBoxServAct: TCheckBox; + CheckServPosTrains: TCheckBox; + Label6: TLabel; Label9: TLabel; - Label10: TLabel; - Image1: TImage; + Label11: TLabel; + TabSheet1: TTabSheet; + MemoAig: TMemo; + Label12: TLabel; + TabSheet2: TTabSheet; + Label14: TLabel; + MemoBranches: TMemo; + TabSheet3: TTabSheet; + MemoSignaux: TMemo; + Label15: TLabel; + TabSheet4: TTabSheet; + Label16: TLabel; + MemoAct: TMemo; + CheckBoxSrvSig: TCheckBox; + Memo1: TMemo; + Memo2: TMemo; + Memo3: TMemo; + Memo4: TMemo; + GroupBox9: TGroupBox; + CheckBoxRazSignaux: TCheckBox; procedure ButtonAppliquerEtFermerClick(Sender: TObject); procedure Button2Click(Sender: TObject); procedure FormActivate(Sender: TObject); + procedure FormCreate(Sender: TObject); private { Déclarations privées } public @@ -120,8 +147,45 @@ begin place_id:=s; end; +function services_CDM : boolean; +var s,ss : string; + i : integer; +begin + //s:=place_id('C-C-00-0002-RQSERV-RTSIM|030|03|SRV=ATNT;SRV=ADET;SRV=AACT;'); + s:=place_id('C-C-00-0002-RQSERV-RTSIM|xxx|xx|'); + i:=0; + if Srvc_Aig then begin s:=s+'SRV=ATNT;';inc(i);end; + if Srvc_Act then begin s:=s+'SRV=AACT;';inc(i);end; + if Srvc_Det then begin s:=s+'SRV=ADET;';inc(i);end; + if Srvc_PosTrain then begin s:=s+'SRV=TSXY;';inc(i);end ; + if Srvc_Sig then begin s:=s+'SRV=ASIG;';inc(i);end; + + // insère le nombre de paramètres + ss:=format('%.*d',[2,i]) ; + delete(s,30,2); + insert(ss,s,30); + // insère la longueur des paramètres + i:=length(s)-29; + ss:=format('%.*d',[3,i]) ; + delete(s,26,3); + insert(ss,s,26); + //Affiche(s,clyellow); + envoi_CDM(s);sleep(100); + if pos('_ACK',recuCDM)<>0 then + begin + s:='Services acceptés: '; + if Srvc_Aig then s:=s+'- aiguillages '; + if Srvc_Act then s:=s+'- actionneurs '; + if Srvc_Det then s:=s+'- détecteurs '; + if Srvc_PosTrain then s:=s+'- position des trains '; + if Srvc_sig then s:=s+'- état des signaux '; + Affiche(s,clYellow); + end; + services_CDM:=pos('_ACK',recuCDM)<>0; +end; + procedure connecte_CDM; -var s : string; +var s , ss : string; i : integer; begin // déconnexion de l'ancienne liaison éventuelle @@ -158,10 +222,9 @@ begin Affiche(s,clYellow); AfficheDebug(s,clyellow); - // demande des services : ATNT=aiguillages, ADET=détecteurs AACT=actionneurs - s:=place_id('C-C-00-0002-RQSERV-RTSIM|030|03|SRV=ATNT;SRV=ADET;SRV=AACT;'); - envoi_CDM(s); - if pos('_ACK',recuCDM)<>0 then Affiche('Services acceptés: aiguillages - détecteurs - actionneurs',clYellow); + // demande des services + services_CDM; + // demande les trains s:=place_id('C-C-01-0002-DSCTRN-DLOAD|000|'); envoi_CDM(s); @@ -410,7 +473,7 @@ begin copie_commentaire; closefile(fichier); - closefile(fichierN); + closefile(fichierN); deletefile('config.cfg'); deletefile('client-GL.cfg'); @@ -423,7 +486,7 @@ end; procedure TFormConfig.ButtonAppliquerEtFermerClick(Sender: TObject); var i,erreur : integer; s : string; - ChangeCDM,changeInterface,changeUSB : boolean; + ChangeCDM,changeInterface,changeUSB,change_srv : boolean; begin // contrôle adresse IP CDM s:=EditAdrIPCDM.text; @@ -492,6 +555,7 @@ begin notificationVersion:=CheckInfoVersion.Checked; LanceCDM:=CheckLanceCDM.Checked; + AvecTCO:=CheckAvecTCO.checked; Lay:=EditNomLay.Text; if RadioButton4.Checked then ServeurInterfaceCDM:=0; @@ -511,7 +575,23 @@ begin if RadioButton17.Checked then ServeurRetroCDM:=5; if RadioButton18.Checked then ServeurRetroCDM:=6; - // générer le fichier clieng-GL.cfg + // changement sur les services CDM ? + change_srv:=Srvc_Aig<>CheckBoxServAig.checked; + change_srv:=Srvc_Det<>CheckBoxServDet.checked or change_srv; + change_srv:=Srvc_Act<>CheckBoxServAct.checked or change_srv; + change_srv:=Srvc_PosTrain<>CheckServPosTrains.checked or change_srv; + change_srv:=Srvc_Sig<>CheckBoxSrvSig.checked or change_srv; + + Srvc_Aig:=CheckBoxServAig.checked; + Srvc_Det:=CheckBoxServDet.checked; + Srvc_Act:=CheckBoxServAct.checked; + Srvc_PosTrain:=CheckServPosTrains.checked; + Srvc_Sig:=CheckBoxSrvSig.checked; + Raz_Acc_signaux:=CheckBoxRazSignaux.checked; + + if change_srv then services_CDM; + + // générer le fichiers config.cfg et clieng-GL.cfg genere_config2; formConfig.close; end; @@ -522,6 +602,7 @@ begin end; procedure TFormConfig.FormActivate(Sender: TObject); +var i : integer; begin EditAdrIPCDM.text:=adresseIPCDM; EditPortCDM.Text:=IntToSTR(portCDM); @@ -563,8 +644,37 @@ begin RadioButton16.Checked:=ServeurRetroCDM=4; RadioButton17.Checked:=ServeurRetroCDM=5; RadioButton18.Checked:=ServeurRetroCDM=6; + + CheckBoxServAig.checked:=Srvc_Aig; + CheckBoxServDet.checked:=Srvc_Det; + CheckBoxServAct.checked:=Srvc_Act; + CheckServPosTrains.checked:=Srvc_PosTrain; + CheckBoxRazSignaux.checked:=Raz_Acc_signaux; + end; +procedure TFormConfig.FormCreate(Sender: TObject); +var i : integer; +begin + // remplit les 4 fenêtres de config des aiguillages branches signaux, actionneurs + for i:=1 to MaxAiguillage do + MemoAig.Lines.Add(mod_aiguillages[i]); + for i:=1 to NbreBranches do + MemoBranches.Lines.Add(mod_Branches[i]); + for i:=1 to NbreFeux do + MemoSignaux.Lines.Add(mod_Signaux[i]); + for i:=1 to maxTablo_act do + MemoAct.Lines.Add(mod_Act[i]); + PageControl.ActivePage:=TabSheetCDM; // force le premier onglet sur la page +end; + + + + + + + + end. diff --git a/UnitConfigTCO.dcu b/UnitConfigTCO.dcu index 9434d77..99adcd4 100644 Binary files a/UnitConfigTCO.dcu and b/UnitConfigTCO.dcu differ diff --git a/UnitConfigTCO.pas b/UnitConfigTCO.pas index 541bd6f..85cee01 100644 --- a/UnitConfigTCO.pas +++ b/UnitConfigTCO.pas @@ -4,7 +4,7 @@ interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, - Dialogs, StdCtrls , UnitTCO, ExtCtrls; + Dialogs, StdCtrls , UnitTCO, ExtCtrls, Menus; type TFormConfigTCO = class(TForm) diff --git a/UnitDebug.dcu b/UnitDebug.dcu index d99a279..5a5628d 100644 Binary files a/UnitDebug.dcu and b/UnitDebug.dcu differ diff --git a/UnitDebug.dfm b/UnitDebug.dfm index 971062d..8e7de04 100644 --- a/UnitDebug.dfm +++ b/UnitDebug.dfm @@ -48,9 +48,9 @@ object FormDebug: TFormDebug end object Label3: TLabel Left = 448 - Top = 136 + Top = 168 Width = 97 - Height = 225 + Height = 193 AutoSize = False Caption = 'Label3' Color = clGray @@ -80,7 +80,7 @@ object FormDebug: TFormDebug end object MemoEvtDet: TMemo Left = 552 - Top = 376 + Top = 408 Width = 233 Height = 221 Color = clBlack @@ -132,8 +132,8 @@ object FormDebug: TFormDebug OnClick = CheckAffSigClick end object ButtonRazTampon: TButton - Left = 688 - Top = 600 + Left = 448 + Top = 576 Width = 97 Height = 33 Caption = 'Raz Tampon Ev'#232'nements' @@ -202,7 +202,7 @@ object FormDebug: TFormDebug end object RichEdit: TRichEdit Left = 552 - Top = 136 + Top = 168 Width = 233 Height = 233 HideScrollBars = False @@ -266,6 +266,21 @@ object FormDebug: TFormDebug TabOrder = 15 OnClick = CheckBoxAffFDClick end + object CheckBoxAffDebDecSig: TCheckBox + Left = 448 + Top = 128 + Width = 321 + Height = 17 + Caption = 'Affichage du pilotage des d'#233'codeurs de signaux' + Font.Charset = DEFAULT_CHARSET + Font.Color = clBlack + Font.Height = -11 + Font.Name = 'MS Sans Serif' + Font.Style = [] + ParentFont = False + TabOrder = 16 + OnClick = CheckBoxAffDebDecSigClick + end object SaveDialog: TSaveDialog Left = 760 Top = 56 diff --git a/UnitDebug.pas b/UnitDebug.pas index 482bcbb..ba34311 100644 --- a/UnitDebug.pas +++ b/UnitDebug.pas @@ -30,6 +30,7 @@ type CheckBoxAct: TCheckBox; CheckBoxEvtDetAig: TCheckBox; CheckBoxAffFD: TCheckBox; + CheckBoxAffDebDecSig: TCheckBox; procedure FormClose(Sender: TObject; var Action: TCloseAction); procedure FormCreate(Sender: TObject); procedure ButtonEcrLogClick(Sender: TObject); @@ -46,6 +47,7 @@ type procedure CheckBoxActClick(Sender: TObject); procedure CheckBoxEvtDetAigClick(Sender: TObject); procedure CheckBoxAffFDClick(Sender: TObject); + procedure CheckBoxAffDebDecSigClick(Sender: TObject); private { Déclarations privées } public @@ -60,7 +62,7 @@ Max_Trains=50; var FormDebug: TFormDebug; NivDebug : integer; - AffSignal,AffAffect,initform,AffFD : boolean; + AffSignal,AffAffect,initform,AffFD,debug_dec_sig : boolean; N_event_det : integer; // index du dernier évènement (de 1 à 20) event_det : array[1..Max_event_det] of integer; event_det_train : array[1..Max_Trains] of record @@ -295,4 +297,10 @@ begin AffFD:=CheckBoxAffFD.checked; end; +procedure TFormDebug.CheckBoxAffDebDecSigClick(Sender: TObject); +begin + debug_dec_sig:=CheckBoxAffDebDecSig.checked; +end; + + end. diff --git a/UnitPilote.dcu b/UnitPilote.dcu index 15832cd..5942732 100644 Binary files a/UnitPilote.dcu and b/UnitPilote.dcu differ diff --git a/UnitPilote.dfm b/UnitPilote.dfm index 92ab3cf..df9fcd4 100644 --- a/UnitPilote.dfm +++ b/UnitPilote.dfm @@ -135,7 +135,7 @@ object FormPilote: TFormPilote Top = 160 Width = 177 Height = 17 - Caption = 'Violet (cible '#224' 2 feux uniquement)' + Caption = 'Violet' TabOrder = 9 OnClick = RadioVioletClick end diff --git a/UnitPilote.pas b/UnitPilote.pas index 07b1ac8..6c199df 100644 --- a/UnitPilote.pas +++ b/UnitPilote.pas @@ -227,6 +227,7 @@ begin begin EtatSignalCplx[AdrPilote]:=EtatSignalCplx[0]; //Affiche(IntToSTR(EtatSignalCplx[AdrPilote]),clyellow); + feux[i].EtatSignal:=EtatSignalCplx[0]; envoi_signal(AdrPilote); end else diff --git a/UnitPrinc.dcu b/UnitPrinc.dcu index a945d18..15c8583 100644 Binary files a/UnitPrinc.dcu and b/UnitPrinc.dcu differ diff --git a/UnitPrinc.pas b/UnitPrinc.pas index 781f080..d6a05c3 100644 --- a/UnitPrinc.pas +++ b/UnitPrinc.pas @@ -158,14 +158,22 @@ type const titre='Signaux complexes GL '; -tempoFeu = 100; -MaxAcc = 2048; +tempoFeu=100; +MaxAcc=2048; LargImg=50;HtImg=91; const_droit=2;const_devie=1; // positions aiguillages transmises par la centrale LENZ const_devieG_CDM=3; // positions aiguillages transmises par cdm const_devieD_CDM=2; // positions aiguillages transmises par cdm const_droit_CDM=0; // positions aiguillages transmises par cdm - +ClBleuClair=$FF7070 ; +Cyan=$FFA0A0; +clviolet=$FF00FF; +GrisF=$414141; +clOrange=$0077FF; +Feu_X=50;Feu_Y=91; +Max_Simule=10000; +NbCouleurTrain=8; +couleurTrain : array[1..NbCouleurTrain] of Tcolor = (clYellow,clLime,clOrange,clAqua,clFuchsia,clLtGray,clred,clWhite); EtatSign : array[0..13] of string[20] =('carré','sémaphore','sémaphore cli','vert','vert cli','violet', 'blanc','blanc cli','jaune','jaune cli','ral 30','ral 60','rappel 30','rappel 60'); @@ -181,7 +189,7 @@ type TBranche = record Adrtriple, // 2eme adresse pour un aiguillage triple temps, // temps de pilotage (durée de l'impulsion en x 100 ms) inversion : integer; // pilotage inversé pour la commande (en mode sans CDM) 0=normal 1=inversé - InversionCDM : integer ; // inversion pour les aiguillages BIS en lecture (pour parer bug CDM) + InversionCDM : integer ; // inversion pour les aiguillages BIS en lecture vitesse : integer; // vitesse de franchissement de l"aiguillage en position déviée (60 ou 90) ADroit : integer ; // (TJD:identifiant extérieur) connecté sur la position droite en talon @@ -209,40 +217,28 @@ type TBranche = record Taccessoire = (aig,feu); TMA = (valide,devalide); - var ancien_tablo_signalCplx,EtatsignalCplx : array[0..MaxAcc] of word; - AvecInitAiguillages,tempsCli,combine,NbreFeux,pasreponse,AdrDevie, - NombreImages,signalCpx,branche_trouve,Indexbranche_trouve,Actuel,Signal_suivant, - Nbre_recu_cdm,Tempo_chgt_feux,Adj1,Adj2,NbrePN,ServeurInterfaceCDM, - ServeurRetroCDM,TailleFonte : integer; + AvecInitAiguillages,tempsCli,NbreFeux,pasreponse,AdrDevie, + NombreImages,signalCpx,branche_trouve,Indexbranche_trouve,Actuel,Signal_suivant, + Nbre_recu_cdm,Tempo_chgt_feux,Adj1,Adj2,NbrePN,ServeurInterfaceCDM, + ServeurRetroCDM,TailleFonte : integer; - Hors_tension2,traceSign,TraceZone,Ferme,parSocket,ackCdm,PremierFD, - NackCDM,MsgSim,succes,recu_cv,AffActionneur,AffAigDet, - TraceListe,clignotant,nack,Maj_feux_cours,configNulle,LanceCDM : boolean; + Hors_tension2,traceSign,TraceZone,Ferme,parSocket,ackCdm,PremierFD, + NackCDM,MsgSim,succes,recu_cv,AffActionneur,AffAigDet, + TraceListe,clignotant,nack,Maj_feux_cours,configNulle,LanceCDM : boolean; - CDMhd : THandle; + CDMhd : THandle; - branche : array [1..100] of string; + branche : array [1..100] of string; -const - ClBleuClair=$FF7070 ; - Cyan=$FFA0A0; - clviolet=$FF00FF; - GrisF=$414141; - clOrange=$0077FF; - Feu_X=50;Feu_Y=91; - Max_Simule=10000; - NbCouleurTrain=8; - couleurTrain : array[1..NbCouleurTrain] of Tcolor = (clYellow,clLime,clOrange,clAqua,clFuchsia,clLtGray,clred,clWhite); - -var FormPrinc: TFormPrinc; ack,portCommOuvert,trace,AffMem,AfficheDet,CDM_connecte,parSocketCDM, - DebugOuv,Raz_Acc_signaux,AvecInit,AvecTCO,terminal : boolean; + DebugOuv,Raz_Acc_signaux,AvecInit,AvecTCO,terminal,Srvc_Aig,Srvc_Det,Srvc_Act, + Srvc_PosTrain,Srvc_Sig : boolean; tablo : array of byte; // tableau rx usb Enregistrement,chaine_Envoi,chaine_recue,Id_CDM,Af, entete,suffixe,ConfStCom,LAY : string; - maxaiguillage,detecteur_chgt,Temps,TpsRecuCom,Tempo_init,Suivant,TypeGen, + maxaiguillage,detecteur_chgt,Temps,Tempo_init,Suivant,TypeGen, NbreImagePligne,NbreBranches,Index2_det,branche_det,Index_det, I_simule,maxTablo_act,NbreVoies,AdresseFeuSuivant,El_suivant : integer; Ancien_detecteur,detecteur : array[0..1024] of boolean; // anciens état des détecteurs et adresses des détecteurs et leur état @@ -261,7 +257,7 @@ var actionneur,etat,fonction,tempo : integer; train : string; end; - + Tablo_PN : array[1..20] of record AdresseFerme : integer; // adresse de pilotage DCC pour la fermeture @@ -285,12 +281,14 @@ var couleur : Tcolor; fichier : text; tick,Premier_tick : longint; - + // modélisations des fichiers config + mod_aiguillages,mod_signaux,mod_branches,mod_act : array[1..100] of string; + // l'indice du tableau aiguillage est son adresse aiguillage : array[0..MaxAcc] of Taiguillage; aiguillageB : array[0..MaxAcc] of Taiguillage; - // signaux/ L'index du tableau n'est pas l'adresse du feu + // signaux de la fenêtre de droite - L'index du tableau n'est pas l'adresse du feu feux : array[1..MaxAcc] of record adresse, aspect : integer; // adresse du feu, aspect (2 feux..9 feux 12=direction 2 feux .. 16=direction 6 feux) Img : TImage; // Pointeur sur structure TImage du feu @@ -370,12 +368,35 @@ begin StatusBar1.Simpletext:=Application.Hint; end; -// conversion du motif de bits de la configuration du signal complexe en deux mots: -// premier mot : (retour de la fonction=(premiers bits)code de la signalisation -// deuxième mot: variable Combine = code de la signalisation combinée -// Exemple code_to_aspect(10001000000000) renvoie jaune et Combine=rappel_30 -function code_to_aspect(codebin : word) : word; -var i,mot,premierbit : word; +// renvoie le 1er numéro de bit à 1 +// ex BitNum(4)=2 +Function BitNum(n : word) : integer; +var i : integer; + trouve : boolean; +begin + i:=0; + repeat + trouve:=(n and 1)=1 ; + if not(trouve) then inc(i); + n:=n shr 1; + until (i=16) or trouve; + BitNum:=i; +end; + +// conversion du motif de bits (codebin) de la configuration du signal complexe en deux mots: +// en sortie : +// premierBit : code de la signalisation +// Combine = code de la signalisation combinée +// Exemple code_to_aspect(10001000000000) renvoie premierBit=jaune_cli (9) et Combine=rappel 60 (13) +procedure code_to_aspect(codebin : word;var premierbit,combine : word) ; +var i,mot : word; +begin + premierBit:=BitNum(CodeBin and $3ff); + combine:=BitNum(CodeBin and $fc00); +end; + +procedure Xcode_to_aspect(codebin : word;var premierbit,combine : word) ; +var i,mot : word; begin mot:=codebin; i:=0;premierbit:=0;Combine:=0; @@ -384,12 +405,11 @@ begin begin if (mot and 1)=1 then // si bit 0 du mot est à 1 begin - if (premierbit=0) then premierbit:=i else Combine:=i; + if (premierbit=0) then premierbit:=i+1 else Combine:=i+1; end; mot:=mot shr 1; //décaler à droite inc(i); end; - code_to_aspect:=premierbit; end; // dessine un cercle plein dans le feu @@ -406,11 +426,12 @@ end; // dessine les feux sur une cible à 2 feux procedure dessine_feu2(Acanvas : Tcanvas;x,y : integer;frX,frY : real;EtatSignal : word;orientation : integer); -var Temp,code,rayon,xViolet,YViolet,xBlanc,yBlanc, +var Temp,rayon,xViolet,YViolet,xBlanc,yBlanc, LgImage,HtImage : integer; ech : real; + code,combine : word; begin - code:=code_to_aspect(Etatsignal); // et aspect + code_to_aspect(Etatsignal,code,combine); // et aspect rayon:=round(6*frX); // récupérer les dimensions de l'image d'origine du feu @@ -451,12 +472,13 @@ end; // dessine les feux sur une cible à 3 feux procedure dessine_feu3(Acanvas : Tcanvas;x,y : integer;frX,frY : real;EtatSignal : word;orientation : integer); -var Temp,code,rayon,xSem,Ysem,xJaune,Yjaune,Xvert,Yvert, +var Temp,rayon,xSem,Ysem,xJaune,Yjaune,Xvert,Yvert, LgImage,HtImage : integer; s : string; ech : real; + code,combine : word; begin - code:=code_to_aspect(Etatsignal); // et aspect + code_to_aspect(Etatsignal,code,combine); rayon:=round(6*frX); LgImage:=Formprinc.Image3feux.Picture.Bitmap.Width; @@ -501,11 +523,12 @@ end; // dessine les feux sur une cible à 4 feux // orientation=1 vertical procedure dessine_feu4(Acanvas : Tcanvas;x,y : integer;frX,frY : real;EtatSignal : word;orientation : integer); -var Temp,code,rayon,xSem,Ysem,xJaune,Yjaune,Xcarre,Ycarre,Xvert,Yvert, +var Temp,rayon,xSem,Ysem,xJaune,Yjaune,Xcarre,Ycarre,Xvert,Yvert, LgImage,HtImage : integer; ech : real; + code,combine : word; begin - code:=code_to_aspect(Etatsignal); // et aspect + code_to_aspect(Etatsignal,code,combine); // et aspect rayon:=round(6*frX); LgImage:=Formprinc.Image4feux.Picture.Bitmap.Width; @@ -561,11 +584,12 @@ end; // dessine les feux sur une cible à 5 feux procedure dessine_feu5(Acanvas : Tcanvas;x,y : integer;frX,frY : real;EtatSignal : word;orientation : integer); -var code, XBlanc,Yblanc,xJaune,yJaune,Xsem,YSem,Xvert,YVert,Xcarre,Ycarre, +var XBlanc,Yblanc,xJaune,yJaune,Xsem,YSem,Xvert,YVert,Xcarre,Ycarre, Temp,rayon,LgImage,HtImage : integer; ech : real; + code,combine : word; begin - code:=code_to_aspect(Etatsignal); // et aspect + code_to_aspect(Etatsignal,code,combine); // et aspect rayon:=round(6*frX); XBlanc:=13; YBlanc:=22; xJaune:=13; yJaune:=55; @@ -612,10 +636,11 @@ begin if not((code=vert_cli) and clignotant) then cercle(ACanvas,xvert,yvert,rayon,GrisF); if not((code=semaphore_cli) and clignotant) then cercle(ACanvas,xSem,ySem,rayon,GrisF); if not((code=jaune_cli) and clignotant) then cercle(ACanvas,xjaune,yjaune,rayon,GrisF); - + //allumages if ((code=semaphore_cli) and (clignotant)) or (code=semaphore) then cercle(ACanvas,xsem,ysem,rayon,clRed); if ((code=blanc_cli) and (clignotant)) or (code=blanc) then cercle(ACanvas,xblanc,yblanc,rayon,clWhite); + if (code=violet) then cercle(ACanvas,xblanc,yblanc,rayon,clViolet); if code=carre then begin cercle(ACanvas,xcarre,ycarre,rayon,clRed); @@ -628,11 +653,12 @@ end; // dessine les feux sur une cible à 7 feux procedure dessine_feu7(Acanvas : Tcanvas;x,y : integer;frX,frY : real;EtatSignal : word;orientation : integer); -var code, XBlanc,Yblanc,xJaune,yJaune,Xsem,YSem,Xvert,YVert,Xcarre,Ycarre,Xral1,Yral1,Xral2,YRal2, +var XBlanc,Yblanc,xJaune,yJaune,Xsem,YSem,Xvert,YVert,Xcarre,Ycarre,Xral1,Yral1,Xral2,YRal2, Temp,rayon,LgImage,HtImage : integer; ech : real; + code,combine : word; begin - code:=code_to_aspect(Etatsignal); // et combine + code_to_aspect(Etatsignal,code,combine); // et combine rayon:=round(6*frX); XBlanc:=13; YBlanc:=23; Xral1:=13; YRal1:=11; @@ -701,6 +727,7 @@ begin if ((code=semaphore_cli) and (clignotant)) or (code=semaphore) then cercle(ACanvas,xsem,ysem,rayon,clRed); if ((code=vert_cli) and (clignotant)) or (code=vert) then cercle(ACanvas,xVert,yVert,rayon,clGreen); if ((code=blanc_cli) and (clignotant)) or (code=blanc) then cercle(ACanvas,xBlanc,yBlanc,rayon,clWhite); + if (code=violet) then cercle(ACanvas,xblanc,yblanc,rayon,clViolet); if code=carre then begin cercle(ACanvas,xCarre,yCarre,rayon,clRed); @@ -710,14 +737,15 @@ end; // dessine les feux sur une cible à 9 feux procedure dessine_feu9(Acanvas : Tcanvas;x,y : integer;frX,frY : real;etatsignal : word;orientation : integer); -var code,rayon, +var rayon, XBlanc,Yblanc,xJaune,yJaune,Xsem,YSem,Xvert,YVert,Xcarre,Ycarre,Xral1,Yral1,Xral2,YRal2, Xrap1,Yrap1,Xrap2,Yrap2,Temp : integer; LgImage,HtImage,xt,yt : integer; ech : real; + code,combine : word; begin rayon:=round(6*frX); - code:=code_to_aspect(Etatsignal); // et aspect + code_to_aspect(Etatsignal,code,combine); // et aspect // mise à l'échelle des coordonnées des feux en fonction du facteur de réduction frX et frY et x et y (offsets) XBlanc:=13; YBlanc:=36; @@ -804,7 +832,8 @@ begin if ((code=semaphore_cli) and clignotant) or (code=semaphore) then cercle(ACanvas,Xsem,ySem,rayon,clRed); if ((code=vert_cli) and clignotant) or (code=vert) then cercle(ACanvas,xvert,yvert,rayon,clGreen); if ((code=blanc_cli) and clignotant) or (code=blanc) then cercle(ACanvas,xBlanc,yBlanc,rayon,clWhite); - + if (code=violet) then cercle(ACanvas,xblanc,yblanc,rayon,clViolet); + if code=carre then begin cercle(ACanvas,xcarre,yCarre,rayon,clRed); @@ -1443,9 +1472,11 @@ begin if CDM_connecte then begin //AfficheDebug(intToSTR(adresse),clred); + if debug_dec_sig and (acc=feu) then AfficheDebug('Tick='+IntToSTR(Tick)+' signal '+intToSTR(adresse)+' '+intToSTR(octet),clorange); s:=chaine_CDM_Acc(adresse,octet); envoi_CDM(s); if (acc=feu) and not(Raz_Acc_signaux) then exit; + if debug_dec_sig and (acc=feu) then AfficheDebug('Tick='+IntToSTR(Tick)+' signal '+intToSTR(adresse)+' '+intToSTR(octet),clorange); s:=chaine_CDM_Acc(adresse,0); envoi_CDM(s); exit; @@ -1460,12 +1491,15 @@ begin begin if octet=1 then octet:=2 else octet:=1; end; + if (octet=0) or (octet>2) then exit; + //if (octet>2) then exit; groupe:=(adresse-1) div 4; fonction:=((adresse-1) mod 4)*2 + (octet-1); // pilotage à 1 s:=#$52+Char(groupe)+char(fonction or $88); // activer la sortie s:=checksum(s); + if debug_dec_sig and (acc=feu) then AfficheDebug('Tick='+IntToSTR(Tick)+' signal '+intToSTR(adresse)+' '+intToSTR(octet),clorange); envoi(s); // envoi de la trame et attente Ack // si l'accessoire est un feu et sans raz des signaux, sortir if (acc=feu) and not(Raz_Acc_signaux) then exit; @@ -1482,6 +1516,7 @@ begin // pilotage à 0 pour éteindre le pilotage de la bobine du relais s:=#$52+Char(groupe)+char(fonction or $80); // désactiver la sortie s:=checksum(s); + if debug_dec_sig and (acc=feu) then AfficheDebug('Tick='+IntToSTR(Tick)+' signal '+intToSTR(adresse)+' 0',clorange); envoi(s); // envoi de la trame et attente Ack end; end; @@ -1526,9 +1561,10 @@ begin envoi(s); end; +// fonctions sur les bits function testBit(n : word;position : integer) : boolean; begin - testBit:=n and (1 shl position) = (1 shl position); + testBit:=n and (1 shl position) = (1 shl position); end; Function RazBit(n : word;position : integer) : word; @@ -1541,12 +1577,30 @@ begin SetBit:=n or (1 shl position); end; + + +// renvoie la chaîne de l'état du signal +function chaine_signal(etat : word) : string; +var aspect,combine : word; + s : string; +begin + code_to_aspect(etat,aspect,combine); + s:=''; + if aspect=16 then s:='' else s:=etatSign[aspect]; + if combine<>16 then + begin + if aspect<>16 then s:=s+'+'; + s:=s+etatSign[combine]; + end; + chaine_signal:=s; +end; + // mise à jour état signal complexe dans le tableau de bits du signal EtatSignalCplx */ // adresse : adresse du signal complexe // Aspect : code représentant l'état du signal de 0 à 15 procedure Maj_Etat_Signal(adresse,aspect : integer); +var i : integer; begin - if testBit((EtatSignalCplx[adresse]),aspect)=false then // si le bit dans l'état du signal n'est pas allumé, procéder. begin // effacement du motif de bits en fonction du nouvel état demandé suivant la règle des signaux complexes @@ -1592,6 +1646,9 @@ begin // Affiche(IntToSTR(EtatSignalCplx[adresse]),clyellow); end; end; + // mise à jour de l'état du signal dans le tableau Feux + i:=Index_feu(adresse); + feux[i].EtatSignal:=EtatSignalCplx[adresse]; end; @@ -1706,17 +1763,18 @@ end; envoie les données au décodeur CDF pour un signal ===========================================================================*} procedure envoi_CDF(adresse : integer); -var code,aspect,index : integer; +var index : integer; + code,aspect,combine : word; + s : string; begin - index:=Index_feu(adresse); // tranforme l'adresse du feu en index tableau - code:=feux[index].aspect; // aspect du feu; if (ancien_tablo_signalCplx[adresse]<>EtatSignalCplx[adresse]) then //; && (stop_cmd==FALSE)) begin ancien_tablo_signalCplx[adresse]:=EtatSignalCplx[adresse]; - aspect:=code_to_aspect(code); - if traceSign then affiche('Signal CDF: '+intToSTR(adresse)+' '+intToSTR(code),clOrange); - if Affsignal then afficheDebug('Signal CDF: '+intToSTR(adresse)+' '+intToSTR(code),clOrange); - + code:=EtatSignalCplx[adresse]; + code_to_aspect(code,aspect,combine); + s:='Signal CDF: ad'+IntToSTR(adresse)+'='+chaine_signal(code); + if traceSign then affiche(s,clOrange); + if Affsignal then afficheDebug(s,clOrange); if (aspect=carre) then pilote_acc(adresse,2,feu) ; if (aspect=semaphore) then pilote_acc(adresse,1,feu) ; @@ -1727,15 +1785,15 @@ begin // signalisation combinée - rappel 30 + avertissement - à tester...... if (Combine=0) then pilote_acc(adresse+2,1,feu) ; // éteindre rappel 30 - if (Combine=rappel_30) then pilote_acc(adresse+2,2,feu) ; // allumer rappel 30 + if (Combine=rappel_30) then pilote_acc(adresse+2,2,feu) ; // allumer rappel 30 end; end; {========================================================================== envoie les données au décodeur LEB pour un signal ===========================================================================*} -procedure envoi_LEB(adr : integer); -var codebin,aspect : integer; +procedure envoi_LEB(adresse : integer); +var code,aspect,combine : word; s : string; procedure envoi5_LEB(selection :byte); var i : integer; @@ -1743,10 +1801,10 @@ var codebin,aspect : integer; s:=''; for i:=0 to 4 do begin - if (testBit(selection,i)) then begin pilote_acc(adr+i,1,feu);s:=s+'1';end - else begin pilote_acc(adr+i,2,feu) ; s:=s+'0';end; - //if (testBit(selection,i)) then begin pilote_acc(adr+i,1);s:=s+'1';end - //else begin pilote_acc(adr+i,2) ; s:=s+'0';end; + if (testBit(selection,i)) then begin pilote_acc(adresse+i,1,feu);s:=s+'1';end + else begin pilote_acc(adresse+i,2,feu) ; s:=s+'0';end; + //if (testBit(selection,i)) then begin pilote_acc(adresse+i,1);s:=s+'1';end + //else begin pilote_acc(adresse+i,2) ; s:=s+'0';end; //Sleep(60); end; //Affiche(inttoStr(selection),clOrange); @@ -1754,29 +1812,18 @@ var codebin,aspect : integer; end; begin -if (ancien_tablo_signalCplx[adr]<>EtatSignalCplx[adr]) then //; && (stop_cmd==FALSE)) +if (ancien_tablo_signalCplx[adresse]<>EtatSignalCplx[adresse]) then //; && (stop_cmd==FALSE)) begin - ancien_tablo_signalCplx[adr]:=EtatSignalCplx[adr]; - codebin:=EtatSignalCplx[adr]; - aspect:=code_to_aspect(codebin); - if traceSign then - begin - s:='Signal LEB: ad'+IntToSTR(adr)+'='+etatSign[aspect]; - //s:='Signal LEB: ad'+IntToSTR(adr)+' aspect='+intToSTR(aspect)+' combine='+intToSTR(combine); - if Combine<>0 then s:=s+' + '+etatSign[combine]; - Affiche(s,clOrange); - end; - if AffSignal then - begin - s:='Signal LEB: ad'+IntToSTR(adr)+'='+etatSign[aspect]; - //s:='Signal LEB: ad'+IntToSTR(adr)+' aspect='+intToSTR(aspect)+' combine='+intToSTR(combine); - if Combine<>0 then s:=s+' + '+etatSign[combine]; - AfficheDebug(s,clOrange); - end; - - Sleep(60); // si le feu se positionne à la suite d'un positionnement d'aiguillage, on peut avoir le message station occupée + ancien_tablo_signalCplx[adresse]:=EtatSignalCplx[adresse]; + code:=EtatSignalCplx[adresse]; + code_to_aspect(code,aspect,combine); + s:='Signal LEB: ad'+IntToSTR(adresse)+'='+chaine_signal(code); + if traceSign then affiche(s,clOrange); + if Affsignal then afficheDebug(s,clOrange); - if (Combine=0) then + Sleep(60); // si le feu se positionne à la suite d'un positionnement d'aiguillage, on peut avoir le message station occupée + //Affiche(IntToSTR(aspect)+' '+inttoSTR(combine),clOrange); + if (Combine=16) then begin if (aspect=carre) then envoi5_LEB(0); if (aspect=violet) then envoi5_LEB(1); @@ -1793,7 +1840,7 @@ begin if (aspect=ral_30) then envoi5_LEB(9); if (aspect=ral_60) then envoi5_LEB($b); end; - if (aspect=0) then + if (aspect=16) then begin if (Combine=rappel_30) then envoi5_LEB(6); if (Combine=rappel_60) then envoi5_LEB(7); @@ -1805,7 +1852,8 @@ begin if ((Combine=rappel_60) and (aspect=jaune)) then envoi5_LEB($10); if ((Combine=rappel_60) and (aspect=jaune_cli)) then envoi5_LEB($11); if ((Combine=ral_60) and (aspect=jaune_cli)) then envoi5_LEB($12); -end; + end; + end; (*========================================================================== @@ -1834,34 +1882,23 @@ envoie les donn /*===========================================================================*) procedure envoi_NMRA(adresse: integer); -var valeur,code,codebin,aspect : integer ; +var valeur : integer ; + aspect,combine,code : word; s : string; begin //index:=Index_feu(adresse); // tranforme l'adresse du feu en index tableau //code:=feux[index].aspect; // aspect du feu; - if (ancien_tablo_signalCplx[adresse]<>EtatSignalCplx[adresse]) then begin ancien_tablo_signalCplx[adresse]:=EtatSignalCplx[adresse]; - codebin:=EtatSignalCplx[adresse]; - code:=code_to_aspect(codebin); + code:=EtatSignalCplx[adresse]; + code_to_aspect(code,aspect,combine); + s:='Signal NMRA: ad'+IntToSTR(adresse)+'='+chaine_signal(code); + if traceSign then affiche(s,clOrange); + if Affsignal then afficheDebug(s,clOrange); - if traceSign then - begin - s:='Signal NMRA: ad'+IntToSTR(adresse)+'='+etatSign[aspect]; - if Combine<>0 then s:=s+' + '+etatSign[combine]; - Affiche(s,clOrange); - end; - if AffSignal then - begin - s:='Signal NMRA: ad'+IntToSTR(adresse)+'='+etatSign[aspect]; - if Combine<>0 then s:=s+' + '+etatSign[combine]; - AfficheDebug(s,clOrange); - end; - - if combine=0 then - case (code) of + case aspect of carre : valeur:=0; semaphore : valeur:=1; semaphore_cli : valeur:=2; @@ -1872,23 +1909,19 @@ begin blanc_cli : valeur:=7; jaune : valeur:=8; jaune_cli : valeur:=9; + end; + case combine of ral_30 : valeur:=10; ral_60 : valeur:=11; rappel_30 : valeur:=13; rappel_60 : valeur:=14; end; - if aspect=0 then - begin - if combine=rappel_30 then valeur:=13; - if combine=rappel_60 then valeur:=14; - end; - if (Combine=ral_60) and (aspect=jaune_cli) then valeur:=12; if (Combine=rappel_30) and (aspect=jaune) then valeur:=15; - if (Combine=rappel_30) and (aspect=jaune_cli) then valeur:=16; - if (Combine=rappel_60) and (aspect=jaune) then valeur:=17; - if (Combine=rappel_60) and (aspect=jaune_cli) then valeur:=18; + if (Combine=rappel_30) and (aspect=jaune_cli) then valeur:=16; + if (Combine=rappel_60) and (aspect=jaune) then valeur:=17; + if (Combine=rappel_60) and (aspect=jaune_cli) then valeur:=18; pilote_acc(adresse,valeur,feu); end; @@ -1896,56 +1929,47 @@ end; // décodeur unisemaf (paco) procedure envoi_UniSemaf(adresse: integer); -var modele,index,code,codebin : integer ; +var modele,index: integer ; s : string; + code,aspect,combine : word; begin index:=Index_feu(adresse); // tranforme l'adresse du feu en index tableau if (ancien_tablo_signalCplx[adresse]<>EtatSignalCplx[adresse]) then begin ancien_tablo_signalCplx[adresse]:=EtatSignalCplx[adresse]; - codebin:=EtatSignalCplx[adresse]; - code:=code_to_aspect(codebin); + code:=EtatSignalCplx[adresse]; + code_to_aspect(code,aspect,combine); + s:='Signal Unisemaf: ad'+IntToSTR(adresse)+'='+chaine_signal(code); + if traceSign then affiche(s,clOrange); + if Affsignal then afficheDebug(s,clOrange); - if traceSign then - begin - s:='Signal UniSemaf: ad'+IntToSTR(adresse)+'='+etatSign[code]; - if Combine<>0 then s:=s+' + '+etatSign[combine]; - Affiche(s,clOrange); - end; - if AffSignal then - begin - s:='Signal UniSemaf: ad'+IntToSTR(adresse)+'='+etatSign[code]; - if Combine<>0 then s:=s+' + '+etatSign[combine]; - AfficheDebug(s,clOrange); - end; - // pour Unisemaf, la cible est définie dans le champ Unisemaf de la structure feux modele:=feux[index].Unisemaf; //Affiche('Adresse='+intToSTR(Adresse)+' code='+intToSTR(code)+' combine'+intToSTR(combine),clyellow); if modele=2 then // 2 feux begin - if code=blanc then pilote_acc(adresse,1,feu); - if code=blanc_cli then pilote_acc(adresse,1,feu); - if code=violet then pilote_acc(adresse,2,feu); + if aspect=blanc then pilote_acc(adresse,1,feu); + if aspect=blanc_cli then pilote_acc(adresse,1,feu); + if aspect=violet then pilote_acc(adresse,2,feu); end; if modele=3 then // 3 feux begin - if code=vert then pilote_acc(adresse,1,feu); - if code=vert_cli then pilote_acc(adresse,1,feu); + if aspect=vert then pilote_acc(adresse,1,feu); + if aspect=vert_cli then pilote_acc(adresse,1,feu); - if code=semaphore then pilote_acc(adresse,2,feu); - if code=semaphore_cli then pilote_acc(adresse,2,feu); + if aspect=semaphore then pilote_acc(adresse,2,feu); + if aspect=semaphore_cli then pilote_acc(adresse,2,feu); - if code=jaune then pilote_acc(adresse+1,1,feu); - if code=jaune_cli then pilote_acc(adresse+1,1,feu); + if aspect=jaune then pilote_acc(adresse+1,1,feu); + if aspect=jaune_cli then pilote_acc(adresse+1,1,feu); end; if modele=4 then begin - case code of + case aspect of vert : pilote_acc(adresse,1,feu); vert_cli : pilote_acc(adresse,1,feu); jaune : pilote_acc(adresse,2,feu); @@ -1958,7 +1982,7 @@ begin // 51=carré + blanc if modele=51 then begin - case code of + case aspect of vert : pilote_acc(adresse,1,feu); vert_cli : pilote_acc(adresse,1,feu); jaune : pilote_acc(adresse,2,feu); @@ -1973,7 +1997,7 @@ begin // 52=VJR + blanc + violet if modele=52 then begin - case code of + case aspect of vert : pilote_acc(adresse,1,feu); vert_cli : pilote_acc(adresse,1,feu); jaune : pilote_acc(adresse,2,feu); @@ -1988,20 +2012,20 @@ begin // 71=VJR + ralentissement 30 if modele=71 then begin - case code of + case aspect of vert : pilote_acc(adresse,1,feu); vert_cli : pilote_acc(adresse,1,feu); jaune : pilote_acc(adresse,2,feu); jaune_cli : pilote_acc(adresse,2,feu); semaphore : pilote_acc(adresse+1,1,feu); semaphore_cli : pilote_acc(adresse+1,1,feu); - ral_30 : pilote_acc(adresse+1,2,feu); end; + if combine=ral_30 then pilote_acc(adresse+1,2,feu); end; // 72=VJR + carré + ralentissement 30 if modele=72 then begin - case code of + case aspect of vert : pilote_acc(adresse,1,feu); vert_cli : pilote_acc(adresse,1,feu); jaune : pilote_acc(adresse,2,feu); @@ -2009,13 +2033,13 @@ begin semaphore : pilote_acc(adresse+1,1,feu); semaphore_cli : pilote_acc(adresse+1,1,feu); carre : pilote_acc(adresse+1,2,feu); - ral_30 : pilote_acc(adresse+2,1,feu); end; + if combine=ral_30 then pilote_acc(adresse+2,1,feu); end; // 73=VJR + carré + ralentissement 60 if modele=73 then begin - case code of + case aspect of vert : pilote_acc(adresse,1,feu); vert_cli : pilote_acc(adresse,1,feu); jaune : pilote_acc(adresse,2,feu); @@ -2023,13 +2047,13 @@ begin semaphore : pilote_acc(adresse+1,1,feu); semaphore_cli : pilote_acc(adresse+1,1,feu); carre : pilote_acc(adresse+1,2,feu); - ral_60 : pilote_acc(adresse+2,1,feu); end; + if combine=ral_60 then pilote_acc(adresse+2,1,feu); end; // 91=VJR + carré + rappel 30 if modele=91 then begin - case code of + case aspect of vert : pilote_acc(adresse,1,feu); vert_cli : pilote_acc(adresse,1,feu); jaune : pilote_acc(adresse,2,feu); @@ -2037,14 +2061,14 @@ begin semaphore : pilote_acc(adresse+1,1,feu); semaphore_cli : pilote_acc(adresse+1,1,feu); carre : pilote_acc(adresse+1,2,feu); - rappel_30 : pilote_acc(adresse+2,1,feu); end; + if combine=rappel_30 then pilote_acc(adresse+2,1,feu); end; // 92=VJR + carré + rappel 60 if modele=92 then begin - case code of + case aspect of vert : pilote_acc(adresse,1,feu); vert_cli : pilote_acc(adresse,1,feu); jaune : pilote_acc(adresse,2,feu); @@ -2052,141 +2076,141 @@ begin semaphore : pilote_acc(adresse+1,1,feu); semaphore_cli : pilote_acc(adresse+1,1,feu); carre : pilote_acc(adresse+1,2,feu); - rappel_60 : pilote_acc(adresse+2,1,feu); end; + if combine=rappel_60 then pilote_acc(adresse+2,1,feu); end; // 93=VJR + carré + ral30 + rappel 30 if modele=93 then begin - if combine=0 then + if combine=16 then //pas de sig combinée begin - if code=vert then pilote_acc(adresse,1,feu); - if code=vert_cli then pilote_acc(adresse,1,feu); - if code=jaune then pilote_acc(adresse,2,feu); - if code=jaune_cli then pilote_acc(adresse,2,feu); - if code=semaphore then pilote_acc(adresse+1,1,feu); - if code=semaphore_cli then pilote_acc(adresse+1,1,feu); - if code=carre then pilote_acc(adresse+1,2,feu); - if code=ral_30 then pilote_acc(adresse+2,1,feu); - if code=rappel_30 then pilote_acc(adresse+2,2,feu); + if aspect=vert then pilote_acc(adresse,1,feu); + if aspect=vert_cli then pilote_acc(adresse,1,feu); + if aspect=jaune then pilote_acc(adresse,2,feu); + if aspect=jaune_cli then pilote_acc(adresse,2,feu); + if aspect=semaphore then pilote_acc(adresse+1,1,feu); + if aspect=semaphore_cli then pilote_acc(adresse+1,1,feu); + if aspect=carre then pilote_acc(adresse+1,2,feu); end; - if (code=jaune) and (combine=rappel_30) then pilote_acc(adresse+3,1,feu); + if combine=ral_30 then pilote_acc(adresse+2,1,feu); + if combine=rappel_30 then pilote_acc(adresse+2,2,feu); + if (aspect=jaune) and (combine=rappel_30) then pilote_acc(adresse+3,1,feu); end; // 94=VJR + carré + ral60 + rappel60 if modele=94 then begin - if combine=0 then + if combine=16 then begin - if code=vert then pilote_acc(adresse,1,feu); - if code=vert_cli then pilote_acc(adresse,1,feu); - if code=jaune then pilote_acc(adresse,2,feu); - if code=jaune_cli then pilote_acc(adresse,2,feu); - if code=semaphore then pilote_acc(adresse+1,1,feu); - if code=semaphore_cli then pilote_acc(adresse+1,1,feu); - if code=carre then pilote_acc(adresse+1,2,feu); - if code=ral_60 then pilote_acc(adresse+2,1,feu); - if code=rappel_60 then pilote_acc(adresse+2,2,feu); + if aspect=vert then pilote_acc(adresse,1,feu); + if aspect=vert_cli then pilote_acc(adresse,1,feu); + if aspect=jaune then pilote_acc(adresse,2,feu); + if aspect=jaune_cli then pilote_acc(adresse,2,feu); + if aspect=semaphore then pilote_acc(adresse+1,1,feu); + if aspect=semaphore_cli then pilote_acc(adresse+1,1,feu); + if aspect=carre then pilote_acc(adresse+1,2,feu); end; - if (code=jaune) and (combine=rappel_60) then pilote_acc(adresse+3,1,feu); + if combine=ral_60 then pilote_acc(adresse+2,1,feu); + if combine=rappel_60 then pilote_acc(adresse+2,2,feu); + if (aspect=jaune) and (combine=rappel_60) then pilote_acc(adresse+3,1,feu); end; // 95=VJR + carré + ral30 + rappel 60 if modele=95 then begin - if combine=0 then + if combine=16 then begin - if code=vert then pilote_acc(adresse,1,feu); - if code=vert_cli then pilote_acc(adresse,1,feu); - if code=jaune then pilote_acc(adresse,2,feu); - if code=jaune_cli then pilote_acc(adresse,2,feu); - if code=semaphore then pilote_acc(adresse+1,1,feu); - if code=semaphore_cli then pilote_acc(adresse+1,1,feu); - if code=carre then pilote_acc(adresse+1,2,feu); - if code=ral_30 then pilote_acc(adresse+2,1,feu); - if code=rappel_60 then pilote_acc(adresse+2,2,feu); + if aspect=vert then pilote_acc(adresse,1,feu); + if aspect=vert_cli then pilote_acc(adresse,1,feu); + if aspect=jaune then pilote_acc(adresse,2,feu); + if aspect=jaune_cli then pilote_acc(adresse,2,feu); + if aspect=semaphore then pilote_acc(adresse+1,1,feu); + if aspect=semaphore_cli then pilote_acc(adresse+1,1,feu); + if aspect=carre then pilote_acc(adresse+1,2,feu); end; - if (code=jaune) and (combine=rappel_60) then pilote_acc(adresse+3,1,feu); + if combine=ral_30 then pilote_acc(adresse+2,1,feu); + if combine=rappel_60 then pilote_acc(adresse+2,2,feu); + if (aspect=jaune) and (combine=rappel_60) then pilote_acc(adresse+3,1,feu); end; // 96=VJR + blanc + carré + ral30 + rappel30 if modele=96 then begin - if combine=0 then + if combine=16 then begin - if code=vert then pilote_acc(adresse,1,feu); - if code=vert_cli then pilote_acc(adresse,1,feu); - if code=jaune then pilote_acc(adresse,2,feu); - if code=jaune_cli then pilote_acc(adresse,2,feu); - if code=semaphore then pilote_acc(adresse+1,1,feu); - if code=semaphore_cli then pilote_acc(adresse+1,1,feu); - if code=carre then pilote_acc(adresse+1,2,feu); - if code=ral_30 then pilote_acc(adresse+2,1,feu); - if code=rappel_30 then pilote_acc(adresse+2,2,feu); - if code=blanc then pilote_acc(adresse+3,2,feu); - if code=blanc_cli then pilote_acc(adresse+3,2,feu); + if aspect=vert then pilote_acc(adresse,1,feu); + if aspect=vert_cli then pilote_acc(adresse,1,feu); + if aspect=jaune then pilote_acc(adresse,2,feu); + if aspect=jaune_cli then pilote_acc(adresse,2,feu); + if aspect=semaphore then pilote_acc(adresse+1,1,feu); + if aspect=semaphore_cli then pilote_acc(adresse+1,1,feu); + if aspect=carre then pilote_acc(adresse+1,2,feu); + if aspect=blanc then pilote_acc(adresse+3,2,feu); + if aspect=blanc_cli then pilote_acc(adresse+3,2,feu); end; - if (code=jaune) and (combine=rappel_30) then pilote_acc(adresse+3,1,feu); + if combine=ral_30 then pilote_acc(adresse+2,1,feu); + if combine=rappel_30 then pilote_acc(adresse+2,2,feu); + if (aspect=jaune) and (combine=rappel_30) then pilote_acc(adresse+3,1,feu); end; // 97=VJR + blanc + carré + ral30 + rappel60 if modele=97 then begin - if combine=0 then + if combine=16 then begin - if code=vert then pilote_acc(adresse,1,feu); - if code=vert_cli then pilote_acc(adresse,1,feu); - if code=jaune then pilote_acc(adresse,2,feu); - if code=jaune_cli then pilote_acc(adresse,2,feu); - if code=semaphore then pilote_acc(adresse+1,1,feu); - if code=semaphore_cli then pilote_acc(adresse+1,1,feu); - if code=carre then pilote_acc(adresse+1,2,feu); - if code=ral_30 then pilote_acc(adresse+2,1,feu); - if code=rappel_60 then pilote_acc(adresse+2,2,feu); - if code=blanc then pilote_acc(adresse+3,2,feu); - if code=blanc_cli then pilote_acc(adresse+3,2,feu); + if aspect=vert then pilote_acc(adresse,1,feu); + if aspect=vert_cli then pilote_acc(adresse,1,feu); + if aspect=jaune then pilote_acc(adresse,2,feu); + if aspect=jaune_cli then pilote_acc(adresse,2,feu); + if aspect=semaphore then pilote_acc(adresse+1,1,feu); + if aspect=semaphore_cli then pilote_acc(adresse+1,1,feu); + if aspect=carre then pilote_acc(adresse+1,2,feu); + if aspect=blanc then pilote_acc(adresse+3,2,feu); + if aspect=blanc_cli then pilote_acc(adresse+3,2,feu); end; - if (code=jaune) and (combine=rappel_60) then pilote_acc(adresse+3,1,feu); + if combine=ral_30 then pilote_acc(adresse+2,1,feu); + if combine=rappel_60 then pilote_acc(adresse+2,2,feu); + if (aspect=jaune) and (combine=rappel_60) then pilote_acc(adresse+3,1,feu); end; - + // 98=VJR + blanc + violet + ral30 + rappel30 if modele=98 then begin - if combine=0 then + if combine=16 then begin - if code=vert then pilote_acc(adresse,1,feu); - if code=vert_cli then pilote_acc(adresse,1,feu); - if code=jaune then pilote_acc(adresse,2,feu); - if code=jaune_cli then pilote_acc(adresse,2,feu); - if code=semaphore then pilote_acc(adresse+1,1,feu); - if code=semaphore_cli then pilote_acc(adresse+1,1,feu); - if code=violet then pilote_acc(adresse+1,2,feu); - if code=ral_30 then pilote_acc(adresse+2,1,feu); - if code=rappel_30 then pilote_acc(adresse+2,2,feu); - if code=blanc then pilote_acc(adresse+3,2,feu); - if code=blanc_cli then pilote_acc(adresse+3,2,feu); + if aspect=vert then pilote_acc(adresse,1,feu); + if aspect=vert_cli then pilote_acc(adresse,1,feu); + if aspect=jaune then pilote_acc(adresse,2,feu); + if aspect=jaune_cli then pilote_acc(adresse,2,feu); + if aspect=semaphore then pilote_acc(adresse+1,1,feu); + if aspect=semaphore_cli then pilote_acc(adresse+1,1,feu); + if aspect=violet then pilote_acc(adresse+1,2,feu); + if aspect=blanc then pilote_acc(adresse+3,2,feu); + if aspect=blanc_cli then pilote_acc(adresse+3,2,feu); end; - if (code=jaune) and (combine=rappel_30) then pilote_acc(adresse+3,1,feu); + if (aspect=jaune) and (combine=rappel_30) then pilote_acc(adresse+3,1,feu); + if combine=ral_30 then pilote_acc(adresse+2,1,feu); + if combine=rappel_30 then pilote_acc(adresse+2,2,feu); end; // 99=VJR + blanc + violet + ral30 + rappel60 if modele=99 then begin - if combine=0 then + if combine=16 then begin - if code=vert then pilote_acc(adresse,1,feu); - if code=vert_cli then pilote_acc(adresse,1,feu); - if code=jaune then pilote_acc(adresse,2,feu); - if code=jaune_cli then pilote_acc(adresse,2,feu); - if code=semaphore then pilote_acc(adresse+1,1,feu); - if code=semaphore_cli then pilote_acc(adresse+1,1,feu); - if code=violet then pilote_acc(adresse+1,2,feu); - if code=ral_30 then pilote_acc(adresse+2,1,feu); - if code=rappel_60 then pilote_acc(adresse+2,2,feu); - if code=blanc then pilote_acc(adresse+3,2,feu); - if code=blanc_cli then pilote_acc(adresse+3,2,feu); + if aspect=vert then pilote_acc(adresse,1,feu); + if aspect=vert_cli then pilote_acc(adresse,1,feu); + if aspect=jaune then pilote_acc(adresse,2,feu); + if aspect=jaune_cli then pilote_acc(adresse,2,feu); + if aspect=semaphore then pilote_acc(adresse+1,1,feu); + if aspect=semaphore_cli then pilote_acc(adresse+1,1,feu); + if aspect=violet then pilote_acc(adresse+1,2,feu); + if aspect=blanc then pilote_acc(adresse+3,2,feu); + if aspect=blanc_cli then pilote_acc(adresse+3,2,feu); end; - if (code=jaune) and (combine=rappel_60) then pilote_acc(adresse+3,1,feu); + if (aspect=jaune) and (combine=rappel_60) then pilote_acc(adresse+3,1,feu); + if combine=ral_30 then pilote_acc(adresse+2,1,feu); + if combine=rappel_60 then pilote_acc(adresse+2,2,feu); end; end; end; @@ -2200,49 +2224,50 @@ envoie les donn Le mode 1 permet la commande des signaux de 2, 3 et 4 feux Le mode 2 permet la commande de signaux de plus de 4 feux ===========================================================================} -procedure envoi_LDT(adr : integer); -var codebin,aspect,mode : integer; +procedure envoi_LDT(adresse : integer); +var code,aspect,combine,mode : word; + s : string; begin - codebin:=EtatSignalCplx[adr]; - aspect:=code_to_aspect(codebin); - if aspect>carre then mode:=2 else mode:=1; - if (ancien_tablo_signalCplx[adr]<>EtatSignalCplx[adr]) then //; && (stop_cmd==FALSE)) + if (ancien_tablo_signalCplx[adresse]<>EtatSignalCplx[adresse]) then //; && (stop_cmd==FALSE)) begin - ancien_tablo_signalCplx[adr]:=EtatSignalCplx[adr]; - //if (tempo_ACC>0) then sleep(100); // les commandes entre 2 feux successives doivent être séparées au minimum de 100 ms - if traceSign then affiche('Signal LDT: '+IntToSTR(adr)+' '+intToSTR(mode)+' '+intTOSTR(codebin),clOrange); - if AffSignal then afficheDebug('Signal LDT: '+IntToSTR(adr)+' '+intToSTR(mode)+' '+intTOSTR(codebin),clOrange); - + ancien_tablo_signalCplx[adresse]:=EtatSignalCplx[adresse]; + code:=EtatSignalCplx[adresse]; + code_to_aspect(code,aspect,combine); + s:='Signal LDT: ad'+IntToSTR(adresse)+'='+chaine_signal(code); + if traceSign then affiche(s,clOrange); + if Affsignal then afficheDebug(s,clOrange); + if (aspect=semaphore) or (aspect=vert) or (aspect=carre) or (aspect=jaune) then mode:=1 else mode:=2; + if aspect>carre then mode:=2 else mode:=1; case mode of // pour les décodeurs en mode 0, il faut écrire la routine vous même car le pilotage dépend du cablage // sauf pour le sémaphore, vert et jaune fixe 1 : // mode 1: feux 2 3 & 4 feux begin - if (aspect=semaphore) then pilote_acc(adr,1,feu); - if (aspect=vert) then pilote_acc(adr,2,feu); - if (aspect=carre) then pilote_acc(adr+1,1,feu); - if (aspect=jaune) then pilote_acc(adr+1,2,feu); + if (aspect=semaphore) then pilote_acc(adresse,1,feu); + if (aspect=vert) then pilote_acc(adresse,2,feu); + if (aspect=carre) then pilote_acc(adresse+1,1,feu); + if (aspect=jaune) then pilote_acc(adresse+1,2,feu); end; 2 : // mode 2: plus de 4 feux begin - if (aspect=semaphore) then begin pilote_acc(adr+2,1,feu);sleep(tempoFeu);pilote_acc(adr,1,feu);end; - if (aspect=vert) then begin pilote_acc(adr+2,1,feu);sleep(tempoFeu);pilote_acc(adr,2,feu);end; - if (aspect=carre) then begin pilote_acc(adr+2,1,feu);sleep(tempoFeu);pilote_acc(adr+1,1,feu);end; - if (aspect=jaune) then begin pilote_acc(adr+2,1,feu);sleep(tempoFeu);pilote_acc(adr+1,2,feu);end; - if (aspect=violet) then begin pilote_acc(adr+2,2,feu);sleep(tempoFeu);pilote_acc(adr,1,feu);end; - if (aspect=blanc) then begin pilote_acc(adr+2,2,feu);sleep(tempoFeu);pilote_acc(adr,2,feu);end; - if (aspect=semaphore) then begin pilote_acc(adr+2,2,feu);sleep(tempoFeu);pilote_acc(adr+1,1,feu);end; - if (aspect=aspect8) then begin pilote_acc(adr+2,2,feu);sleep(tempoFeu);pilote_acc(adr+1,2,feu);end; - if (aspect=ral_60_jaune_cli) then begin pilote_acc(adr+3,1,feu);sleep(tempoFeu);pilote_acc(adr,1,feu);end; // demande groupe 3 - if (aspect=vert_cli) then begin pilote_acc(adr+3,1,feu);sleep(tempoFeu);pilote_acc(adr,2,feu);end; // demande groupe 3 - if (aspect=Disque_D) then begin pilote_acc(adr+3,1,feu);sleep(tempoFeu);pilote_acc(adr+1,1,feu);end;// demande groupe 3 - if (aspect=jaune_cli) then begin pilote_acc(adr+3,1,feu);sleep(tempoFeu);pilote_acc(adr+1,2,feu);end; - if (aspect=ral_30) then begin pilote_acc(adr+3,2,feu);sleep(tempoFeu);pilote_acc(adr,1,feu);end; - if (aspect=ral_60) then begin pilote_acc(adr+3,2,feu);sleep(tempoFeu);pilote_acc(adr,2,feu);end; - if (aspect=rappel_30) then begin pilote_acc(adr+3,2,feu);sleep(tempoFeu);pilote_acc(adr+1,1,feu);end; - if (aspect=rappel_60) then begin pilote_acc(adr+3,2,feu);sleep(tempoFeu);pilote_acc(adr+1,2,feu);end; + if (aspect=semaphore) then begin pilote_acc(adresse+2,1,feu);sleep(tempoFeu);pilote_acc(adresse,1,feu);end; + if (aspect=vert) then begin pilote_acc(adresse+2,1,feu);sleep(tempoFeu);pilote_acc(adresse,2,feu);end; + if (aspect=carre) then begin pilote_acc(adresse+2,1,feu);sleep(tempoFeu);pilote_acc(adresse+1,1,feu);end; + if (aspect=jaune) then begin pilote_acc(adresse+2,1,feu);sleep(tempoFeu);pilote_acc(adresse+1,2,feu);end; + if (aspect=violet) then begin pilote_acc(adresse+2,2,feu);sleep(tempoFeu);pilote_acc(adresse,1,feu);end; + if (aspect=blanc) then begin pilote_acc(adresse+2,2,feu);sleep(tempoFeu);pilote_acc(adresse,2,feu);end; + if (aspect=semaphore) then begin pilote_acc(adresse+2,2,feu);sleep(tempoFeu);pilote_acc(adresse+1,1,feu);end; + if (combine=aspect8) then begin pilote_acc(adresse+2,2,feu);sleep(tempoFeu);pilote_acc(adresse+1,2,feu);end; + if (combine=ral_60_jaune_cli) then begin pilote_acc(adresse+3,1,feu);sleep(tempoFeu);pilote_acc(adresse,1,feu);end; // demande groupe 3 + if (aspect=vert_cli) then begin pilote_acc(adresse+3,1,feu);sleep(tempoFeu);pilote_acc(adresse,2,feu);end; // demande groupe 3 + if (combine=Disque_D) then begin pilote_acc(adresse+3,1,feu);sleep(tempoFeu);pilote_acc(adresse+1,1,feu);end;// demande groupe 3 + if (aspect=jaune_cli) then begin pilote_acc(adresse+3,1,feu);sleep(tempoFeu);pilote_acc(adresse+1,2,feu);end; + if (combine=ral_30) then begin pilote_acc(adresse+3,2,feu);sleep(tempoFeu);pilote_acc(adresse,1,feu);end; + if (combine=ral_60) then begin pilote_acc(adresse+3,2,feu);sleep(tempoFeu);pilote_acc(adresse,2,feu);end; + if (combine=rappel_30) then begin pilote_acc(adresse+3,2,feu);sleep(tempoFeu);pilote_acc(adresse+1,1,feu);end; + if (combine=rappel_60) then begin pilote_acc(adresse+3,2,feu);sleep(tempoFeu);pilote_acc(adresse+1,2,feu);end; end; end; end; @@ -2251,15 +2276,18 @@ end; procedure envoi_virtuel(adresse : integer); var - aspect,code : integer; + combine,aspect,code : word; + s : string; begin code:=etatsignalcplx[adresse]; if (ancien_tablo_signalCplx[adresse]<>EtatSignalCplx[adresse]) then //; && (stop_cmd==FALSE)) begin ancien_tablo_signalCplx[adresse]:=EtatSignalCplx[adresse]; - aspect:=code_to_aspect(code); // transforme le motif de bits en numéro "code des aspects des signaux" - if (tracesign) then Affiche('Signal virtuel: ad'+intToSTR(adresse)+'='+etatSign[aspect],clOrange); - if AffSignal then AfficheDebug('Signal virtuel: ad'+intToSTR(adresse)+'='+etatSign[aspect],clOrange); + code:=EtatSignalCplx[adresse]; + code_to_aspect(code,aspect,combine); + s:='Signal virtuel: ad'+IntToSTR(adresse)+'='+chaine_signal(code); + if traceSign then affiche(s,clOrange); + if Affsignal then afficheDebug(s,clOrange); end; end; @@ -2271,30 +2299,20 @@ envoie les donn Ici on met le bit 1 à 1 (état "vert" du programme hexmanipu ===========================================================================*) procedure envoi_signalBahn(adresse : integer); -var aspect,combineLoc,codebin : integer; +var aspect,code,combine : word; ralrap, jau ,Ancralrap,Ancjau : boolean; s : string; begin -// s:='@='+IntToSTR(adresse)+' '+intToSTR(ancien_tablo_signalCplx[adresse])+' '+intToSTR(EtatsignalCplx[adresse]); -// affiche(s,ClYellow); if (ancien_tablo_signalCplx[adresse]<>EtatSignalCplx[adresse]) then //; && (stop_cmd==FALSE)) begin - codebin:=EtatSignalCplx[adresse]; - aspect:=code_to_aspect(codebin); // transforme le motifs de bits en numéro "code des aspects des signaux" - combineLoc:=combine; // copier dans variable locale - //dessine_feu(adresse); - if traceSign then - begin - s:='Signal bahn: ad'+IntToSTR(adresse)+'='+etatSign[aspect]; - if CombineLoc<>0 then s:=s+' + '+etatSign[combineLoc]; - Affiche(s,clOrange); - end; - if AffSignal then - begin - s:='Signal bahn: ad'+IntToSTR(adresse)+'='+etatSign[aspect]; - if CombineLoc<>0 then s:=s+' + '+etatSign[combineLoc]; - AfficheDebug(s,clOrange); - end; + + code:=EtatSignalCplx[adresse]; + code_to_aspect(code,aspect,combine); + s:='Signal Bahn: ad'+IntToSTR(adresse)+'='+chaine_signal(code); + if traceSign then affiche(s,clOrange); + if Affsignal then afficheDebug(s,clOrange); + //Affiche(IntToSTR(aspect)+' '+inttoSTR(combine),clOrange); + // spécifique au décodeur digital bahn: // si le signal affichait un signal combiné, il faut éteindre le signal avec un sémaphore // avant d'afficher le nouvel état non combiné @@ -2302,12 +2320,13 @@ begin (TestBit(ancien_tablo_signalCplx[adresse],rappel_30)) or (TestBit(ancien_tablo_signalCplx[adresse],rappel_60)) ; // si ancien état du signal=jaune ou jaune cli Ancjau:=(TestBit(ancien_tablo_signalCplx[adresse],jaune)) or (TestBit(ancien_tablo_signalCplx[adresse],jaune_cli)) ; - + ancien_tablo_signalCplx[adresse]:=EtatSignalCplx[adresse]; + // si état demandé du signal=ralentissement ou rappel - ralrap:=(TestBit(codebin,ral_30)) or (TestBit(codebin,ral_60)) or - (TestBit(codebin,rappel_30)) or (TestBit(codebin,rappel_60)) ; + ralrap:=(TestBit(code,ral_30)) or (TestBit(code,ral_60)) or + (TestBit(code,rappel_30)) or (TestBit(code,rappel_60)) ; // si état demandé du signal=jaune ou cli - jau:=TestBit(codebin,jaune) or TestBit(codebin,jaune_cli) ; + jau:=TestBit(code,jaune) or TestBit(code,jaune_cli) ; //effacement du signal combiné par sémaphore suivant condition if (((Ancralrap and not(ralrap)) or (Ancjau and not(jau))) and (aspect>=8)) then @@ -2317,20 +2336,17 @@ begin // dessine_feu(adresse); end; - ancien_tablo_signalCplx[adresse]:=EtatSignalCplx[adresse]; - sleep(40); // les commandes entre 2 feux successifs doivent être séparées au minimum de 100 ms // affichage du premier aspect du signal(1er bit à 1 dans codebin - pilote_acc(adresse+aspect,2,feu) ; - + if aspect<>16 then pilote_acc(adresse+aspect,2,feu) ; // affichage de la signalisation combinée (2ème bit à 1 dans codebin) - if (CombineLoc<>0) then + if (Combine<>16) then begin sleep(40); - pilote_ACC(adresse+CombineLoc,2,feu) ; + pilote_ACC(adresse+Combine,2,feu) ; end; - + end; end; @@ -3348,7 +3364,7 @@ var s,sa,chaine,SOrigine: string; c,paig : char; tec,bistec,tjd,tjs,s2,trouve,triple,debugConfig,multiple,fini,finifeux : boolean; bd,virgule,i_detect,i,erreur,aig,detect,offset,index, adresse,j,position,temporisation,invers,indexPointe,indexDevie,indexDroit, - ComptEl,Compt_IT,Num_Element,k,modele,aig2,adr,erreur2,l,t,bis : integer; + ComptEl,Compt_IT,Num_Element,k,modele,aig2,adr,erreur2,l,t,bis,Nligne : integer; function lit_ligne : string ; begin repeat @@ -3378,13 +3394,15 @@ begin end; //ChDir(s); Affiche('lecture du fichier de configuration client-GL.cfg',clyellow); + {$I-} try assign(fichier,'client-GL.cfg'); reset(fichier); except Affiche('Fichier client-gl.cfg non trouvé',clred); end; - + {$I+} + {lecture du fichier de configuration} // taille de fonte s:=lit_ligne; @@ -3524,8 +3542,9 @@ begin // définition des aiguillages dans les branches maxaiguillage:=0; + Nligne:=1; repeat - s:=lit_ligne;sOrigine:=s; + s:=lit_ligne;sOrigine:=s;mod_aiguillages[Nligne]:=s;inc(Nligne); //chaine:=s; if debugconfig then Affiche(s,ClLime); if (s<>'0') then @@ -3690,7 +3709,7 @@ begin delete(s,1,virgule); end; - // si inversion aiguillage BIS pour parer à bug CDM aiguillage + // si inversion aiguillage BIS Val(enregistrement,adr,erreur); if erreur=0 then begin @@ -3711,10 +3730,11 @@ begin Affiche('définition des branches',clyellow); // branches de réseau - NDetecteurs:=0; + NDetecteurs:=0; Nligne:=1; i:=1;i_detect:=1; repeat s:=lit_ligne; + mod_Branches[Nligne]:=s;inc(Nligne); //Affiche(s,clWhite); //adresse:=pos('0',s); //s:='A16B,557,0' ; @@ -3781,12 +3801,12 @@ begin // feux Affiche('Définition des feux',clyellow); - i:=1; + i:=1;Nligne:=1; repeat s:=lit_ligne; if s<>'0' then begin - chaine:=s; + chaine:=s; mod_Signaux[Nligne]:=s;inc(Nligne); //Affiche(s,clYellow); finifeux:=s[1]='0'; if not(finifeux) then @@ -3980,11 +4000,13 @@ begin configNulle:=(maxAiguillage=0) and (NbreBranches=0) and (Nbrefeux=0); if configNulle then Affiche('Fonctionnement en config nulle',ClYellow); + // définition des actionneurs maxTablo_act:=1; - NbrePN:=0; + NbrePN:=0;Nligne:=1; repeat s:=lit_ligne; + mod_act[Nligne]:=s;inc(Nligne); if pos('F',s)<>0 then // -----------------fonction begin @@ -5535,8 +5557,9 @@ end; // mise à jour de l'état d'un feu en fontion de son environnement et affiche le feu procedure Maj_Feu(Adrfeu : integer); var i,j,k1,k2,BtypeSuiv,Adr_det,etat,Adr,Aig,DetPrec1,DetPrec2,Detprec3,Detprec4,Adr_El_Suiv, - Btype_el_suivant,det_initial,bt,el_suiv,modele,code : integer ; + Btype_el_suivant,det_initial,bt,el_suiv,modele : integer ; PresTrain,Aff_semaphore,car : boolean; + code,combine : word; s : string; begin s:='Traitement du feu '+intToSTR(Adrfeu)+'------------------------------------'; @@ -5562,7 +5585,7 @@ begin etat:=etat_signal_suivant(AdrFeu,1) ; // état du signal suivant + adresse du signal suivant dans Signal_Suivant if AffSignal then begin - code:=code_to_aspect(etat); + code_to_aspect(etat,code,combine); s:='Etat signal suivant ('+intToSTR(AdresseFeuSuivant)+') est '; s:=s+' à '+etatSign[code]; if Combine<>0 then s:=s+' + '+etatSign[combine]; @@ -6002,6 +6025,7 @@ var i,v,va,j,etatAct,Af,Ao : integer; begin // vérifier si l'actionneur en évènement a été déclaré pour réagir if AffActionneur then Affiche('Actionneur '+intToSTR(Adr)+'='+intToSTR(etat),clyellow); + // dans le tableau des actionneurs pour fonction train for i:=1 to maxTablo_act do begin @@ -6173,30 +6197,13 @@ procedure Event_Aig(adresse,pos,objet : integer); var s: string; begin // ------------------- traitement du numéro d'objet ------------------------- - // il faut mémoriser le numéro d'objet le plus bas au détriment de celui qui a la même adresse - // mais un numéro d'objet supérieur (bug CDM sur bretelles avec aiguillages à la même adresse) // init objet if aiguillage[adresse].objet=0 then begin aiguillage[adresse].objet:=objet; //affiche('stockage Aiguillage '+intToSTR(adresse)+' objet='+intToSTR(objet),clYellow); end; - // si l'objet reçu < stocké, on met a jour - if objet0 then dec(Tempo_init); if (Tempo_init=1) and AvecInit then begin @@ -7087,7 +7098,7 @@ begin begin //Affiche(IntToSTR(adresse),clOrange); Dessine_feu_mx(Feux[i].Img.Canvas,0,0,1,1,adresse,1); - end; + end; end; // feux du TCO @@ -7102,7 +7113,7 @@ begin a:=EtatsignalCplx[adresse]; // a = état binaire du feu if TestBit(a,jaune_cli) or TestBit(a,ral_60) or TestBit(a,rappel_60) or testBit(a,semaphore_cli) or - testBit(a,vert_cli) or testbit(a,blanc_cli) then + testBit(a,vert_cli) or testbit(a,blanc_cli) then begin aspect:=feuTCO[i].aspect; case aspect of @@ -7114,20 +7125,20 @@ begin 9 : ImageFeu:=Formprinc.Image9feux; else ImageFeu:=Formprinc.Image3feux; end; - + x:=(FeuTCO[i].x-1)*LargeurCell; // coordonnées XY et feu y:=(FeuTCO[i].y-1)*HauteurCell; TailleY:=ImageFeu.picture.BitMap.Height; // taille du feu d'origine (verticale) - TailleX:=ImageFeu.picture.BitMap.Width; - Orientation:=FeuTCO[i].FeuOriente; + TailleX:=ImageFeu.picture.BitMap.Width; + Orientation:=FeuTCO[i].FeuOriente; // réduction variable en fonction de la taille des cellules calcul_reduction(frx,fry,round(TailleX*LargeurCell/ZoomMax),round(tailleY*HauteurCell/ZoomMax),TailleX,TailleY); // décalage en X pour mettre la tete du feu alignée sur le bord droit de la cellule pour les feux tournés à 90G if orientation=2 then begin - if aspect=9 then x:=x+round(10*frX); - if aspect=7 then x:=x+round(10*frX); + if aspect=9 then x:=x+round(10*frX); + if aspect=7 then x:=x+round(10*frX); if aspect=5 then begin x:=x+round(10*frX);y:=y+HauteurCell-round(tailleX*frY); end; if aspect=4 then begin x:=x+round(10*frX);y:=y+HauteurCell-round(tailleX*frY); end; if aspect=3 then begin x:=x+round(10*frX);y:=y+HauteurCell-round(tailleX*frY); end; @@ -7150,15 +7161,6 @@ begin end; end; - // affiche la trame recue de l'interface après 500ms - if TpsRecuCom<5 then inc(TpsRecuCom); - if TpsRecuCom=5 then - begin - if trace then Affiche_chaine_hex(chaine_recue,clFuchsia); // en hexa ascii - chaine_recue:=''; - TpsRecuCom:=6; - end; - if (not(Maj_feux_cours) and (Tempo_chgt_feux=1)) then Maj_feux(); // mise à jour des feux sur chgt aiguillage if (not(Maj_feux_cours) and (Tempo_chgt_feux>0)) then dec(Tempo_chgt_feux); @@ -7196,7 +7198,7 @@ begin // evt détecteur ? if Tablo_simule[i_simule].detecteur<>0 then begin - // if i_simule=164 then + // if i_simule=164 then // begin // if Tablo_simule[i_simule].detecteur=538 then Affiche('création evt 538 index '+intToSTR(i_simule),clorange); // end; @@ -7221,7 +7223,6 @@ begin Affiche('Fin de simulation',Cyan); end; end; - end; // bouton version centrale Lenz @@ -7238,7 +7239,7 @@ procedure TFormPrinc.ButtonCommandeClick(Sender: TObject); var adr,valeur,erreur : integer; begin val(EditAdresse.text,adr,erreur); - if (erreur<>0) or (adr<1) or (adr>2048) then + if (erreur<>0) or (adr<1) or (adr>2048) then begin EditAdresse.text:='1'; exit; @@ -7294,7 +7295,7 @@ begin begin affiche(s,ClRed); afficheDebug(s,ClRed); - end; + end; parSocket:=false; ErrorCode:=0; end; @@ -7315,7 +7316,7 @@ begin affiche(s,ClRed); afficheDebug(s,ClRed); CDM_connecte:=false; - LabelTitre.caption:=titre; + if (portCommOuvert=false) and (parsocket=false) then LabelTitre.caption:=titre; ErrorCode:=0; end; @@ -7534,10 +7535,14 @@ begin end; procedure Interprete_trameCDM(recuCDM : string); -var i,objet,posST,posAC,posDT,k,l,erreur, adr,adr2,etat,etataig,etatAig2,name : integer ; +var i,objet,posST,posAC,posDT,posSG,posXY,k,l,erreur, adr,adr2,etat,etataig, + vitesse,etatAig2,name : integer ; + x,y,x2,y2 : longint ; s,ss,train : string; traite,sort : boolean; begin + //recuCDM:='S-E-08-0530-CMDTRN-SPDXY|063|07|NAME=BB16024;AD=3;SPEED=120;X=10521;Y=2867;X2=18915;Y2=3202;S-E-08-0531-CMDGEN-_STOP|000|'; + AckCDM:=recuCDM<>''; if pos('ACK',recuCDM)=0 then begin @@ -7545,7 +7550,7 @@ begin end; k:=0; repeat - //Affiche('K='+intToSTR(k)+' longueur='+intToSTR(length(recuCDM)),clyellow); + // Affiche('K='+intToSTR(k)+' longueur='+intToSTR(length(recuCDM)),clyellow); // évènement aiguillage. Le champ AD2 n'est pas forcément présent posST:=pos('CMDACC-ST_TO',recuCDM); if posST<>0 then @@ -7553,9 +7558,7 @@ begin //Affiche(recuCDM,cllime); objet:=0; i:=posEx('OBJ=',recuCDM,posST);ss:=copy(recuCDM,i+4,10); - if i<>0 then val(ss,objet,erreur) else - Affiche('Erreur pas d''objet ',clred); - + if i<>0 then val(ss,objet,erreur) else Affiche('Erreur pas d''objet ',clred); i:=posEx('AD=',recuCDM,posST);ss:=copy(recuCDM,i+3,10); //Affiche('j='+IntToSTR(j)+' i='+intToSTR(i),clred); if i0 then + begin + i:=posEx('AD=',recuCDM,posDT);ss:=copy(recuCDM,i+3,10); + val(ss,adr,erreur); + i:=posEx('STATE=',recuCDM,posSG);ss:=copy(recuCDM,i+6,10); + Delete(recuCDM,posSG,i+5-posSG); + val(ss,etat,erreur); + //Affiche('SignalCDM '+intToSTR(adr)+'='+IntToStr(etat),clYellow); + end ; + // évènement actionneur // attention un actionneur qui repasse à 0 ne contient pas de nom de train //S-E-03-0157-CMDACC-ST_AC|049|05|NAME=0;OBJ=7101;AD=815;TRAIN=CC406526;STATE=1; @@ -7657,9 +7672,56 @@ begin Event_act(adr,etat,train); // déclenche évent actionneur end; + // évènement position des trains - non stocké ni interprété + posXY:=pos('CMDTRN-SPDXY',recuCDM); + if posXY<>0 then + begin + i:=posEx('AD=',recuCDM,posXY);l:=posEx(';',recuCDM,i); + ss:=copy(recuCDM,i+3,10); + val(ss,adr,erreur); + //Affiche('AD='+IntToSTR(adr),clyellow); + Delete(recuCDM,i,l-i+1); + + i:=posEx('NAME=',recuCDM,posXY);l:=posEx(';',recuCDM,i); + train:=copy(recuCDM,i+5,l-i-5); + //Affiche('Train='+train,clyellow); + Delete(recuCDM,i,l-i+1); + + i:=posEx('SPEED=',recuCDM,posXY);l:=posEx(';',recuCDM,i); + ss:=copy(recuCDM,i+6,10); + val(ss,vitesse,erreur); + //Affiche('Vitesse='+intToSTR(vitesse),clyellow); + Delete(recuCDM,i,l-i+1); + + i:=posEx('X=',recuCDM,posXY);l:=posEx(';',recuCDM,i); + ss:=copy(recuCDM,i+2,10); + val(ss,x,erreur); + //Affiche('X='+IntTostr(x),clyellow); + Delete(recuCDM,i,l-i+1); + + i:=posEx('Y=',recuCDM,posXY);l:=posEx(';',recuCDM,i); + ss:=copy(recuCDM,i+2,10); + val(ss,y,erreur); + //Affiche('Y='+IntTostr(y),clyellow);; + Delete(recuCDM,i,l-i+1); + + i:=posEx('X2=',recuCDM,posXY);l:=posEx(';',recuCDM,i); + ss:=copy(recuCDM,i+3,10); + val(ss,x2,erreur); + //Affiche('X2='+IntTostr(x2),clyellow); + Delete(recuCDM,i,l-i+1); + + i:=posEx('Y2=',recuCDM,posXY);l:=posEx(';',recuCDM,i); + ss:=copy(recuCDM,i+3,10); + val(ss,y2,erreur); + //Affiche('Y2='+IntTostr(y2),clyellow); + Delete(recuCDM,i,l-i+1); + + Delete(recuCDM,posXY,12); + end; + inc(k); - //traite:=(k<30) or (pos('CMDACC-ST_TO',recuCDM)<>0) or (pos('CMDACC-ST_DT',recuCDM)<>0) ; - sort:=(k>70) or (posST=0) and (posDT=0) and (posAC=0); + sort:=(k>70) or (posST=0) and (posDT=0) and (posAC=0) and (posSG=0); until (sort); //Affiche('Ligne traitée'+recuCDM,clLime); diff --git a/UnitTCO.dcu b/UnitTCO.dcu index f10a02e..1cdeea3 100644 Binary files a/UnitTCO.dcu and b/UnitTCO.dcu differ diff --git a/UnitTCO.dfm b/UnitTCO.dfm index 17881cf..b297272 100644 --- a/UnitTCO.dfm +++ b/UnitTCO.dfm @@ -847,6 +847,15 @@ object FormTCO: TFormTCO WordWrap = True OnClick = ButtonMasquerClick end + object ButtonConstruit: TButton + Left = 880 + Top = 88 + Width = 89 + Height = 33 + Caption = 'Construit TCO' + TabOrder = 12 + OnClick = ButtonConstruitClick + end end object ButtonAfficheBandeau: TButton Left = 1051 diff --git a/UnitTCO.pas b/UnitTCO.pas index addd84f..7577b01 100644 --- a/UnitTCO.pas +++ b/UnitTCO.pas @@ -93,6 +93,7 @@ type Label29: TLabel; ImagePalette22: TImage; Label30: TLabel; + ButtonConstruit: TButton; procedure FormCreate(Sender: TObject); procedure ImageTCOClick(Sender: TObject); procedure FormActivate(Sender: TObject); @@ -245,6 +246,7 @@ type Button: TMouseButton; Shift: TShiftState; X, Y: Integer); procedure EditAdrElementKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); + procedure ButtonConstruitClick(Sender: TObject); private { Déclarations privées } @@ -1242,7 +1244,7 @@ begin Brush.Color:=clVoies; pen.color:=clVoies; - // aiguillage dévié (sans inversion) + // aiguillage dévié (sans inversion) ou position inconnue (9) if ((inverse=false) and (position=const_Devie)) or ((inverse=true) and (position=const_Droit)) or (position=9) then @@ -1252,7 +1254,7 @@ begin horz; if mode=1 then begin - // morceau de diag à tracer en clAllume + // morceau de diagonale à tracer en clAllume x1:=x0+largeurCell-round(3*frXGlob);y1:=y0; x2:=x0+largeurCell;y2:=y0+round(4*FryGlob); x3:=x0+(largeurCell div 2)+round(4*frXGlob);y3:=jy2; @@ -1260,9 +1262,10 @@ begin canvas.PolyGon([point(x1,y1),point(x2,y2),point(x3,y3),point(x4,y4)]); end; - // efface le morceau + // efface le morceau if ((inverse=false) and (position=const_Devie)) or - ((inverse=true) and (position=const_Droit)) then + ((inverse=true) and (position=const_Droit)) then + begin // efface le morceau x1:=x0+round(12*frXGlob);y1:=jy2; x2:=x1+round(20*frxGlob);y2:=y1; @@ -1272,6 +1275,7 @@ begin Brush.Color:=fond; Polygon([point(x1,y1),Point(x2,y2),Point(x3,y3),Point(x4,y4)]); end; + end; // aiguillage droit (sans inversion) ou dévie (avec inversion) if ((inverse=false) and (position=const_Droit)) or @@ -1282,7 +1286,6 @@ begin diagonale; // efface le morceau - if (position=const_Droit) then x1:=x0+round(19*frXGlob);y1:=jy1; x2:=x1+round(6*frxGlob);y2:=y1; x3:=x2-round(12*FrxGlob);y3:=y2+round(12*fryGlob); @@ -1291,7 +1294,7 @@ begin Brush.Color:=fond; Polygon([point(x1,y1),Point(x2,y2),Point(x3,y3),Point(x4,y4)]); end; - end; + end; end; // Element 14 @@ -2262,12 +2265,12 @@ end; // transforme les branches en TCO // trop compliqué. Il faudra dessiner son TCO soit meme procedure construit_TCO; -var x,y,i,j,Max,indexMax : integer; +var x,y,i,j,Max,indexMax,Btype,Adresse,ligne,AdrSuiv,Bimage : integer; begin // étape 0 Raz du TCO - for y:=1 to 20 do - for x:=1 to 20 do - begin + for y:=1 to NbreCellY do + for x:=1 to NbreCellX do + begin TCO[x,y].Adresse:=0; TCO[x,y].Btype:=0; end; @@ -2285,10 +2288,33 @@ begin Affiche('La branche la plus grande a pour index '+IntToSTR(IndexMax),clOrange); // stocker cette branche au milieu du TCO (en 5) + ligne:=5; for i:=1 to Max do begin - TCO[i,5].Adresse:=BrancheN[IndexMax,i].Adresse; - TCO[i,5].Btype:=BrancheN[IndexMax,i].Btype; + Adresse:=BrancheN[IndexMax,i].Adresse; + Btype:=BrancheN[IndexMax,i].Btype; + TCO[i,ligne].Adresse:=Adresse; + TCO[i,ligne].Btype:=Btype; + // Btype 1= détecteur 2= aiguillage 3=bis 4=Buttoir + if Btype=1 then TCO[i,ligne].BImage:=1; + if Btype=2 then + begin + // A20,547,561,A22,A24,A26,515,518,A31,A29,A28,A30,539,522,A3,A1,A2,A4,A6B,545,A5B,A3 + //20,P8P,D547,S548 // 22,P24P,S561,D25S + // on se réfère au suivant + AdrSuiv:=BrancheN[IndexMax,i+1].Adresse; + // connecté sur position droite : la pointe est à gauche + if aiguillage[adresse].Adroit=AdrSuiv then + Bimage:=3; // ou 4 + // connecté sur position déviée : la pointe est à gauche, mais il faut changer de ligne + if aiguillage[adresse].Adevie=AdrSuiv then + Bimage:=4; // ou 4 + // connecté sur pointe : la pointe est à droite + if aiguillage[adresse].Apointe=AdrSuiv then + Bimage:=5; // ou 2 + TCO[i,ligne].BImage:=Bimage; + end; + end; end; @@ -2307,8 +2333,9 @@ begin // récupérer la position de l'aiguillage if (bImage>=2) and (btype<=14) then begin - if Adresse<>0 then pos:=Aiguillage[adresse].position - else pos:=9; + if Adresse<>0 then pos:=Aiguillage[adresse].position + + else pos:=9; end; Xorg:=(x-1)*LargeurCell; @@ -3868,8 +3895,8 @@ end; procedure TFormTCO.Button1Click(Sender: TObject); begin - Detecteur[569]:=true; - Maj_tco(569); + Detecteur[569]:=true; + Maj_tco(569); end; @@ -4181,6 +4208,10 @@ begin ScrollBox.Height:=ClientHeight-Panel1.Height-40; end; +procedure TFormTCO.ButtonConstruitClick(Sender: TObject); +begin + construit_TCO; +end; begin diff --git a/verif_version.dcu b/verif_version.dcu index e6d70cd..5d8fadc 100644 Binary files a/verif_version.dcu and b/verif_version.dcu differ diff --git a/verif_version.pas b/verif_version.pas index c3e2c56..695ee14 100644 --- a/verif_version.pas +++ b/verif_version.pas @@ -23,7 +23,7 @@ var Lance_verif : integer; verifVersion,notificationVersion : boolean; -Const Version='1.61'; //Version='1.2';// sert à la comparaison de la version publiée +Const Version='1.7'; //Version='1.2';// sert à la comparaison de la version publiée implementation diff --git a/versions.txt b/versions.txt index e1987cc..c3310a8 100644 --- a/versions.txt +++ b/versions.txt @@ -19,5 +19,6 @@ Version 1.44 : Gestion trains avec voitures Version 1.45 : Rejette les n° d'objets supérieurs aiguillages à la même adresse Version 1.5 : Nouvel algorithme de suivi des trains - Gestion des feux provenant de voies en buttoir Version 1.6 : Implémentation du TCO. Ouverture de CDM rail au démarrage avec LAY à la demande - +Version 1.7 : Sauvegarde de la configuration dans les fichier client_gl.cfg et config.cfg si modification des paramètres depuis le menu de configuration. + Feu violet disponible sur signaux à 5, 7 et 9 feux.