V1.74
This commit is contained in:
BIN
Binary file not shown.
Binary file not shown.
+543
-37
@@ -1,6 +1,6 @@
|
||||
object FormConfig: TFormConfig
|
||||
Left = 250
|
||||
Top = 200
|
||||
Left = 226
|
||||
Top = 188
|
||||
Hint =
|
||||
'Modifie les fichiers de configuration selon les s'#233'lections chois' +
|
||||
'ies'
|
||||
@@ -22,10 +22,10 @@ object FormConfig: TFormConfig
|
||||
TextHeight = 13
|
||||
object LabelInfo: TLabel
|
||||
Left = 601
|
||||
Top = 424
|
||||
Width = 4
|
||||
Top = 432
|
||||
Width = 13
|
||||
Height = 16
|
||||
Caption = '-'
|
||||
Caption = '- '
|
||||
Font.Charset = ANSI_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -13
|
||||
@@ -1365,6 +1365,177 @@ object FormConfig: TFormConfig
|
||||
AAAAAAAAAAAAAAAAAAAA}
|
||||
Visible = False
|
||||
end
|
||||
object ImageTri: TImage
|
||||
Left = 624
|
||||
Top = 344
|
||||
Width = 145
|
||||
Height = 65
|
||||
Picture.Data = {
|
||||
07544269746D617076120000424D761200000000000076000000280000008900
|
||||
000040000000010004000000000000120000120B0000120B0000100000001000
|
||||
000000000000A5A5A500CECECE00FF000000FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||
FF00333333333333333333333333333333333333333333333333333333333333
|
||||
3333333333333333333333333333333333333333333333333333333333333333
|
||||
3333333333333000000033333333333333333333333333333333333333333333
|
||||
3333333333333333333333333333333333333333333333333333333333333333
|
||||
3333333333333333333333333333300000003333333333333333333333333333
|
||||
3333333333333333333333333333333333333333333333333333333333333333
|
||||
3333333333333333333333333333333333333333333330000000333333333333
|
||||
3333333333333333333333333333333333333333333333333333333333333333
|
||||
3333333333333333333333333333333333333333333333333333333333333000
|
||||
0000333333333333333333333333333333333333333333333333333333333333
|
||||
3333333333333333333333333333333333333333333333333333333333333333
|
||||
3333333333333000000033333333333333333333333333333333333333333333
|
||||
3333333333333333333333333333333333333333333333333333333333333333
|
||||
3333333333333333333333333333300000003333333333333333333333333333
|
||||
3333333333333333333333333333333333333333333333333333333333333333
|
||||
3333333333333333333333333333333111111033333330000000333333333333
|
||||
3333333333333333333333333333333333333333333333333333333333333333
|
||||
3333333333333333333333333333333333333333333111111111103333333000
|
||||
0000333333333333333333333333333333333333333333333333333333333333
|
||||
3333333333333333333333333333333333333333333333333333331111111111
|
||||
1111120333333000000033333333333333333333333333333333333333333333
|
||||
3333333333333333333333333333333333333333333333333333333333333333
|
||||
3311111111111111111000033333300000003333333333333333333333333333
|
||||
3333333333333333333333333333333333333333333333333333333333333333
|
||||
3333333333333311111111111111110000000003333330000000333333333333
|
||||
3333333333333333333333333333333333333333333333333333333333333333
|
||||
3333333333333333333333333111111111111111110000000001110333333000
|
||||
0000333333333333333333333333333333333333333333333333333333333333
|
||||
3333333333333333333333333333333333333111111111111111110000000011
|
||||
1111111033333000000033333333333333333333333333333333333333333333
|
||||
3333333333333333333333333333333333333333333333331111111111111111
|
||||
1000000000111111111111103333300000003333333333333333333333333333
|
||||
3333333333333333333333333333333333333333333333333333333333111111
|
||||
1111111111111000000000111111111111111110333330000000333333333333
|
||||
3333333333333333333333333333333333333333333333333333333333333333
|
||||
3333111111111111111111110000000001111111111111111111111033333000
|
||||
0000333333333333333333333333333333333333333333333333333333333333
|
||||
3333333333333311111111111111111111100000000001111111111111111111
|
||||
1111111103333000000033333333333333333333333333333333333333333333
|
||||
3333333333333333333333311111111111111111111110000000000011111111
|
||||
1111111111111111111110000333300000003333333333333333333333333333
|
||||
3333333333333333333333333333311111111111111111111111111000000000
|
||||
0001111111111111111111111111111110000000033330000000333333333333
|
||||
3333333333333333333333333333333333311111111111111111111111111111
|
||||
1000000000000111111111111111111111111111111110000000033333333000
|
||||
0000333333333333333333333333333333333331111111111111111111111111
|
||||
1111111111100000000000011111111111111111111111111111111110000000
|
||||
0333333333333000000033333111111111111111111111111111111111111111
|
||||
1111111111111111110000000000000001111111111111111111111111111111
|
||||
1111100000000333333333333333300000003333301111111111111111111111
|
||||
1111111111111111111111110000000000000000000111111111111111111111
|
||||
1111111111111111100000000333333333333333333330000000333330111111
|
||||
1111111111111111111111111111100000000000000000000011111111111111
|
||||
1111111111111111111111111111000000000333333333333333333333333000
|
||||
0000333330111111111111110000000000000000000000000000000011111111
|
||||
1111111111111111111111111111111111111111000000000333333333333333
|
||||
3333333333333000000033333000000000000000000000000000000000000111
|
||||
1111111111111111111111111111111111111111111111111110000000000000
|
||||
0000000000000000000000000033300000003333300000000000000011111111
|
||||
1111111111111111111111111111111111111111111111111111111111111000
|
||||
0000000000000000000000000000000000000000003330000000333330111111
|
||||
1111111111111111111111111111111111111111111111111111111111111111
|
||||
1111111111111111111111111111111111111111111111111111111110333000
|
||||
0000333330111111111111111111111111111111111111111111111111111111
|
||||
1111111111111111111111111111111111111111111111111111111111111111
|
||||
1111111110333000000033333011111111111111111111111111111111111111
|
||||
1111111111111111111111111111111111111111111111111111111111111111
|
||||
1111111111111111111111111033300000003333301111111111111111111111
|
||||
1111111111111111111111111111111111111111111111111111111111111111
|
||||
1111111111111111111111111111111111111111103330000000333330111111
|
||||
1111111111111111111111111111111111111111111111111111111111111111
|
||||
1111111111111111111111111111111111111111111111111111111110333000
|
||||
0000333330111111111111111111111111111111111111111111111111111111
|
||||
1111111111111111111111111111111111111111111111111111111111111111
|
||||
1111111110333000000033333011111111111111111111111111111111111111
|
||||
1111111111111111111111111111111111111111111111111111111111111111
|
||||
1111111111111111111111111033300000003333300000000000000011111111
|
||||
1111111111111111111111111111111111111111111111111111111111111000
|
||||
0000000000000000000000000000000000000000003330000000333330000000
|
||||
0000000000000000000000000000011111111111111111111111111111111111
|
||||
1111111111111111111000000000000000000000000000000000000000333000
|
||||
0000333330111111111111110000000000000000000000000000000011111111
|
||||
1111111111111111111111111111111111111111000000000333333333333333
|
||||
3333333333333000000033333011111111111111111111111111111111111000
|
||||
0000000000000000001111111111111111111111111111111111111111110000
|
||||
0000033333333333333333333333300000003333301111111111111111111111
|
||||
1111111111111111111111110000000000000000000111111111111111111111
|
||||
1111111111111111100000000333333333333333333330000000333330111111
|
||||
1111111111111111111111111111111111111111111111111100000000000000
|
||||
0111111111111111111111111111111111111000000003333333333333333000
|
||||
0000333333333333333333333333333333333331111111111111111111111111
|
||||
1111111111100000000000011111111111111111111111111111111110000000
|
||||
0333333333333000000033333333333333333333333333333333333333333333
|
||||
3331111111111111111111111111111110000000000001111111111111111111
|
||||
1111111111111000000003333333300000003333333333333333333333333333
|
||||
3333333333333333333333333333311111111111111111111111111000000000
|
||||
0001111111111111111111111111111110000000033330000000333333333333
|
||||
3333333333333333333333333333333333333333333333333333333111111111
|
||||
1111111111111000000000001111111111111111111111111111100003333000
|
||||
0000333333333333333333333333333333333333333333333333333333333333
|
||||
3333333333333311111111111111111111100000000001111111111111111111
|
||||
1111111103333000000033333333333333333333333333333333333333333333
|
||||
3333333333333333333333333333333333331111111111111111111100000000
|
||||
0111111111111111111111103333300000003333333333333333333333333333
|
||||
3333333333333333333333333333333333333333333333333333333333111111
|
||||
1111111111111000000000111111111111111110333330000000333333333333
|
||||
3333333333333333333333333333333333333333333333333333333333333333
|
||||
3333333333333333111111111111111110000000001111111111111033333000
|
||||
0000333333333333333333333333333333333333333333333333333333333333
|
||||
3333333333333333333333333333333333333111111111111111110000000011
|
||||
1111111033333000000033333333333333333333333333333333333333333333
|
||||
3333333333333333333333333333333333333333333333333333333331111111
|
||||
1111111111000000000111033333300000003333333333333333333333333333
|
||||
3333333333333333333333333333333333333333333333333333333333333333
|
||||
3333333333333311111111111111110000000003333330000000333333333333
|
||||
3333333333333333333333333333333333333333333333333333333333333333
|
||||
3333333333333333333333333333333333111111111111111110000333333000
|
||||
0000333333333333333333333333333333333333333333333333333333333333
|
||||
3333333333333333333333333333333333333333333333333333331111111111
|
||||
1111120333333000000033333333333333333333333333333333333333333333
|
||||
3333333333333333333333333333333333333333333333333333333333333333
|
||||
3333333333311111111110333333300000003333333333333333333333333333
|
||||
3333333333333333333333333333333333333333333333333333333333333333
|
||||
3333333333333333333333333333333111111033333330000000333333333333
|
||||
3333333333333333333333333333333333333333333333333333333333333333
|
||||
3333333333333333333333333333333333333333333333333333333333333000
|
||||
0000333333333333333333333333333333333333333333333333333333333333
|
||||
3333333333333333333333333333333333333333333333333333333333333333
|
||||
3333333333333000000033333333333333333333333333333333333333333333
|
||||
3333333333333333333333333333333333333333333333333333333333333333
|
||||
3333333333333333333333333333300000003333333333333333333333333333
|
||||
3333333333333333333333333333333333333333333333333333333333333333
|
||||
3333333333333333333333333333333333333333333330000000333333333333
|
||||
3333333333333333333333333333333333333333333333333333333333333333
|
||||
3333333333333333333333333333333333333333333333333333333333333000
|
||||
0000333333333333333333333333333333333333333333333333333333333333
|
||||
3333333333333333333333333333333333333333333333333333333333333333
|
||||
3333333333333000000033333333333333333333333333333333333333333333
|
||||
3333333333333333333333333333333333333333333333333333333333333333
|
||||
3333333333333333333333333333300000003333333333333333333333333333
|
||||
3333333333333333333333333333333333333333333333333333333333333333
|
||||
3333333333333333333333333333333333333333333330000000333333333333
|
||||
3333333333333333333333333333333333333333333333333333333333333333
|
||||
3333333333333333333333333333333333333333333333333333333333333000
|
||||
0000}
|
||||
Visible = False
|
||||
end
|
||||
object Label19: TLabel
|
||||
Left = 104
|
||||
Top = 104
|
||||
Width = 75
|
||||
Height = 13
|
||||
Caption = 'Element suivant'
|
||||
end
|
||||
object Label20: TLabel
|
||||
Left = 24
|
||||
Top = 160
|
||||
Width = 50
|
||||
Height = 13
|
||||
Caption = 'LabelTrain'
|
||||
end
|
||||
object ButtonAppliquerEtFermer: TButton
|
||||
Left = 384
|
||||
Top = 440
|
||||
@@ -1390,7 +1561,7 @@ object FormConfig: TFormConfig
|
||||
Top = 8
|
||||
Width = 585
|
||||
Height = 417
|
||||
ActivePage = TabSheet1
|
||||
ActivePage = TabSheetCDM
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clBackground
|
||||
Font.Height = -11
|
||||
@@ -1504,14 +1675,14 @@ object FormConfig: TFormConfig
|
||||
Top = 8
|
||||
Width = 273
|
||||
Height = 169
|
||||
Caption = 'Au d'#233'marrage de CDM Rail : interface '
|
||||
Caption = 'Au d'#233'marrage de CDM Rail : serveur'
|
||||
TabOrder = 2
|
||||
object RadioButton4: TRadioButton
|
||||
Left = 8
|
||||
Top = 16
|
||||
Width = 185
|
||||
Height = 17
|
||||
Caption = 'Ne pas d'#233'marrer d'#39'interface'
|
||||
Caption = 'Ne pas d'#233'marrer de serveur'
|
||||
TabOrder = 0
|
||||
end
|
||||
object RadioButton5: TRadioButton
|
||||
@@ -1583,19 +1754,12 @@ object FormConfig: TFormConfig
|
||||
Left = 296
|
||||
Top = 184
|
||||
Width = 273
|
||||
Height = 145
|
||||
Caption = 'Au d'#233'marrage de CDM Rail : interface de'
|
||||
Height = 137
|
||||
Caption = 'Au d'#233'marrage de CDM Rail : interface LENZ'
|
||||
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
|
||||
Top = 24
|
||||
Width = 209
|
||||
Height = 17
|
||||
Caption = 'Automatique'
|
||||
@@ -1603,7 +1767,7 @@ object FormConfig: TFormConfig
|
||||
end
|
||||
object RadioButton14: TRadioButton
|
||||
Left = 8
|
||||
Top = 48
|
||||
Top = 40
|
||||
Width = 217
|
||||
Height = 17
|
||||
Caption = 'LI-USB'
|
||||
@@ -1611,7 +1775,7 @@ object FormConfig: TFormConfig
|
||||
end
|
||||
object RadioButton15: TRadioButton
|
||||
Left = 8
|
||||
Top = 64
|
||||
Top = 56
|
||||
Width = 217
|
||||
Height = 17
|
||||
Caption = 'LI-101F'
|
||||
@@ -1619,7 +1783,7 @@ object FormConfig: TFormConfig
|
||||
end
|
||||
object RadioButton16: TRadioButton
|
||||
Left = 8
|
||||
Top = 80
|
||||
Top = 72
|
||||
Width = 217
|
||||
Height = 17
|
||||
Caption = 'LI-100F'
|
||||
@@ -1627,7 +1791,7 @@ object FormConfig: TFormConfig
|
||||
end
|
||||
object RadioButton17: TRadioButton
|
||||
Left = 8
|
||||
Top = 96
|
||||
Top = 88
|
||||
Width = 209
|
||||
Height = 17
|
||||
Caption = 'LI-100'
|
||||
@@ -1635,7 +1799,7 @@ object FormConfig: TFormConfig
|
||||
end
|
||||
object RadioButton18: TRadioButton
|
||||
Left = 8
|
||||
Top = 112
|
||||
Top = 104
|
||||
Width = 113
|
||||
Height = 17
|
||||
Caption = 'Genli'
|
||||
@@ -1683,9 +1847,9 @@ object FormConfig: TFormConfig
|
||||
object CheckServPosTrains: TCheckBox
|
||||
Left = 8
|
||||
Top = 88
|
||||
Width = 121
|
||||
Width = 169
|
||||
Height = 17
|
||||
Caption = 'Position des trains'
|
||||
Caption = 'Position des trains (non utilis'#233')'
|
||||
TabOrder = 3
|
||||
end
|
||||
object CheckBoxSrvSig: TCheckBox
|
||||
@@ -1693,7 +1857,7 @@ object FormConfig: TFormConfig
|
||||
Top = 40
|
||||
Width = 113
|
||||
Height = 17
|
||||
Caption = 'Signaux'
|
||||
Caption = 'Signaux (non utilis'#233')'
|
||||
TabOrder = 4
|
||||
end
|
||||
end
|
||||
@@ -1949,7 +2113,7 @@ object FormConfig: TFormConfig
|
||||
object MemoAig: TMemo
|
||||
Left = 0
|
||||
Top = 24
|
||||
Width = 249
|
||||
Width = 273
|
||||
Height = 361
|
||||
Color = clInfoText
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
@@ -1966,7 +2130,7 @@ object FormConfig: TFormConfig
|
||||
OnDblClick = MemoAigDblClick
|
||||
end
|
||||
object GroupBox11: TGroupBox
|
||||
Left = 264
|
||||
Left = 280
|
||||
Top = 32
|
||||
Width = 289
|
||||
Height = 233
|
||||
@@ -1986,7 +2150,7 @@ object FormConfig: TFormConfig
|
||||
ParentFont = False
|
||||
end
|
||||
object LabelLigne: TLabel
|
||||
Left = 88
|
||||
Left = 72
|
||||
Top = 42
|
||||
Width = 104
|
||||
Height = 16
|
||||
@@ -2026,7 +2190,7 @@ object FormConfig: TFormConfig
|
||||
end
|
||||
object LabelBD: TLabel
|
||||
Left = 225
|
||||
Top = 176
|
||||
Top = 174
|
||||
Width = 9
|
||||
Height = 16
|
||||
Caption = 'D'
|
||||
@@ -2056,6 +2220,19 @@ object FormConfig: TFormConfig
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object Label18: TLabel
|
||||
Left = 220
|
||||
Top = 198
|
||||
Width = 16
|
||||
Height = 16
|
||||
Caption = 'S2'
|
||||
Font.Charset = ANSI_CHARSET
|
||||
Font.Color = clBlack
|
||||
Font.Height = -13
|
||||
Font.Name = 'Arial'
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object GroupBox10: TGroupBox
|
||||
Left = 40
|
||||
Top = 64
|
||||
@@ -2090,7 +2267,7 @@ object FormConfig: TFormConfig
|
||||
end
|
||||
object EditDroit_BD: TEdit
|
||||
Left = 240
|
||||
Top = 176
|
||||
Top = 174
|
||||
Width = 41
|
||||
Height = 21
|
||||
TabOrder = 1
|
||||
@@ -2128,6 +2305,14 @@ object FormConfig: TFormConfig
|
||||
TabOrder = 5
|
||||
Text = 'EditPointe'
|
||||
end
|
||||
object EditDevieS2: TEdit
|
||||
Left = 240
|
||||
Top = 196
|
||||
Width = 41
|
||||
Height = 21
|
||||
TabOrder = 6
|
||||
Text = 'EditDevie_HD'
|
||||
end
|
||||
end
|
||||
object Edit_HG: TEdit
|
||||
Left = 296
|
||||
@@ -2171,14 +2356,16 @@ object FormConfig: TFormConfig
|
||||
object Label15: TLabel
|
||||
Left = 0
|
||||
Top = 8
|
||||
Width = 253
|
||||
Width = 530
|
||||
Height = 13
|
||||
Caption = 'Liste de mod'#233'lisation des signaux du fichier config.cfg'
|
||||
Caption =
|
||||
'Liste de mod'#233'lisation des signaux du fichier config.cfg - clique' +
|
||||
'z sur une ligne pour afficher la description du signal'
|
||||
end
|
||||
object MemoSignaux: TMemo
|
||||
Left = 0
|
||||
Top = 24
|
||||
Width = 569
|
||||
Width = 289
|
||||
Height = 361
|
||||
Color = clInfoText
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
@@ -2190,6 +2377,62 @@ object FormConfig: TFormConfig
|
||||
ReadOnly = True
|
||||
ScrollBars = ssVertical
|
||||
TabOrder = 0
|
||||
OnClick = MemoSignauxClick
|
||||
end
|
||||
object GroupBox12: TGroupBox
|
||||
Left = 304
|
||||
Top = 40
|
||||
Width = 257
|
||||
Height = 257
|
||||
Caption = 'Description du signal'
|
||||
TabOrder = 1
|
||||
object ImageSignal: TImage
|
||||
Left = 8
|
||||
Top = 72
|
||||
Width = 65
|
||||
Height = 137
|
||||
end
|
||||
object LabelAdrSig: TLabel
|
||||
Left = 13
|
||||
Top = 20
|
||||
Width = 154
|
||||
Height = 19
|
||||
Caption = 'Adresse du signal = '
|
||||
Font.Charset = ANSI_CHARSET
|
||||
Font.Color = clBlack
|
||||
Font.Height = -16
|
||||
Font.Name = 'Arial'
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object LabelDec: TLabel
|
||||
Left = 80
|
||||
Top = 72
|
||||
Width = 53
|
||||
Height = 13
|
||||
Caption = 'D'#233'codeur: '
|
||||
end
|
||||
object LabelDetAss: TLabel
|
||||
Left = 80
|
||||
Top = 88
|
||||
Width = 86
|
||||
Height = 13
|
||||
Caption = 'D'#233'tecteur associ'#233
|
||||
end
|
||||
object LabelElSuiv: TLabel
|
||||
Left = 80
|
||||
Top = 104
|
||||
Width = 75
|
||||
Height = 13
|
||||
Caption = 'Element suivant'
|
||||
end
|
||||
object LabelVerrou: TLabel
|
||||
Left = 80
|
||||
Top = 120
|
||||
Width = 105
|
||||
Height = 13
|
||||
Caption = 'Verrouillable au carr'#233' :'
|
||||
end
|
||||
end
|
||||
end
|
||||
object TabSheet4: TTabSheet
|
||||
@@ -2198,14 +2441,16 @@ object FormConfig: TFormConfig
|
||||
object Label16: TLabel
|
||||
Left = 0
|
||||
Top = 8
|
||||
Width = 272
|
||||
Width = 555
|
||||
Height = 13
|
||||
Caption = 'Liste de mod'#233'lisation des actionneurs du fichier config.cfg'
|
||||
Caption =
|
||||
'Liste de mod'#233'lisation des actionneurs du fichier config.cfg - cl' +
|
||||
'iquez sur une ligne pour afficher la description de l'#39'action'
|
||||
end
|
||||
object MemoAct: TMemo
|
||||
Left = 0
|
||||
Top = 24
|
||||
Width = 569
|
||||
Width = 289
|
||||
Height = 361
|
||||
Color = clInfoText
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
@@ -2217,6 +2462,267 @@ object FormConfig: TFormConfig
|
||||
ReadOnly = True
|
||||
ScrollBars = ssVertical
|
||||
TabOrder = 0
|
||||
OnClick = MemoActClick
|
||||
end
|
||||
object GroupBox13: TGroupBox
|
||||
Left = 304
|
||||
Top = 32
|
||||
Width = 257
|
||||
Height = 345
|
||||
Caption = 'Description de l'#39'actionneur '
|
||||
TabOrder = 1
|
||||
object GroupBox14: TGroupBox
|
||||
Left = 16
|
||||
Top = 24
|
||||
Width = 225
|
||||
Height = 73
|
||||
Caption = 'Type d'#39'actionneur '
|
||||
TabOrder = 0
|
||||
object RadioButtonLoc: TRadioButton
|
||||
Left = 24
|
||||
Top = 24
|
||||
Width = 193
|
||||
Height = 17
|
||||
Caption = 'Fonction F pour locomotive'
|
||||
TabOrder = 0
|
||||
end
|
||||
object RadioButtonPN: TRadioButton
|
||||
Left = 24
|
||||
Top = 40
|
||||
Width = 193
|
||||
Height = 17
|
||||
Caption = 'Gestion de passage '#224' niveau'
|
||||
TabOrder = 1
|
||||
end
|
||||
end
|
||||
object GroupBoxAct: TGroupBox
|
||||
Left = 16
|
||||
Top = 208
|
||||
Width = 225
|
||||
Height = 129
|
||||
Caption = 'Actionneur fonction de locomotive '
|
||||
TabOrder = 1
|
||||
object LabelActionneur: TLabel
|
||||
Left = 56
|
||||
Top = 44
|
||||
Width = 51
|
||||
Height = 13
|
||||
Caption = 'Actionneur'
|
||||
end
|
||||
object LabelTrain: TLabel
|
||||
Left = 72
|
||||
Top = 20
|
||||
Width = 24
|
||||
Height = 13
|
||||
Caption = 'Train'
|
||||
end
|
||||
object Labela: TLabel
|
||||
Left = 144
|
||||
Top = 68
|
||||
Width = 6
|
||||
Height = 13
|
||||
Caption = #224
|
||||
end
|
||||
object LabelFonction: TLabel
|
||||
Left = 56
|
||||
Top = 68
|
||||
Width = 41
|
||||
Height = 13
|
||||
Caption = 'Fonction'
|
||||
end
|
||||
object LabelTempo: TLabel
|
||||
Left = 40
|
||||
Top = 84
|
||||
Width = 55
|
||||
Height = 13
|
||||
Caption = 'Tempo (ms)'
|
||||
end
|
||||
object EditAct: TEdit
|
||||
Left = 112
|
||||
Top = 20
|
||||
Width = 49
|
||||
Height = 21
|
||||
TabOrder = 0
|
||||
Text = 'EditAct'
|
||||
end
|
||||
object EditTrain: TEdit
|
||||
Left = 112
|
||||
Top = 44
|
||||
Width = 121
|
||||
Height = 21
|
||||
TabOrder = 1
|
||||
Text = 'EditTrain'
|
||||
end
|
||||
object EditEtat: TEdit
|
||||
Left = 160
|
||||
Top = 68
|
||||
Width = 25
|
||||
Height = 21
|
||||
TabOrder = 2
|
||||
Text = 'EditEtat'
|
||||
end
|
||||
object EditFonction: TEdit
|
||||
Left = 112
|
||||
Top = 68
|
||||
Width = 25
|
||||
Height = 21
|
||||
TabOrder = 3
|
||||
Text = 'EditFonc'
|
||||
end
|
||||
object EditTempo: TEdit
|
||||
Left = 112
|
||||
Top = 92
|
||||
Width = 33
|
||||
Height = 21
|
||||
TabOrder = 4
|
||||
Text = 'EditTempo'
|
||||
end
|
||||
end
|
||||
object GroupBoxPN: TGroupBox
|
||||
Left = 16
|
||||
Top = 104
|
||||
Width = 225
|
||||
Height = 193
|
||||
Caption = 'Actionneurs gestion passage '#224' niveau'
|
||||
TabOrder = 2
|
||||
object Label21: TLabel
|
||||
Left = 8
|
||||
Top = 28
|
||||
Width = 100
|
||||
Height = 13
|
||||
Caption = 'Adresse de fermeture'
|
||||
end
|
||||
object Label22: TLabel
|
||||
Left = 8
|
||||
Top = 52
|
||||
Width = 94
|
||||
Height = 13
|
||||
Caption = 'Adresse d'#39'ouverture'
|
||||
end
|
||||
object Label23: TLabel
|
||||
Left = 8
|
||||
Top = 116
|
||||
Width = 30
|
||||
Height = 13
|
||||
Caption = 'Voie 1'
|
||||
end
|
||||
object LabelV2: TLabel
|
||||
Left = 8
|
||||
Top = 140
|
||||
Width = 30
|
||||
Height = 13
|
||||
Caption = 'Voie 2'
|
||||
end
|
||||
object LabelV3: TLabel
|
||||
Left = 8
|
||||
Top = 164
|
||||
Width = 30
|
||||
Height = 13
|
||||
Caption = 'Voie 3'
|
||||
end
|
||||
object Shape1: TShape
|
||||
Left = 64
|
||||
Top = 105
|
||||
Width = 137
|
||||
Height = 2
|
||||
end
|
||||
object EditAdrFerme: TEdit
|
||||
Left = 120
|
||||
Top = 24
|
||||
Width = 41
|
||||
Height = 21
|
||||
TabOrder = 0
|
||||
Text = 'EditAdrFerme'
|
||||
end
|
||||
object EditAdrOuvre: TEdit
|
||||
Left = 120
|
||||
Top = 48
|
||||
Width = 41
|
||||
Height = 21
|
||||
TabOrder = 1
|
||||
Text = 'EditAdrOuvre'
|
||||
end
|
||||
object EditCmdFerme: TEdit
|
||||
Left = 168
|
||||
Top = 24
|
||||
Width = 25
|
||||
Height = 21
|
||||
TabOrder = 2
|
||||
Text = 'EditCdeFerme'
|
||||
end
|
||||
object EditCdeOuvre: TEdit
|
||||
Left = 168
|
||||
Top = 48
|
||||
Width = 25
|
||||
Height = 21
|
||||
TabOrder = 3
|
||||
Text = 'EditCdeOuvre'
|
||||
end
|
||||
object EditV1F: TEdit
|
||||
Left = 64
|
||||
Top = 112
|
||||
Width = 41
|
||||
Height = 21
|
||||
TabOrder = 4
|
||||
Text = 'EditAdrFerme'
|
||||
end
|
||||
object StaticText1: TStaticText
|
||||
Left = 64
|
||||
Top = 88
|
||||
Width = 49
|
||||
Height = 17
|
||||
Caption = 'Act ferme'
|
||||
TabOrder = 5
|
||||
end
|
||||
object StaticText2: TStaticText
|
||||
Left = 152
|
||||
Top = 88
|
||||
Width = 50
|
||||
Height = 17
|
||||
Caption = 'Act ouvre'
|
||||
TabOrder = 6
|
||||
end
|
||||
object EditV2F: TEdit
|
||||
Left = 64
|
||||
Top = 136
|
||||
Width = 41
|
||||
Height = 21
|
||||
TabOrder = 7
|
||||
Text = 'EditAdrFerme'
|
||||
end
|
||||
object EditV3F: TEdit
|
||||
Left = 64
|
||||
Top = 160
|
||||
Width = 41
|
||||
Height = 21
|
||||
TabOrder = 8
|
||||
Text = 'EditAdrFerme'
|
||||
end
|
||||
object EditV1O: TEdit
|
||||
Left = 152
|
||||
Top = 112
|
||||
Width = 41
|
||||
Height = 21
|
||||
TabOrder = 9
|
||||
Text = 'EditAdrFerme'
|
||||
end
|
||||
object EditV2O: TEdit
|
||||
Left = 152
|
||||
Top = 136
|
||||
Width = 41
|
||||
Height = 21
|
||||
TabOrder = 10
|
||||
Text = 'EditAdrFerme'
|
||||
end
|
||||
object EditV3O: TEdit
|
||||
Left = 152
|
||||
Top = 160
|
||||
Width = 41
|
||||
Height = 21
|
||||
TabOrder = 11
|
||||
Text = 'EditAdrFerme'
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
+304
-46
@@ -38,7 +38,6 @@ type
|
||||
RadioButton11: TRadioButton;
|
||||
RadioButton12: TRadioButton;
|
||||
GroupBox7: TGroupBox;
|
||||
Label10: TLabel;
|
||||
RadioButton13: TRadioButton;
|
||||
RadioButton14: TRadioButton;
|
||||
RadioButton15: TRadioButton;
|
||||
@@ -108,12 +107,60 @@ type
|
||||
LabelHG: TLabel;
|
||||
EditP1: TEdit;
|
||||
EditP2: TEdit;
|
||||
ImageTri: TImage;
|
||||
Label18: TLabel;
|
||||
EditDevieS2: TEdit;
|
||||
GroupBox12: TGroupBox;
|
||||
ImageSignal: TImage;
|
||||
LabelAdrSig: TLabel;
|
||||
GroupBox13: TGroupBox;
|
||||
LabelDec: TLabel;
|
||||
LabelDetAss: TLabel;
|
||||
LabelElSuiv: TLabel;
|
||||
Label19: TLabel;
|
||||
LabelVerrou: TLabel;
|
||||
GroupBox14: TGroupBox;
|
||||
RadioButtonLoc: TRadioButton;
|
||||
RadioButtonPN: TRadioButton;
|
||||
Label20: TLabel;
|
||||
GroupBoxAct: TGroupBox;
|
||||
LabelActionneur: TLabel;
|
||||
EditAct: TEdit;
|
||||
EditTrain: TEdit;
|
||||
LabelTrain: TLabel;
|
||||
EditEtat: TEdit;
|
||||
Labela: TLabel;
|
||||
EditFonction: TEdit;
|
||||
LabelFonction: TLabel;
|
||||
EditTempo: TEdit;
|
||||
LabelTempo: TLabel;
|
||||
GroupBoxPN: TGroupBox;
|
||||
Label21: TLabel;
|
||||
EditAdrFerme: TEdit;
|
||||
Label22: TLabel;
|
||||
EditAdrOuvre: TEdit;
|
||||
EditCmdFerme: TEdit;
|
||||
EditCdeOuvre: TEdit;
|
||||
Label23: TLabel;
|
||||
LabelV2: TLabel;
|
||||
LabelV3: TLabel;
|
||||
EditV1F: TEdit;
|
||||
Shape1: TShape;
|
||||
StaticText1: TStaticText;
|
||||
StaticText2: TStaticText;
|
||||
EditV2F: TEdit;
|
||||
EditV3F: TEdit;
|
||||
EditV1O: TEdit;
|
||||
EditV2O: TEdit;
|
||||
EditV3O: TEdit;
|
||||
procedure ButtonAppliquerEtFermerClick(Sender: TObject);
|
||||
procedure Button2Click(Sender: TObject);
|
||||
procedure FormActivate(Sender: TObject);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure MemoAigDblClick(Sender: TObject);
|
||||
procedure MemoAigClick(Sender: TObject);
|
||||
procedure MemoSignauxClick(Sender: TObject);
|
||||
procedure MemoActClick(Sender: TObject);
|
||||
private
|
||||
{ Déclarations privées }
|
||||
public
|
||||
@@ -121,8 +168,9 @@ type
|
||||
|
||||
end;
|
||||
|
||||
const TitreAig='Description de l''aiguillage ';
|
||||
|
||||
const
|
||||
TitreAig='Description de l''aiguillage ';
|
||||
|
||||
var
|
||||
FormConfig: TFormConfig;
|
||||
AdresseIPCDM,AdresseIP,PortCom,recuCDM : string;
|
||||
@@ -144,22 +192,21 @@ uses UnitDebug,UnitPrinc;
|
||||
function envoi_CDM(s : string) : boolean;
|
||||
var temps : integer;
|
||||
begin
|
||||
if parsocketCDM=false then begin envoi_CDM:=false;exit;end;
|
||||
if SocketCDM_connecte=false then begin envoi_CDM:=false;exit;end;
|
||||
//Affiche('Envoi à CDM rail',clRed);Affiche(s,ClGreen);
|
||||
if trace then affiche(s,clLime);
|
||||
Formprinc.ClientSocketCDM.Socket.SendText(s);
|
||||
// attend l'ack
|
||||
ackCDM:=false;nackCDM:=false;
|
||||
if ParSocketCDM then
|
||||
temps:=0;
|
||||
repeat
|
||||
inc(temps);Sleep(100);
|
||||
Application.processMessages;
|
||||
until ferme or ackCDM or nackCDM or (temps>30); // CDM répond < 1s
|
||||
//Affiche(IntToSTR(temps),clyellow);
|
||||
if not(ackCDM) or nack then
|
||||
begin
|
||||
temps:=0;
|
||||
repeat
|
||||
inc(temps);Sleep(100);
|
||||
Application.processMessages;
|
||||
until ferme or ackCDM or nackCDM or (temps>10); // CDM répond < 1s
|
||||
if not(ackCDM) or nack then
|
||||
begin
|
||||
Affiche('Pas de réponse de CDM Rail',clRed);
|
||||
end;
|
||||
Affiche('Pas de réponse de CDM Rail',clRed);
|
||||
end;
|
||||
envoi_CDM:=ackCDM;
|
||||
end;
|
||||
@@ -216,7 +263,6 @@ begin
|
||||
// déconnexion de l'ancienne liaison éventuelle
|
||||
Formprinc.ClientSocketCDM.Close;
|
||||
// Initialisation de la comm socket CDM
|
||||
ParSocketCDM:=false;
|
||||
//if CDM_connecte then begin Affiche('CDM déja connecté',Cyan);exit;end;
|
||||
if AdresseIPCDM<>'0' then
|
||||
begin
|
||||
@@ -232,8 +278,9 @@ begin
|
||||
Sleep(50);
|
||||
inc(i);
|
||||
Application.processMessages;
|
||||
until (i>10) or ParSocketCDM;
|
||||
if not(ParSocketCDM) then Affiche('Socket CDM non connecté',clOrange);
|
||||
until (i>10) or SocketCDM_connecte ;
|
||||
//if i>30 then affiche('Timeout',clred);
|
||||
if not(SocketCDM_connecte) then Affiche('Socket CDM non connecté',clOrange);
|
||||
|
||||
// connexion à CDM rail
|
||||
recuCDM:='';
|
||||
@@ -241,11 +288,11 @@ begin
|
||||
envoi_cdm(s);
|
||||
if pos('_ACK',recuCDM)<>0 then
|
||||
begin
|
||||
CDM_connecte:=True;
|
||||
Id_CDM:=copy(recuCDM,5,2); // récupère l'ID reçu de CDM, à utiliser dans toutes les futures trames
|
||||
s:='Connecté au serveur CDM rail avec l''ID='+Id_CDM;
|
||||
Affiche(s,clYellow);
|
||||
AfficheDebug(s,clyellow);
|
||||
CDM_connecte:=true;
|
||||
|
||||
// demande des services
|
||||
services_CDM;
|
||||
@@ -261,26 +308,19 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
|
||||
// teste si une adresse IP V4 est ok
|
||||
function Ipok(s : string) : boolean;
|
||||
var i,posp,n,octet,erreur : integer;
|
||||
var i,k,posp,n,octet,erreur : integer;
|
||||
begin
|
||||
n:=0;
|
||||
for i:=1 to length(s) do
|
||||
for k:=1 to 3 do
|
||||
begin
|
||||
posp:=pos('.',s);
|
||||
if posp<>0 then
|
||||
begin
|
||||
inc(n);
|
||||
val(s,octet,erreur);
|
||||
if octet>255 then begin IpOK:=false;exit;end;
|
||||
delete(s,1,posp);
|
||||
end;
|
||||
end;
|
||||
val(s,octet,erreur);
|
||||
if octet>255 then begin IpOK:=false;exit;end;
|
||||
IpOk:=n=3;
|
||||
i:=pos('.',s);
|
||||
if i=0 then begin IpOK:=false;exit;end;
|
||||
val(copy(s,1,i-1),octet,erreur);if (erreur<>0) or (octet>255) then begin IpOK:=false;exit;end;
|
||||
delete(s,1,i);
|
||||
end;
|
||||
val(s,octet,erreur);if (erreur<>0) or (octet>255) then begin IpOK:=false;exit;end;
|
||||
ipOK:=true;
|
||||
end;
|
||||
|
||||
// vérifie si ma config de la com série/usb est ok
|
||||
@@ -620,7 +660,7 @@ begin
|
||||
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;
|
||||
@@ -638,6 +678,11 @@ begin
|
||||
labelHG.Visible:=false;
|
||||
EditP1.Visible:=false;
|
||||
EditP2.Visible:=false;
|
||||
EditDevieS2.Visible:=false;
|
||||
Label18.Visible:=false;
|
||||
GroupBoxPN.Visible:=false;
|
||||
GroupBoxAct.Visible:=false;
|
||||
|
||||
|
||||
Edit_HG.ReadOnly:=true;
|
||||
EditP1.ReadOnly:=true;
|
||||
@@ -723,7 +768,7 @@ begin
|
||||
i:=pos(',',s);
|
||||
if i<>0 then delete(s,i,length(s)-i+1);
|
||||
val(s,adr,erreur);
|
||||
bis:=pos(s,'B')<>0;
|
||||
bis:=pos('B',s)<>0;
|
||||
B:=#0;
|
||||
i:=pos('S',s);if i<>0 then B:='S';
|
||||
i:=pos('P',s);if i<>0 then B:='P';
|
||||
@@ -732,29 +777,35 @@ end;
|
||||
|
||||
procedure Aff_champs_aig;
|
||||
var Adresse,Adr2,traite,erreur,ligne,i,j,Nboucle,selpos : integer;
|
||||
bis,tjd : boolean;
|
||||
bis,tjd,tri : boolean;
|
||||
s,ss : string;
|
||||
B : char;
|
||||
begin
|
||||
with formConfig.MemoAig do
|
||||
begin
|
||||
ligne:=Perform(EM_LINEFROMCHAR,-1,0); // numéro de la lignée cliquée
|
||||
s:=Uppercase(Lines[ligne]);
|
||||
s:=Uppercase(Lines[ligne]);
|
||||
if s='' then exit;
|
||||
SelStart:=Perform(EM_LINEINDEX,Ligne,0); // début de la sélection
|
||||
SelLength:=Length(s) ; // fin de la sélection
|
||||
SetFocus;
|
||||
end;
|
||||
|
||||
Val(s,Adresse,erreur);
|
||||
formconfig.LabelAdresse.Caption:=TitreAig+InttoSTr(Adresse);
|
||||
|
||||
Val(s,Adresse,erreur);
|
||||
if adresse=0 then exit;
|
||||
ss:=TitreAig+InttoSTr(Adresse);if s[erreur]='B' then ss:=ss+'bis';
|
||||
formconfig.LabelAdresse.Caption:= ss;
|
||||
|
||||
tjd:=pos('TJD',s)<>0 ;
|
||||
tri:=pos('TRI',s)<>0 ;
|
||||
with formconfig do
|
||||
begin
|
||||
LabelLigne.caption:=s;
|
||||
ImageAffiche.Picture.Bitmap.TransparentMode:=tmAuto;
|
||||
ImageAffiche.Picture.Bitmap.TransparentColor:=clblue;
|
||||
ImageAffiche.Transparent:=true;
|
||||
if pos('TJD',s)<>0 then
|
||||
// tjd
|
||||
if tjd then
|
||||
begin
|
||||
ImageAffiche.Picture.BitMap:=Imagetjd.Picture.Bitmap;
|
||||
Edit_HG.Visible:=true;
|
||||
@@ -762,6 +813,8 @@ begin
|
||||
labelHG.Visible:=true;
|
||||
EditP1.Visible:=true;
|
||||
EditP2.Visible:=true;
|
||||
EditDevieS2.Visible:=false;
|
||||
Label18.Visible:=false;
|
||||
EditPointe_BG.Text:=intToSTR(aiguillage[adresse].ADevie)+aiguillage[adresse].ADevieB;
|
||||
Edit_HG.Text:=intToSTR(aiguillage[adresse].ADroit)+aiguillage[adresse].ADroitB;
|
||||
|
||||
@@ -771,15 +824,30 @@ begin
|
||||
|
||||
EditP1.Text:=intToSTR(aiguillage[adresse].APointe);
|
||||
EditP2.Text:=intToSTR(aiguillage[adr2].APointe);
|
||||
|
||||
exit;
|
||||
end
|
||||
else
|
||||
else
|
||||
// aiguillage tri
|
||||
if tri then
|
||||
begin
|
||||
tri:=true;
|
||||
i:=pos(',',s);delete(s,1,i);
|
||||
ImageAffiche.Picture.BitMap:=ImageTri.Picture.Bitmap;
|
||||
EditDevieS2.Visible:=true;
|
||||
Label18.Visible:=true;
|
||||
Val(s,Adr2,erreur);
|
||||
formconfig.LabelAdresse.Caption:=formconfig.LabelAdresse.Caption+','+IntToSTR(Adr2);
|
||||
end
|
||||
else
|
||||
// aiguillage normal
|
||||
begin
|
||||
ImageAffiche.Picture.BitMap:=Imageaig.Picture.Bitmap;
|
||||
Edit_HG.Visible:=false;
|
||||
labelHG.Visible:=false;
|
||||
EditP1.Visible:=false;
|
||||
EditP2.Visible:=false;
|
||||
EditDevieS2.Visible:=false;
|
||||
Label18.Visible:=false;
|
||||
tjd:=false;
|
||||
end;
|
||||
end;
|
||||
@@ -787,7 +855,7 @@ begin
|
||||
|
||||
i:=pos(',',s);Delete(s,1,i);
|
||||
traite:=0;nBoucle:=0;
|
||||
if not(tjd) then
|
||||
if not(tjd) then
|
||||
repeat
|
||||
if s<>'' then
|
||||
if s[1]='P' then
|
||||
@@ -824,6 +892,17 @@ begin
|
||||
end;
|
||||
inc(nBoucle);
|
||||
until (traite=3) or (nboucle=3);
|
||||
|
||||
// reste S2 pour le tri à traiter
|
||||
if tri then
|
||||
begin
|
||||
i:=pos('S2-',s);
|
||||
if i<>0 then
|
||||
begin
|
||||
delete(s,i,3);
|
||||
formconfig.EditDevieS2.text:=s;
|
||||
end;
|
||||
end;
|
||||
|
||||
if s='' then
|
||||
with formconfig do
|
||||
@@ -847,6 +926,173 @@ begin
|
||||
RadioButton60kmh.Checked:=true;
|
||||
end;
|
||||
end;
|
||||
|
||||
Procedure aff_champs_sig;
|
||||
var i,d, ligne, adresse,erreur : integer;
|
||||
s,ss : string;
|
||||
begin
|
||||
with formConfig.MemoSignaux do
|
||||
begin
|
||||
ligne:=Perform(EM_LINEFROMCHAR,-1,0); // numéro de la lignée cliquée
|
||||
s:=Uppercase(Lines[ligne]);
|
||||
if s='' then exit;
|
||||
SelStart:=Perform(EM_LINEINDEX,Ligne,0); // début de la sélection
|
||||
SelLength:=Length(s) ; // fin de la sélection
|
||||
SetFocus;
|
||||
end;
|
||||
|
||||
Val(s,Adresse,erreur);
|
||||
if adresse=0 then exit;
|
||||
ss:='Signal '+InttoSTr(Adresse);
|
||||
formconfig.LabelAdrSig.Caption:= ss;
|
||||
i:=Index_feu(adresse);
|
||||
with formconfig.ImageSignal do
|
||||
begin
|
||||
Picture.Bitmap.TransparentMode:=tmAuto;
|
||||
Picture.Bitmap.TransparentColor:=clblue;
|
||||
Transparent:=true;
|
||||
Picture.BitMap:=feux[i].Img.Picture.Bitmap;
|
||||
end;
|
||||
with formconfig do
|
||||
begin
|
||||
d:=feux[i].decodeur;
|
||||
LabelDec.caption:='Décodeur associé : '+decodeur[d];
|
||||
d:=feux[i].aspect;
|
||||
// signal directionnel
|
||||
if d<10 then
|
||||
begin
|
||||
LabelDetAss.caption:='Détecteur associé : '+IntToSTR(feux[i].Adr_det1);
|
||||
LabelElSuiv.caption:='Element suivant : '+IntToSTR(feux[i].Adr_el_suiv1);
|
||||
s:='Verrouillable au carré : '; if feux[i].VerrouCarre then s:=s+'oui' else s:=s+'non';
|
||||
LabelVerrou.caption:=s;
|
||||
end
|
||||
else
|
||||
begin
|
||||
LabelDetAss.caption:='';
|
||||
LabelElSuiv.caption:='';
|
||||
LabelVerrou.caption:='';
|
||||
end;
|
||||
end;
|
||||
|
||||
end;
|
||||
|
||||
Procedure aff_champs_act;
|
||||
var i,v, ligne,etatact,erreur, adresse,fonction,tempo : integer;
|
||||
s,s2,ss : string;
|
||||
trouve : bool;
|
||||
begin
|
||||
with formConfig.MemoAct do
|
||||
begin
|
||||
ligne:=Perform(EM_LINEFROMCHAR,-1,0); // numéro de la lignée cliquée
|
||||
s:=Uppercase(Lines[ligne]);
|
||||
if s='' then exit;
|
||||
SelStart:=Perform(EM_LINEINDEX,Ligne,0); // début de la sélection
|
||||
SelLength:=Length(s) ; // fin de la sélection
|
||||
SetFocus;
|
||||
end;
|
||||
|
||||
// actionneur passage à niveau
|
||||
if s[1]='(' then
|
||||
begin
|
||||
with formconfig do
|
||||
begin
|
||||
GroupBoxact.Visible:=false;
|
||||
GroupBoxPN.Top:=104;
|
||||
GroupBoxPN.Visible:=true;
|
||||
Visible:=true;
|
||||
RadioButtonPN.Checked:=true;
|
||||
RadioButtonLoc.Checked:=false;
|
||||
end;
|
||||
// trouver l'index dans le tableau
|
||||
i:=pos('PN(',s);
|
||||
delete(s,1,i+2);
|
||||
val(s,adresse,erreur);
|
||||
i:=0;
|
||||
repeat
|
||||
inc(i);
|
||||
trouve:=(Tablo_PN[i].AdresseFerme=adresse);
|
||||
until trouve or (i>NbrePN);
|
||||
if not(trouve) then exit;
|
||||
|
||||
with formConfig do
|
||||
begin
|
||||
EditAdrFerme.text:=IntToSTR(Tablo_PN[i].AdresseFerme);
|
||||
EditAdrOuvre.text:=IntToSTR(Tablo_PN[i].AdresseOuvre);
|
||||
if Tablo_PN[i].CommandeFerme=2 then s:='+' else s:='-';
|
||||
EditCmdFerme.text:=s;
|
||||
if Tablo_PN[i].CommandeOuvre=2 then s:='+' else s:='-';
|
||||
EditCdeOuvre.text:=s;
|
||||
EditV1F.text:=intToSTR(Tablo_PN[i].voie[1].ActFerme);
|
||||
EditV1O.text:=intToSTR(Tablo_PN[i].voie[1].ActOuvre);
|
||||
v:=Tablo_PN[i].nbvoies;
|
||||
if v>=2 then
|
||||
begin
|
||||
EditV2F.text:=intToSTR(Tablo_PN[i].voie[2].ActFerme);
|
||||
EditV2O.text:=intToSTR(Tablo_PN[i].voie[2].ActOuvre);
|
||||
EditV2F.Visible:=true;
|
||||
EditV2O.Visible:=true;
|
||||
labelV2.Visible:=true;
|
||||
end;
|
||||
if v>=3 then
|
||||
begin
|
||||
EditV3F.text:=intToSTR(Tablo_PN[i].voie[3].ActFerme);
|
||||
EditV3O.text:=intToSTR(Tablo_PN[i].voie[3].ActOuvre);
|
||||
EditV3F.Visible:=true;
|
||||
EditV3O.Visible:=true;
|
||||
labelV3.visible:=true;
|
||||
end;
|
||||
if v<3 then
|
||||
begin
|
||||
EditV3F.Visible:=false;
|
||||
EditV3O.Visible:=false;
|
||||
labelV3.visible:=false;
|
||||
end;
|
||||
if v<2 then
|
||||
begin
|
||||
EditV2F.Visible:=false;
|
||||
EditV2O.Visible:=false;
|
||||
labelV2.visible:=false;
|
||||
end;
|
||||
end;
|
||||
end
|
||||
else
|
||||
// actionneur fonction F locomotive
|
||||
begin
|
||||
with formconfig do
|
||||
begin
|
||||
GroupBoxAct.Top:=104;
|
||||
GroupBoxact.Visible:=true;
|
||||
GroupBoxPN.Visible:=false;
|
||||
formconfig.RadioButtonPN.Checked:=false;
|
||||
formconfig.RadioButtonLoc.Checked:=true;
|
||||
end;
|
||||
// trouver l'index dans le tableau
|
||||
val(s,adresse,erreur);
|
||||
i:=0;
|
||||
repeat
|
||||
inc(i);
|
||||
trouve:=(Tablo_actionneur[i].actionneur=adresse);
|
||||
until trouve or (i>MaxTablo_act);
|
||||
if not(trouve) then exit;
|
||||
|
||||
s:=Tablo_actionneur[i].train;
|
||||
etatAct:=Tablo_actionneur[i].etat ;
|
||||
Adresse:=Tablo_actionneur[i].actionneur;
|
||||
fonction:=Tablo_actionneur[i].fonction;
|
||||
s2:=Tablo_actionneur[i].train;
|
||||
tempo:=tablo_actionneur[i].Tempo;
|
||||
with formconfig do
|
||||
begin
|
||||
EditAct.text:=IntToSTR(Adresse);
|
||||
EditTrain.Text:=s;
|
||||
editFonction.Text:=intToSTR(fonction);
|
||||
editEtat.Text:=intToSTR(etatAct);
|
||||
editTempo.Text:=intToSTR(tempo);
|
||||
end;
|
||||
end;
|
||||
|
||||
ss:='Actionneur '+InttoSTr(Adresse);
|
||||
end;
|
||||
|
||||
procedure TFormConfig.MemoAigDblClick(Sender: TObject);
|
||||
begin
|
||||
@@ -858,4 +1104,16 @@ begin
|
||||
Aff_champs_aig
|
||||
end;
|
||||
|
||||
procedure TFormConfig.MemoSignauxClick(Sender: TObject);
|
||||
begin
|
||||
Aff_champs_sig;
|
||||
end;
|
||||
|
||||
procedure TFormConfig.MemoActClick(Sender: TObject);
|
||||
begin
|
||||
Aff_champs_act;
|
||||
end;
|
||||
|
||||
|
||||
|
||||
end.
|
||||
|
||||
Binary file not shown.
+31
-3
@@ -44,8 +44,8 @@ object FormConfigTCO: TFormConfigTCO
|
||||
Caption = 'Nombre de cellules en vertical:'
|
||||
end
|
||||
object LabelErreur: TLabel
|
||||
Left = 35
|
||||
Top = 144
|
||||
Left = 302
|
||||
Top = 248
|
||||
Width = 3
|
||||
Height = 13
|
||||
end
|
||||
@@ -111,7 +111,7 @@ object FormConfigTCO: TFormConfigTCO
|
||||
Left = 256
|
||||
Top = 8
|
||||
Width = 353
|
||||
Height = 217
|
||||
Height = 233
|
||||
Caption = 'Couleurs '
|
||||
TabOrder = 7
|
||||
object Label5: TLabel
|
||||
@@ -184,6 +184,34 @@ object FormConfigTCO: TFormConfigTCO
|
||||
Height = 41
|
||||
OnClick = ImagecantonClick
|
||||
end
|
||||
object Label10: TLabel
|
||||
Left = 48
|
||||
Top = 208
|
||||
Width = 258
|
||||
Height = 13
|
||||
Caption = 'Cliquez sur l'#39'ic'#244'ne pour changer la couleur de l'#39#233'l'#233'ment'
|
||||
end
|
||||
object ImageTexte: TImage
|
||||
Left = 296
|
||||
Top = 16
|
||||
Width = 41
|
||||
Height = 41
|
||||
OnClick = ImageTexteClick
|
||||
end
|
||||
object Label11: TLabel
|
||||
Left = 197
|
||||
Top = 24
|
||||
Width = 87
|
||||
Height = 13
|
||||
Caption = 'Couleur des textes'
|
||||
end
|
||||
object Label12: TLabel
|
||||
Left = 240
|
||||
Top = 40
|
||||
Width = 42
|
||||
Height = 13
|
||||
Caption = 'statiques'
|
||||
end
|
||||
end
|
||||
object Memo1: TMemo
|
||||
Left = 8
|
||||
|
||||
+30
-1
@@ -33,6 +33,10 @@ type
|
||||
Memo1: TMemo;
|
||||
Label9: TLabel;
|
||||
Imagecanton: TImage;
|
||||
Label10: TLabel;
|
||||
ImageTexte: TImage;
|
||||
Label11: TLabel;
|
||||
Label12: TLabel;
|
||||
procedure ButtonOKClick(Sender: TObject);
|
||||
procedure ButtonDessineClick(Sender: TObject);
|
||||
procedure FormActivate(Sender: TObject);
|
||||
@@ -42,6 +46,7 @@ type
|
||||
procedure ImageDetActClick(Sender: TObject);
|
||||
procedure ImagecantonClick(Sender: TObject);
|
||||
procedure ColorDialog1Show(Sender: TObject);
|
||||
procedure ImageTexteClick(Sender: TObject);
|
||||
private
|
||||
{ Déclarations privées }
|
||||
public
|
||||
@@ -112,7 +117,6 @@ begin
|
||||
canvas.Pen.color:=fond;
|
||||
canvas.Brush.Color:=fond;
|
||||
canvas.Rectangle(0,0,Width,Height);
|
||||
|
||||
|
||||
canvas.Brush.Color:=clAllume;
|
||||
canvas.pen.color:=clAllume;
|
||||
@@ -142,6 +146,19 @@ begin
|
||||
canvas.FillRect(r);
|
||||
end;
|
||||
|
||||
//6 texte
|
||||
with formCOnfigTCO.ImageTexte do
|
||||
begin
|
||||
canvas.Pen.color:=fond;
|
||||
canvas.Brush.Color:=fond;
|
||||
canvas.Rectangle(0,0,Width,Height);
|
||||
canvas.Font.color:=clTexte;
|
||||
canvas.Pen.mode:=pmCopy;
|
||||
canvas.Textout(5,10,'Voie 1');
|
||||
|
||||
end;
|
||||
|
||||
|
||||
end;
|
||||
|
||||
function verif_config_TCO : boolean; // renvoie true si ok
|
||||
@@ -279,10 +296,22 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TFormConfigTCO.ImageTexteClick(Sender: TObject);
|
||||
begin
|
||||
titre_couleur:='Changer la couleur du texte';
|
||||
if ColorDialog1.execute then
|
||||
begin
|
||||
ClTexte:=ColorDialog1.Color;
|
||||
dessine_icones;
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
// change le titre de la fenêtre de choix des couleurs à son ouverture
|
||||
procedure TFormConfigTCO.ColorDialog1Show(Sender: TObject);
|
||||
begin
|
||||
SetWindowText(ColorDialog1.Handle,pchar(titre_couleur));
|
||||
end;
|
||||
|
||||
|
||||
end.
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
+24
-34
@@ -1334,10 +1334,10 @@ object FormPrinc: TFormPrinc
|
||||
00020000802500000000080000000000000000003F00000011000000}
|
||||
end
|
||||
object Panel1: TPanel
|
||||
Left = 912
|
||||
Top = 0
|
||||
Width = 273
|
||||
Height = 169
|
||||
Left = 904
|
||||
Top = 5
|
||||
Width = 281
|
||||
Height = 129
|
||||
Anchors = [akTop, akRight]
|
||||
TabOrder = 5
|
||||
object BoutonRaf: TButton
|
||||
@@ -1349,31 +1349,22 @@ object FormPrinc: TFormPrinc
|
||||
TabOrder = 0
|
||||
OnClick = BoutonRafClick
|
||||
end
|
||||
object ButtonAffDebug: TButton
|
||||
Left = 8
|
||||
Top = 48
|
||||
Width = 89
|
||||
Height = 33
|
||||
Caption = 'Affiche debug'
|
||||
TabOrder = 1
|
||||
OnClick = ButtonAffDebugClick
|
||||
end
|
||||
object BoutVersion: TButton
|
||||
Left = 102
|
||||
Top = 8
|
||||
Width = 83
|
||||
Height = 33
|
||||
Caption = 'Dem version'
|
||||
TabOrder = 2
|
||||
TabOrder = 1
|
||||
OnClick = BoutVersionClick
|
||||
end
|
||||
object loco: TButton
|
||||
Left = 190
|
||||
Top = 8
|
||||
Width = 75
|
||||
Top = 88
|
||||
Width = 83
|
||||
Height = 33
|
||||
Caption = 'loco'
|
||||
TabOrder = 3
|
||||
TabOrder = 2
|
||||
OnClick = locoClick
|
||||
end
|
||||
object ButtonInfo: TButton
|
||||
@@ -1382,28 +1373,28 @@ object FormPrinc: TFormPrinc
|
||||
Width = 81
|
||||
Height = 33
|
||||
Caption = 'Informations'
|
||||
TabOrder = 4
|
||||
TabOrder = 3
|
||||
OnClick = ButtonInfoClick
|
||||
end
|
||||
object ButtonReprise: TButton
|
||||
Left = 190
|
||||
Top = 48
|
||||
Width = 75
|
||||
Width = 83
|
||||
Height = 33
|
||||
Hint =
|
||||
'Relance du bus DCC apr'#232's une '#233'criture d'#39'un CV ou une mise hors t' +
|
||||
'ension de la centrale'
|
||||
Caption = 'Reprise DCC'
|
||||
TabOrder = 5
|
||||
TabOrder = 4
|
||||
OnClick = ButtonRepriseClick
|
||||
end
|
||||
object ButtonTest: TButton
|
||||
Left = 8
|
||||
Top = 88
|
||||
Top = 48
|
||||
Width = 89
|
||||
Height = 33
|
||||
Caption = 'Demande '#233'tat r'#233'trosignalisation'
|
||||
TabOrder = 6
|
||||
TabOrder = 5
|
||||
WordWrap = True
|
||||
OnClick = ButtonTestClick
|
||||
end
|
||||
@@ -1413,26 +1404,26 @@ object FormPrinc: TFormPrinc
|
||||
Width = 81
|
||||
Height = 33
|
||||
Caption = 'Arret simulation'
|
||||
TabOrder = 7
|
||||
TabOrder = 6
|
||||
Visible = False
|
||||
OnClick = ButtonArretSimuClick
|
||||
end
|
||||
object ButtonAffTCO: TButton
|
||||
Left = 192
|
||||
Left = 8
|
||||
Top = 88
|
||||
Width = 73
|
||||
Width = 89
|
||||
Height = 33
|
||||
Caption = 'Affiche TCO'
|
||||
TabOrder = 8
|
||||
TabOrder = 7
|
||||
OnClick = ButtonAffTCOClick
|
||||
end
|
||||
object ButtonLanceCDM: TButton
|
||||
Left = 8
|
||||
Top = 128
|
||||
Width = 89
|
||||
Left = 192
|
||||
Top = 8
|
||||
Width = 81
|
||||
Height = 33
|
||||
Caption = 'Lance CDM rail'
|
||||
TabOrder = 9
|
||||
TabOrder = 8
|
||||
OnClick = ButtonLanceCDMClick
|
||||
end
|
||||
end
|
||||
@@ -1577,10 +1568,9 @@ object FormPrinc: TFormPrinc
|
||||
Caption = 'Ouvrir un fichier trames CDM'
|
||||
OnClick = OuvrirunfichiertramesCDM1Click
|
||||
end
|
||||
object Versions1: TMenuItem
|
||||
Caption = 'Versions'
|
||||
Hint = 'Versions'
|
||||
OnClick = Versions1Click
|
||||
object Affichefentredebug1: TMenuItem
|
||||
Caption = 'Affiche fen'#234'tre debug'
|
||||
OnClick = Affichefentredebug1Click
|
||||
end
|
||||
object N1: TMenuItem
|
||||
Caption = '-'
|
||||
|
||||
+204
-176
@@ -61,7 +61,6 @@ type
|
||||
Image6Dir: TImage;
|
||||
Codificationdesfeux1: TMenuItem;
|
||||
Divers1: TMenuItem;
|
||||
Versions1: TMenuItem;
|
||||
ChronoDetect: TMenuItem;
|
||||
ClientSocketCDM: TClientSocket;
|
||||
FichierSimu: TMenuItem;
|
||||
@@ -78,7 +77,6 @@ type
|
||||
OuvrirunfichiertramesCDM1: TMenuItem;
|
||||
Panel1: TPanel;
|
||||
BoutonRaf: TButton;
|
||||
ButtonAffDebug: TButton;
|
||||
BoutVersion: TButton;
|
||||
loco: TButton;
|
||||
ButtonInfo: TButton;
|
||||
@@ -92,6 +90,7 @@ type
|
||||
LabelEtat: TLabel;
|
||||
ButtonAffTCO: TButton;
|
||||
ButtonLanceCDM: TButton;
|
||||
Affichefentredebug1: TMenuItem;
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure MSCommUSBLenzComm(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
@@ -124,13 +123,11 @@ type
|
||||
Socket: TCustomWinSocket);
|
||||
procedure ClientSocketCDMRead(Sender: TObject;
|
||||
Socket: TCustomWinSocket);
|
||||
procedure ButtonAffDebugClick(Sender: TObject);
|
||||
procedure ConnecterCDMrailClick(Sender: TObject);
|
||||
procedure DeconnecterCDMRailClick(Sender: TObject);
|
||||
procedure ClientSocketCDMDisconnect(Sender: TObject;
|
||||
Socket: TCustomWinSocket);
|
||||
procedure Codificationdesfeux1Click(Sender: TObject);
|
||||
procedure Versions1Click(Sender: TObject);
|
||||
procedure ClientSocketLenzDisconnect(Sender: TObject;
|
||||
Socket: TCustomWinSocket);
|
||||
procedure ChronoDetectClick(Sender: TObject);
|
||||
@@ -146,6 +143,7 @@ type
|
||||
procedure OuvrirunfichiertramesCDM1Click(Sender: TObject);
|
||||
procedure ButtonAffTCOClick(Sender: TObject);
|
||||
procedure ButtonLanceCDMClick(Sender: TObject);
|
||||
procedure Affichefentredebug1Click(Sender: TObject);
|
||||
private
|
||||
{ Déclarations privées }
|
||||
procedure DoHint(Sender : Tobject);
|
||||
@@ -176,7 +174,8 @@ 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');
|
||||
|
||||
decodeur : array[0..6] of string[20] =('rien','digital Bahn','CDF','LDT','LEB','NMRA','Unisemaf');
|
||||
|
||||
type TBranche = record
|
||||
BType : integer ; // 1= détecteur 2= aiguillage 3=bis 4=Buttoir
|
||||
Adresse : integer ; // adresse du détecteur ou de l'aiguillage
|
||||
@@ -228,11 +227,10 @@ var ancien_tablo_signalCplx,EtatsignalCplx : array[0..MaxAcc] of word;
|
||||
TraceListe,clignotant,nack,Maj_feux_cours,configNulle,LanceCDM : boolean;
|
||||
|
||||
CDMhd : THandle;
|
||||
|
||||
branche : array [1..100] of string;
|
||||
|
||||
FormPrinc: TFormPrinc;
|
||||
ack,portCommOuvert,trace,AffMem,AfficheDet,CDM_connecte,parSocketCDM,
|
||||
ack,portCommOuvert,trace,AffMem,AfficheDet,CDM_connecte,SocketCDM_connecte,
|
||||
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
|
||||
@@ -257,7 +255,7 @@ var ancien_tablo_signalCplx,EtatsignalCplx : array[0..MaxAcc] of word;
|
||||
actionneur,etat,fonction,tempo : integer;
|
||||
train : string;
|
||||
end;
|
||||
|
||||
KeyInputs: array of TInput;
|
||||
Tablo_PN : array[1..20] of
|
||||
record
|
||||
AdresseFerme : integer; // adresse de pilotage DCC pour la fermeture
|
||||
@@ -311,8 +309,6 @@ var ancien_tablo_signalCplx,EtatsignalCplx : array[0..MaxAcc] of word;
|
||||
VerrouCarre : boolean ; // si vrai, le feu se verrouille au carré si pas de train avant le signal
|
||||
EtatSignal : word ; // comme EtatSignalCplx
|
||||
UniSemaf : integer ; // définition supplémentaire de la cible pour les décodeurs UNISEMAF
|
||||
// pour TCO
|
||||
indexTCO : integer ; // index du feu dans le tableau FeuTCO
|
||||
AigDirection : array[1..6] of array of record // pour les signaux directionnels : contient la liste des aiguillages associés
|
||||
Adresse : integer; // 6 feux max associés à un tableau dynamique décrivant les aiguillages
|
||||
posAig : char;
|
||||
@@ -345,6 +341,7 @@ procedure connecte_USB;
|
||||
procedure deconnecte_usb;
|
||||
function IsWow64Process: Boolean;
|
||||
procedure Dessine_feu_mx(CanvasDest : Tcanvas;x,y : integer;FrX,frY : real;adresse : integer;orientation : integer);
|
||||
procedure pilote_acc(adresse : integer;octet : byte;Acc : TAccessoire);
|
||||
|
||||
implementation
|
||||
|
||||
@@ -425,6 +422,8 @@ begin
|
||||
end;
|
||||
|
||||
// dessine les feux sur une cible à 2 feux
|
||||
// x,y : offset en pixels du coin supérieur gauche du feu
|
||||
// frX, frY : facteurs de réduction
|
||||
procedure dessine_feu2(Acanvas : Tcanvas;x,y : integer;frX,frY : real;EtatSignal : word;orientation : integer);
|
||||
var Temp,rayon,xViolet,YViolet,xBlanc,yBlanc,
|
||||
LgImage,HtImage : integer;
|
||||
@@ -1415,7 +1414,6 @@ procedure envoie_fonction_CDM(fonction,etat : integer;train : string);
|
||||
var s : string;
|
||||
begin
|
||||
s:=chaine_CDM_Func(fonction,etat,train);
|
||||
if trace then affiche(s,clLime);
|
||||
envoi_cdm(s);
|
||||
end;
|
||||
|
||||
@@ -3207,7 +3205,7 @@ end; // de la proc
|
||||
|
||||
// pilotage d'un signal
|
||||
procedure envoi_signal(Adr : integer);
|
||||
var i,adresse,a,aspect,x,y,TailleX,TailleY,Orientation : integer;
|
||||
var i,adresse,a,aspect,x,y,x0,y0,TailleX,TailleY,Orientation : integer;
|
||||
ImageFeu : TImage;
|
||||
frX,frY : real;
|
||||
begin
|
||||
@@ -3231,13 +3229,14 @@ begin
|
||||
// allume les signaux du feu dans le TCO
|
||||
if AvecTCO then
|
||||
begin
|
||||
for i:=1 to NbFeuTCO do
|
||||
begin
|
||||
adresse:=FeuTCO[i].adresse; // vérifie si le feu existe dans le TCO
|
||||
if adresse<>0 then
|
||||
begin
|
||||
a:=EtatsignalCplx[adresse]; // a = état binaire du feu
|
||||
aspect:=feuTCO[i].aspect;
|
||||
for y:=1 to NbreCellY do
|
||||
for x:=1 to NbreCellX do
|
||||
begin
|
||||
if TCO[x,y].Bimage=30 then
|
||||
begin
|
||||
adresse:=TCO[x,y].adresse; // vérifie si le feu existe dans le TCO
|
||||
a:=EtatsignalCplx[adresse]; // a = état binaire du feu
|
||||
aspect:=TCO[x,y].aspect;
|
||||
case aspect of
|
||||
2 : ImageFeu:=Formprinc.Image2feux;
|
||||
3 : ImageFeu:=Formprinc.Image3feux;
|
||||
@@ -3247,25 +3246,26 @@ 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;
|
||||
x0:=(tco[x,y].x-1)*LargeurCell; // coordonnées XY du feu
|
||||
y0:=(tco[x,y].y-1)*HauteurCell;
|
||||
TailleY:=ImageFeu.picture.BitMap.Height; // taille du feu d'origine (verticale)
|
||||
TailleX:=ImageFeu.picture.BitMap.Width;
|
||||
Orientation:=FeuTCO[i].FeuOriente;
|
||||
Orientation:=TCO[x,y].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=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;
|
||||
if aspect=2 then begin x:=x+round(10*frX);y:=y+HauteurCell-round(tailleX*frY); end;
|
||||
if aspect=9 then x0:=x0+round(10*frX);
|
||||
if aspect=7 then x0:=x0+round(10*frX);
|
||||
if aspect=5 then begin x0:=x0+round(10*frX);y0:=y0+HauteurCell-round(tailleX*frY); end;
|
||||
if aspect=4 then begin x0:=x0+round(10*frX);y0:=y0+HauteurCell-round(tailleX*frY); end;
|
||||
if aspect=3 then begin x0:=x0+round(10*frX);y0:=y0+HauteurCell-round(tailleX*frY); end;
|
||||
if aspect=2 then begin x0:=x0+round(10*frX);y0:=y0+HauteurCell-round(tailleX*frY); end;
|
||||
end;
|
||||
Dessine_feu_mx(PCanvasTCO,x,y,frx,fry,adresse,orientation);
|
||||
// Dessine_feu_mx(PCanvasTCO,x0,y0,frx,fry,adresse,orientation);
|
||||
Dessine_feu_mx(PCanvasTCO,tco[x,y].x,tco[x,y].y,frx,fry,adresse,orientation);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
@@ -4156,6 +4156,7 @@ begin
|
||||
if s[1]='+' then Tablo_PN[NbrePN].CommandeOuvre:=2;
|
||||
if s[1]='-' then Tablo_PN[NbrePN].CommandeOuvre:=1;
|
||||
Delete(s,1,1); // supprime )
|
||||
inc(maxTablo_act);
|
||||
i:=0;
|
||||
end;
|
||||
if pos('PN',s)<>0 then i:=0;
|
||||
@@ -6756,6 +6757,22 @@ begin
|
||||
CloseHandle(hSnapShot);
|
||||
end;
|
||||
|
||||
|
||||
// préparation du tampon pour SendInput
|
||||
procedure KeybdInput(VKey: Byte; Flags: DWORD);
|
||||
begin
|
||||
SetLength(KeyInputs, Length(KeyInputs)+1);
|
||||
KeyInputs[high(KeyInputs)].Itype := INPUT_KEYBOARD;
|
||||
with KeyInputs[high(KeyInputs)].ki do
|
||||
begin
|
||||
wVk:=VKey;
|
||||
wScan:=MapVirtualKey(wVk, 0);
|
||||
dwFlags:=Flags;
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
|
||||
procedure SendKey(Wnd,VK : Cardinal; Ctrl,Alt,Shift : Boolean);
|
||||
var
|
||||
MC,MA,MS : Boolean;
|
||||
@@ -6771,7 +6788,7 @@ begin
|
||||
if Shift<>MS then keybd_event(VK_SHIFT,0,Byte(MS)*KEYEVENTF_KEYUP,0);
|
||||
|
||||
// Appui sur les touches
|
||||
keybd_event(VK,0,0,0);
|
||||
keybd_event(VK,0,0,0);
|
||||
keybd_event(VK,0,KEYEVENTF_KEYUP,0);
|
||||
|
||||
// keybd_event(MapVirtualKeyA(VK,0),0,0,0);
|
||||
@@ -6814,7 +6831,7 @@ begin
|
||||
'.' : s:=s+#$6e;
|
||||
'/' : s:=s+#$6f;
|
||||
'_' : s:=s+'{8}';
|
||||
// '\' : s:=s+#$e2;
|
||||
// '\' : s:=s+#$e2;
|
||||
'a'..'z' : s:=s+Upcase(lay[i]);
|
||||
' ','A'..'Z',#8..#$D : s:=s+lay[i];
|
||||
else Affiche('Erreur de conversion VK : '+lay,clred);
|
||||
@@ -6823,111 +6840,138 @@ begin
|
||||
convert_VK:=s;
|
||||
end;
|
||||
|
||||
// en sortie si Lance_CDM=true, il a été lancé, sinon il était déja lancé.
|
||||
// Lance et connecte CDM rail. en sortie si CDM est lancé Lance_CDM=true,
|
||||
function Lance_CDM : boolean;
|
||||
var i : integer;
|
||||
s : string;
|
||||
cdm_lanceLoc : boolean;
|
||||
begin
|
||||
s:='CDR';
|
||||
if (ProcessRunning(s)) then begin Lance_CDM:=false;exit;end;
|
||||
if (ProcessRunning(s)) then
|
||||
begin
|
||||
// CDM déja lancé;
|
||||
Lance_CDM:=true;
|
||||
if CDM_connecte then exit;
|
||||
deconnecte_USB;
|
||||
connecte_CDM;
|
||||
exit;
|
||||
end;
|
||||
|
||||
Affiche('Lancement de CDM '+lay,clyellow);
|
||||
cdm_lanceLoc:=false;
|
||||
// lancement depuis le répertoire 32 bits d'un OS64
|
||||
if ShellExecute(Formprinc.Handle,
|
||||
'open',PChar('C:\Program Files (x86)\CDM-Rail\cdr.exe'),
|
||||
Pchar('-f '+lay), // paramètre
|
||||
Pchar('-f '+lay), // paramètre
|
||||
PChar('C:\Program Files (x86)\CDM-Rail\') // répertoire
|
||||
,SW_SHOWNORMAL)<=32 then
|
||||
begin
|
||||
// si çà marche pas essayer depuis l'autre répertoire
|
||||
,SW_SHOWNORMAL)>32 then
|
||||
cdm_lanceLoc:=true;
|
||||
|
||||
if not(cdm_lanceLoc) then
|
||||
begin
|
||||
// si çà marche pas essayer depuis le répertoire de base sur un OS32
|
||||
if ShellExecute(Formprinc.Handle,
|
||||
'open',PChar('C:\Program Files\CDM-Rail\cdr.exe'),
|
||||
Pchar('-f '+lay), // paramètre
|
||||
Pchar('-f '+lay), // paramètre
|
||||
PChar('C:\Program Files\CDM-Rail\') // répertoire
|
||||
,SW_SHOWNORMAL)<=32 then
|
||||
begin
|
||||
ShowMessage('répertoire CDM rail introuvable');
|
||||
Lance_CDM:=false;exit;
|
||||
end
|
||||
end
|
||||
|
||||
else
|
||||
,SW_SHOWNORMAL)<=32 then
|
||||
begin
|
||||
ShowMessage('répertoire CDM rail introuvable');
|
||||
lance_CDM:=false;exit;
|
||||
end;
|
||||
cdm_lanceLoc:=false;
|
||||
end;
|
||||
|
||||
if cdm_lanceLoc then
|
||||
begin
|
||||
Sleep(2000);
|
||||
Application.ProcessMessages;
|
||||
// démarre le serveur IP : Alt C , return 2 fois
|
||||
SendKey(CDMHd,ord('C'),false,true,false);
|
||||
SendKey(CDMHd,ord('C'),false,false,false);
|
||||
SendKey(CDMHd,VK_RETURN,false,false,false); // ouvre le menu
|
||||
Sleep(200); // attend l'ouverture de la fenêtre
|
||||
SendKey(CDMHd,VK_RETURN,false,false,false); // sélectionne le menu démarre le serveur IP
|
||||
SendKey(CDMHd,VK_RETURN,false,false,false); // acquitte la fentêtre
|
||||
Sleep(200);
|
||||
// On a lancé CDM, déconnecter l'USB
|
||||
deconnecte_USB;
|
||||
Affiche('lance les fonctions automatiques de CDM',clyellow);
|
||||
Sleep(3000);
|
||||
ProcessRunning(s); // récupérer le handle de CDM
|
||||
SetForegroundWindow(CDMhd);
|
||||
Application.ProcessMessages;
|
||||
|
||||
if false then
|
||||
begin
|
||||
// Ouvre le fichier réseau : Alt F , Return, O, return
|
||||
SendKey(CDMHd,ord('F'),false,true,false);
|
||||
SendKey(CDMHd,VK_RETURN,false,false,false);
|
||||
SendKey(CDMHd,ord('O'),false,false,false);
|
||||
SendKey(CDMHd,VK_RETURN,false,false,false);
|
||||
Sleep(500); // attendre ouverture de la fenêtre
|
||||
Application.ProcessMessages;
|
||||
|
||||
// ouvre le fichier réseau
|
||||
// démarre le serveur IP ------------------------------------
|
||||
KeybdInput(VK_MENU,0); // enfonce Alt
|
||||
KeybdInput(Ord('C'),0); // enfonce C
|
||||
KeybdInput(Ord('C'),KEYEVENTF_KEYUP); // relache C
|
||||
|
||||
Affiche('Ouvre '+Lay,clyellow);
|
||||
s:=convert_VK(LAY);
|
||||
Sleep(1000);
|
||||
for i:=1 to length(s) do
|
||||
SendKey(CDMHd,ord(s[i]),false,false,false);
|
||||
SendKey(CDMHd,VK_return,false,false,false);
|
||||
Sleep(2000);
|
||||
Application.ProcessMessages;
|
||||
end;
|
||||
KeybdInput(VK_MENU,KEYEVENTF_KEYUP); // relache ALT
|
||||
|
||||
// Serveur d'interface
|
||||
KeybdInput(Ord('C'),0);
|
||||
KeybdInput(Ord('C'),KEYEVENTF_KEYUP);
|
||||
|
||||
KeybdInput(VK_RETURN,0);
|
||||
KeybdInput(VK_RETURN,KEYEVENTF_KEYUP);
|
||||
KeybdInput(VK_RETURN,0);
|
||||
KeybdInput(VK_RETURN,KEYEVENTF_KEYUP);
|
||||
|
||||
i:=SendInput(Length(KeyInputs),KeyInputs[0],SizeOf(KeyInputs[0]));SetLength(KeyInputs,0); // la fenetre serveur démarré est affichée
|
||||
Sleep(300);
|
||||
|
||||
KeybdInput(VK_RETURN,0);
|
||||
KeybdInput(VK_RETURN,KEYEVENTF_KEYUP);
|
||||
SendInput(Length(KeyInputs),KeyInputs[0],SizeOf(KeyInputs[0]));SetLength(KeyInputs,0); //fermer la fenetre
|
||||
Sleep(500);
|
||||
|
||||
connecte_CDM;
|
||||
Sleep(400);
|
||||
Application.processMessages;
|
||||
|
||||
// Serveur d'interface --------------------------------------
|
||||
if ServeurInterfaceCDM>0 then
|
||||
begin
|
||||
// ALT I 2 fois , Return
|
||||
SendKey(CDMHd,ord('I'),false,true,false); // Avec Alt
|
||||
SendKey(CDMHd,ord('I'),false,false,false); // Sans Alt
|
||||
SendKey(CDMHd,VK_RETURN,false,false,false); // Ouvre le menu
|
||||
SendKey(CDMHd,VK_RETURN,false,false,false); // Affiche le serveur d'interfaces
|
||||
Sleep(100);
|
||||
|
||||
// descendre le curseur n fois
|
||||
KeybdInput(VK_MENU,0); // enfonce ALT
|
||||
KeybdInput(Ord('I'),0); // I
|
||||
KeybdInput(Ord('I'),KEYEVENTF_KEYUP);
|
||||
|
||||
KeybdInput(VK_MENU,KEYEVENTF_KEYUP); // relache ALT
|
||||
KeybdInput(Ord('I'),0);
|
||||
KeybdInput(Ord('I'),KEYEVENTF_KEYUP);
|
||||
|
||||
KeybdInput(VK_RETURN,0);
|
||||
KeybdInput(VK_RETURN,KEYEVENTF_KEYUP);
|
||||
KeybdInput(VK_RETURN,0);
|
||||
KeybdInput(VK_RETURN,KEYEVENTF_KEYUP);
|
||||
SendInput(Length(KeyInputs), KeyInputs[0], SizeOf(KeyInputs[0]));SetLength(KeyInputs,0); // affiche la fenetre d'interface
|
||||
Sleep(300);
|
||||
|
||||
// descendre le curseur n fois pour sélectionner le serveur
|
||||
for i:=1 to ServeurInterfaceCDM-1 do
|
||||
begin
|
||||
SendKey(CDMHd,VK_DOWN,false,false,false);
|
||||
KeybdInput(VK_DOWN, 0);
|
||||
KeybdInput(VK_DOWN, KEYEVENTF_KEYUP);
|
||||
end;
|
||||
// 2x TAB pour pointer sur OK
|
||||
SendKey(CDMHd,VK_TAB,false,false,false);
|
||||
SendKey(CDMHd,VK_TAB,false,false,false);
|
||||
SendKey(CDMHd,VK_RETURN,false,false,false);
|
||||
Sleep(100);
|
||||
|
||||
// Rétrosignalisation
|
||||
KeybdInput(VK_TAB, 0);KeybdInput(VK_TAB, KEYEVENTF_KEYUP);
|
||||
KeybdInput(VK_TAB, 0);KeybdInput(VK_TAB, KEYEVENTF_KEYUP);
|
||||
KeybdInput(VK_SPACE, 0);KeybdInput(VK_SPACE, KEYEVENTF_KEYUP);
|
||||
SendInput(Length(KeyInputs), KeyInputs[0], SizeOf(KeyInputs[0]));SetLength(KeyInputs,0);
|
||||
Sleep(200);
|
||||
|
||||
// Interface
|
||||
if (ServeurInterfaceCDM=1) or (ServeurInterfaceCDM=7) then
|
||||
begin
|
||||
for i:=1 to ServeurRetroCDM-1 do
|
||||
begin
|
||||
SendKey(CDMHd,VK_DOWN,false,false,false);
|
||||
KeybdInput(VK_DOWN,0);KeybdInput(VK_DOWN,KEYEVENTF_KEYUP);
|
||||
SendInput(Length(KeyInputs),KeyInputs[0],SizeOf(KeyInputs[0]));SetLength(KeyInputs,0);
|
||||
end;
|
||||
// 3x TAB pour pointer sur OK
|
||||
SendKey(CDMHd,VK_TAB,false,false,false);
|
||||
SendKey(CDMHd,VK_TAB,false,false,false);
|
||||
SendKey(CDMHd,VK_TAB,false,false,false);
|
||||
SendKey(CDMHd,VK_RETURN,false,false,false);
|
||||
Sleep(100);
|
||||
// 2x TAB pour pointer sur OK
|
||||
KeybdInput(VK_TAB,0);KeybdInput(VK_TAB, KEYEVENTF_KEYUP);
|
||||
KeybdInput(VK_TAB,0);KeybdInput(VK_TAB, KEYEVENTF_KEYUP);
|
||||
KeybdInput(VK_SPACE,0);KeybdInput(VK_SPACE, KEYEVENTF_KEYUP); // valide la fenetre d'interface
|
||||
SendInput(Length(KeyInputs), KeyInputs[0], SizeOf(KeyInputs[0]));SetLength(KeyInputs,0);
|
||||
|
||||
Sleep(200);
|
||||
KeybdInput(VK_RETURN,0);KeybdInput(VK_RETURN, KEYEVENTF_KEYUP); // valide la fenetre finale
|
||||
SendInput(Length(KeyInputs), KeyInputs[0], SizeOf(KeyInputs[0]));SetLength(KeyInputs,0);
|
||||
end;
|
||||
end;
|
||||
Sleep(100);
|
||||
SendKey(CDMHd,VK_return,false,false,false); // renvoyer un CR
|
||||
Lance_CDM:=true;
|
||||
Application.ProcessMessages;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
Lance_CDM:=true;
|
||||
end;
|
||||
|
||||
procedure TFormPrinc.FormCreate(Sender: TObject);
|
||||
var
|
||||
@@ -6968,8 +7012,9 @@ begin
|
||||
DebugOuv:=True;
|
||||
|
||||
AvecInit:=true; //&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
|
||||
Diffusion:=true;
|
||||
|
||||
Diffusion:=AvecInit;
|
||||
|
||||
Application.processMessages;
|
||||
// créée la fenetre vérification de version
|
||||
FormVersion:=TformVersion.Create(Self);
|
||||
|
||||
@@ -6984,17 +7029,19 @@ begin
|
||||
|
||||
// Train[1].index:=0;
|
||||
|
||||
// lecture fichier de configuration client_GL.cfg et config.cfg
|
||||
// lecture fichiers de configuration client_GL.cfg et config.cfg
|
||||
lit_config;
|
||||
|
||||
// lancer CDM rail si on le demande
|
||||
// lancer CDM rail et le connecte si on le demande
|
||||
if LanceCDM then Lance_CDM;
|
||||
ButtonAffTCO.visible:=AvecTCO;
|
||||
Loco.Visible:=not(Diffusion);
|
||||
|
||||
// tenter la liaison vers CDM rail ou vers la centrale Lenz
|
||||
//Affiche('Test présence CDM',clYellow);
|
||||
connecte_CDM;
|
||||
if not(CDM_connecte) then // si CDM est connecté, on n'ouvre pas de liaison vers la centrale
|
||||
// tenter la liaison vers CDM rail
|
||||
if not(CDM_connecte) then connecte_CDM;
|
||||
|
||||
// si CDM n'est pas connecté, on ouvre la liaison vers la centrale
|
||||
if not(CDM_connecte) then
|
||||
begin
|
||||
Affiche('CDM absent - Ouverture liaison vers centrale Lenz',clYellow);
|
||||
// ouverture par USB
|
||||
@@ -7130,7 +7177,7 @@ end;
|
||||
|
||||
// timer à 100 ms
|
||||
procedure TFormPrinc.Timer1Timer(Sender: TObject);
|
||||
var index,aspect,i,a,x,y,adresse,TailleX,TailleY,orientation : integer;
|
||||
var index,aspect,i,a,x,y,x0,y0,Bimage,adresse,TailleX,TailleY,orientation : integer;
|
||||
imageFeu : Timage;
|
||||
frx,fry : real;
|
||||
s : string;
|
||||
@@ -7156,12 +7203,12 @@ begin
|
||||
|
||||
if temps>0 then dec(temps);
|
||||
|
||||
// gestion du clignotant des feux
|
||||
// gestion du clignotant des feux de la page principale
|
||||
if tempsCli>0 then dec(tempsCli);
|
||||
if tempsCli=0 then
|
||||
begin
|
||||
tempsCli:=5;
|
||||
clignotant:=not(clignotant);
|
||||
clignotant:=not(clignotant); // inversion du clignotant
|
||||
//tester chaque feu pour voir s'il y a un code de clignotement
|
||||
for i:=1 to NbreFeux do
|
||||
begin
|
||||
@@ -7170,57 +7217,47 @@ begin
|
||||
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
|
||||
begin
|
||||
//Affiche(IntToSTR(adresse),clOrange);
|
||||
Dessine_feu_mx(Feux[i].Img.Canvas,0,0,1,1,adresse,1);
|
||||
end;
|
||||
begin
|
||||
//Affiche(IntToSTR(adresse),clOrange);
|
||||
Dessine_feu_mx(Feux[i].Img.Canvas,0,0,1,1,adresse,1);
|
||||
end;
|
||||
end;
|
||||
|
||||
// feux du TCO
|
||||
if avecTCO then
|
||||
begin
|
||||
// parcourir les feux du TCO
|
||||
for i:=1 to NbFeuTCO do
|
||||
for y:=1 to NbreCellY do
|
||||
for x:=1 to NbreCellX do
|
||||
begin
|
||||
adresse:=FeuTCO[i].adresse;
|
||||
if adresse<>0 then
|
||||
PcanvasTCO.pen.mode:=pmCOpy;
|
||||
BImage:=TCO[x,y].bImage;
|
||||
if Bimage=30 then
|
||||
begin
|
||||
adresse:=TCO[x,y].adresse;
|
||||
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
|
||||
begin
|
||||
aspect:=feuTCO[i].aspect;
|
||||
case aspect of
|
||||
2 : ImageFeu:=Formprinc.Image2feux;
|
||||
3 : ImageFeu:=Formprinc.Image3feux;
|
||||
4 : ImageFeu:=Formprinc.Image4feux;
|
||||
5 : ImageFeu:=Formprinc.Image5feux;
|
||||
7 : ImageFeu:=Formprinc.Image7feux;
|
||||
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;
|
||||
// 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=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;
|
||||
if aspect=2 then begin x:=x+round(10*frX);y:=y+HauteurCell-round(tailleX*frY); end;
|
||||
end;
|
||||
Dessine_feu_mx(PCanvasTCO,x,y,frx,fry,adresse,orientation);
|
||||
aspect:=TCO[x,y].aspect;
|
||||
case aspect of
|
||||
2 : ImageFeu:=Formprinc.Image2feux;
|
||||
3 : ImageFeu:=Formprinc.Image3feux;
|
||||
4 : ImageFeu:=Formprinc.Image4feux;
|
||||
5 : ImageFeu:=Formprinc.Image5feux;
|
||||
7 : ImageFeu:=Formprinc.Image7feux;
|
||||
9 : ImageFeu:=Formprinc.Image9feux;
|
||||
else ImageFeu:=Formprinc.Image3feux;
|
||||
end;
|
||||
|
||||
TailleY:=ImageFeu.picture.BitMap.Height; // taille du feu d'origine (verticale)
|
||||
TailleX:=ImageFeu.picture.BitMap.Width;
|
||||
Orientation:=TCO[x,y].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);
|
||||
Dessine_feu_mx(PCanvasTCO,tco[x,y].x,tco[x,y].y,frx,fry,adresse,orientation);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
@@ -7442,11 +7479,11 @@ end;
|
||||
|
||||
procedure deconnecte_usb;
|
||||
begin
|
||||
Ferme:=true;
|
||||
if portCommOuvert then
|
||||
if portCommOuvert then
|
||||
begin
|
||||
portCommOuvert:=false;
|
||||
Formprinc.MSCommUSBLenz.Portopen:=false;
|
||||
Formprinc.MSCommUSBLenz.Portopen:=false;
|
||||
Affiche('Port USB déconnecté',clyellow);
|
||||
end;
|
||||
|
||||
portCommOuvert:=false;
|
||||
@@ -7457,7 +7494,7 @@ begin
|
||||
DeConnecterUSB.enabled:=false;
|
||||
ConnecterCDMRail.enabled:=true;
|
||||
DeConnecterCDMRail.enabled:=false;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TFormPrinc.DeconnecterUSBClick(Sender: TObject);
|
||||
@@ -7602,7 +7639,7 @@ begin
|
||||
LabelTitre.caption:=titre+' '+s;
|
||||
Affiche(s,clYellow);
|
||||
AfficheDebug(s,clYellow);
|
||||
parSocketCDM:=True;
|
||||
SocketCDM_connecte:=True;
|
||||
MenuConnecterUSB.enabled:=false;
|
||||
DeConnecterUSB.enabled:=false;
|
||||
ConnecterCDMRail.enabled:=false;
|
||||
@@ -7810,18 +7847,13 @@ procedure TFormPrinc.ClientSocketCDMRead(Sender: TObject;Socket: TCustomWinSocke
|
||||
s,ss,train : string;
|
||||
traite,sort : boolean;
|
||||
begin
|
||||
inc(Nbre_recu_cdm);
|
||||
inc(Nbre_recu_cdm);
|
||||
recuCDM:=ClientSocketCDM.Socket.ReceiveText;
|
||||
if trace then begin Affiche('recu de CDM:',clWhite);Affiche(recuCDM,clWhite);end;
|
||||
Interprete_trameCDM(recuCDM);
|
||||
end;
|
||||
|
||||
|
||||
procedure TFormPrinc.ButtonAffDebugClick(Sender: TObject);
|
||||
begin
|
||||
formDebug.show;
|
||||
end;
|
||||
|
||||
procedure TFormPrinc.ConnecterCDMrailClick(Sender: TObject);
|
||||
begin
|
||||
connecte_CDM;
|
||||
@@ -7838,6 +7870,7 @@ begin
|
||||
Affiche('CDM rail déconnecté',Cyan);
|
||||
AfficheDebug('CDM rail déconnecté',Cyan);
|
||||
CDM_connecte:=False;
|
||||
SocketCDM_connecte:=false;
|
||||
MenuConnecterUSB.enabled:=true;
|
||||
DeConnecterUSB.enabled:=true;
|
||||
ConnecterCDMRail.enabled:=true;
|
||||
@@ -7888,10 +7921,6 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TFormPrinc.Versions1Click(Sender: TObject);
|
||||
begin
|
||||
Affiche('Signaux complexes version '+Version,clLime);
|
||||
end;
|
||||
|
||||
procedure TFormPrinc.ClientSocketLenzDisconnect(Sender: TObject;
|
||||
Socket: TCustomWinSocket);
|
||||
@@ -8112,9 +8141,9 @@ begin
|
||||
if (maxTablo_act=0) and (NbrePN=0) then
|
||||
begin
|
||||
Affiche('Aucun actionneur déclaré',clYellow);
|
||||
exit;
|
||||
end;
|
||||
|
||||
|
||||
for i:=1 to maxTablo_act do
|
||||
begin
|
||||
s:=Tablo_actionneur[i].train;
|
||||
@@ -8190,16 +8219,15 @@ end;
|
||||
|
||||
procedure TFormPrinc.ButtonLanceCDMClick(Sender: TObject);
|
||||
begin
|
||||
if Lance_CDM then connecte_CDM;
|
||||
Lance_CDM ;
|
||||
end;
|
||||
|
||||
procedure TFormPrinc.Affichefentredebug1Click(Sender: TObject);
|
||||
begin
|
||||
formDebug.show;
|
||||
end;
|
||||
|
||||
begin
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
end.
|
||||
|
||||
Binary file not shown.
BIN
Binary file not shown.
+9
-8
@@ -23,7 +23,7 @@ object FormTCO: TFormTCO
|
||||
OnResize = FormResize
|
||||
DesignSize = (
|
||||
1123
|
||||
656)
|
||||
655)
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 13
|
||||
object LabelX: TLabel
|
||||
@@ -123,6 +123,7 @@ object FormTCO: TFormTCO
|
||||
PopupMenu = PopupMenu1
|
||||
OnClick = ImageTCOClick
|
||||
OnContextPopup = ImageTCOContextPopup
|
||||
OnDblClick = ImageTCODblClick
|
||||
OnDragOver = ImageTCODragOver
|
||||
OnMouseDown = ImageTCOMouseDown
|
||||
OnMouseMove = ImageTCOMouseMove
|
||||
@@ -870,13 +871,6 @@ object FormTCO: TFormTCO
|
||||
end
|
||||
object PopupMenu1: TPopupMenu
|
||||
Left = 360
|
||||
object Annulercouper: TMenuItem
|
||||
Caption = 'Annuler couper'
|
||||
OnClick = AnnulercouperClick
|
||||
end
|
||||
object N5: TMenuItem
|
||||
Caption = '-'
|
||||
end
|
||||
object MenuCouper: TMenuItem
|
||||
Caption = 'Couper'
|
||||
OnClick = MenuCouperClick
|
||||
@@ -889,6 +883,13 @@ object FormTCO: TFormTCO
|
||||
Caption = 'Coller'
|
||||
OnClick = MenuCollerClick
|
||||
end
|
||||
object N5: TMenuItem
|
||||
Caption = '-'
|
||||
end
|
||||
object Annulercouper: TMenuItem
|
||||
Caption = 'Annuler couper'
|
||||
OnClick = AnnulercouperClick
|
||||
end
|
||||
object N1: TMenuItem
|
||||
Caption = '-'
|
||||
end
|
||||
|
||||
+348
-159
File diff suppressed because it is too large
Load Diff
+1
-1
@@ -23,7 +23,7 @@ var
|
||||
Lance_verif : integer;
|
||||
verifVersion,notificationVersion : boolean;
|
||||
|
||||
Const Version='1.71'; //Version='1.2';// sert à la comparaison de la version publiée
|
||||
Const Version='1.74'; //Version='1.2';// sert à la comparaison de la version publiée
|
||||
|
||||
implementation
|
||||
|
||||
|
||||
+10
-1
@@ -16,7 +16,7 @@ Version 1.41 : Gestion des passages
|
||||
Version 1.42 : Correction erreur lecture signaux
|
||||
Version 1.43 : Correction erreur gestion sémaphore
|
||||
Version 1.44 : Gestion trains avec voitures éclairées
|
||||
Version 1.45 : Rejette les n° d'objets supérieurs aiguillages à la même adresse
|
||||
Version 1.45 : Rejette les n° d'objets supérieurs aiguillages à la même adresse pour le bug des aiguillages BIS de CDM
|
||||
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.
|
||||
@@ -24,4 +24,13 @@ Version 1.7 : Sauvegarde de la configuration dans les fichier client_gl.cfg et
|
||||
version 1.71 : correction d'un bug de la v1.7 sur le protocole COM/USB direct à l'interface
|
||||
version 1.72 : affichage message si configuration erronnée dans la fenêtre de configuration - Démarrage de CDM assuré pour les répertoires
|
||||
Program Files et Program Files (x86)
|
||||
version 1.73 : Amélioration du couper du TCO - Ajout de détecteurs sur les élements de voies 1 10 11 et 20 pour le TCO
|
||||
Affichage d'aide sur les éléments décrits dans le panneau de configuration
|
||||
version 1.74 : Amélioration des affichages du TCO - Pilotage des aiguillages depuis le TCO - Amélioration du séquençage d'ouverture de CDM Rail
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user