diff --git a/Notice d'utilisation des signaux_complexes_GL_V3.1.pdf b/Notice d'utilisation des signaux_complexes_GL_V3.2.pdf similarity index 67% rename from Notice d'utilisation des signaux_complexes_GL_V3.1.pdf rename to Notice d'utilisation des signaux_complexes_GL_V3.2.pdf index da768b6..61d4545 100644 Binary files a/Notice d'utilisation des signaux_complexes_GL_V3.1.pdf and b/Notice d'utilisation des signaux_complexes_GL_V3.2.pdf differ diff --git a/UnitConfig.dfm b/UnitConfig.dfm index 7ccb5c5..1b594a9 100644 --- a/UnitConfig.dfm +++ b/UnitConfig.dfm @@ -1780,7 +1780,7 @@ object FormConfig: TFormConfig Top = 8 Width = 633 Height = 457 - ActivePage = TabSheetAutonome + ActivePage = TabSheetAig Font.Charset = DEFAULT_CHARSET Font.Color = clBlack Font.Height = -11 @@ -2474,7 +2474,7 @@ object FormConfig: TFormConfig Width = 137 Height = 17 Hint = 'Cocher si l'#39'aiguillage est invers'#233' dans CDM rail' - Caption = 'Inversion de l'#39#233'tat CDM' + Caption = 'Inversion du pilotage' ParentShowHint = False ShowHint = True TabOrder = 1 @@ -2614,6 +2614,8 @@ object FormConfig: TFormConfig Top = 20 Width = 41 Height = 21 + ParentShowHint = False + ShowHint = True TabOrder = 0 OnKeyPress = Edit_HGKeyPress end @@ -2622,6 +2624,8 @@ object FormConfig: TFormConfig Top = 44 Width = 41 Height = 21 + ParentShowHint = False + ShowHint = True TabOrder = 1 OnKeyPress = EditPointe_BGKeyPress end @@ -2662,6 +2666,8 @@ object FormConfig: TFormConfig Top = 20 Width = 33 Height = 21 + ParentShowHint = False + ShowHint = True TabOrder = 6 OnKeyPress = EditDevie_HDKeyPress end @@ -2670,6 +2676,8 @@ object FormConfig: TFormConfig Top = 44 Width = 33 Height = 21 + ParentShowHint = False + ShowHint = True TabOrder = 7 OnKeyPress = EditDroit_BDKeyPress end @@ -2723,45 +2731,33 @@ object FormConfig: TFormConfig TabOrder = 7 object Label37: TLabel Left = 8 - Top = 18 + Top = 26 Width = 66 Height = 13 Caption = 'D'#233'vi'#233' ou droit' end object Label38: TLabel Left = 8 - Top = 42 + Top = 50 Width = 129 Height = 13 Caption = 'Temporisation (1/10'#232'me s)' end object EditTempo10: TEdit Left = 160 - Top = 40 + Top = 48 Width = 41 Height = 21 TabOrder = 0 OnKeyPress = EditTempo10KeyPress end - object CheckInvInit: TCheckBox - Left = 8 - Top = 64 - Width = 153 - Height = 17 - Hint = 'Inverse le pilotage de l'#39'aiguillage' - Caption = 'Pilotage invers'#233 - ParentShowHint = False - ShowHint = True - TabOrder = 1 - OnClick = CheckInvInitClick - end object ComboBoxDD: TComboBox Left = 160 - Top = 16 + Top = 24 Width = 97 Height = 21 ItemHeight = 13 - TabOrder = 2 + TabOrder = 1 OnChange = ComboBoxDDChange Items.Strings = ( 'D'#233'vi'#233 @@ -3050,7 +3046,7 @@ object FormConfig: TFormConfig Top = 48 Width = 129 Height = 21 - ItemHeight = 13 + ItemHeight = 0 TabOrder = 1 OnChange = ComboBoxDecChange end @@ -3067,6 +3063,8 @@ object FormConfig: TFormConfig Top = 120 Width = 41 Height = 21 + ParentShowHint = False + ShowHint = True TabOrder = 4 OnKeyPress = EditSuiv1KeyPress end @@ -3083,6 +3081,8 @@ object FormConfig: TFormConfig Top = 144 Width = 41 Height = 21 + ParentShowHint = False + ShowHint = True TabOrder = 6 OnKeyPress = EditSuiv2KeyPress end @@ -3099,6 +3099,8 @@ object FormConfig: TFormConfig Top = 168 Width = 41 Height = 21 + ParentShowHint = False + ShowHint = True TabOrder = 8 OnKeyPress = EditSuiv3KeyPress end @@ -3115,6 +3117,8 @@ object FormConfig: TFormConfig Top = 192 Width = 41 Height = 21 + ParentShowHint = False + ShowHint = True TabOrder = 10 OnKeyPress = EditSuiv4KeyPress end diff --git a/UnitConfig.pas b/UnitConfig.pas index f7ccf38..905a2c2 100644 --- a/UnitConfig.pas +++ b/UnitConfig.pas @@ -219,7 +219,6 @@ type Label37: TLabel; Label38: TLabel; EditTempo10: TEdit; - CheckInvInit: TCheckBox; Label39: TLabel; EditV4F: TEdit; EditV4O: TEdit; @@ -324,7 +323,6 @@ type const // variables du fichier de configuration "config-gl.cfg" -section_init='[section_init]'; nb_det_dist_ch='nb_det_dist'; IpV4_PC_ch='IpV4_PC'; retro_ch='retro'; @@ -570,8 +568,7 @@ begin if index=0 then exit; s:=IntToSTR(aiguillage[index].Adresse)+','; s:=s+IntToSTR(aiguillage[index].posInit)+','; - s:=s+IntToSTR(aiguillage[index].temps)+','; - s:=s+intToSTR(aiguillage[index].inversion); + s:=s+IntToSTR(aiguillage[index].temps); encode_init_aig:=s; end; @@ -644,9 +641,8 @@ begin // valeur d'initialisation s:=s+',INIT('; s:=s+IntToSTR(aiguillage[index].posInit)+','; - s:=s+IntToSTR(aiguillage[index].temps)+','; - s:=s+intToSTR(aiguillage[index].inversion)+')'; - + s:=s+IntToSTR(aiguillage[index].temps)+')'; + encode_aig:=s; end; @@ -756,6 +752,20 @@ begin end; end; +// +function TypeElAIg_to_char(adr : integer;c : char) : string; +var s: string; +begin + case c of + 'Z',#0 : s:='détecteur '+IntToSTR(adr); + 'P' : s:='pointe de l''aiguillage '+IntToSTR(adr); + 'S' : s:='position déviée de l''aiguillage '+IntToSTR(adr); + 'D' : s:='position droite de l''aiguillage '+IntToSTR(adr); + else s:='Erreur'; + end; + TypeElAIg_to_char:=s; +end; + // transforme le signal du tableau feux[] en texte function encode_sig_feux(i : integer): string; var s : string; @@ -1746,11 +1756,13 @@ begin b:=aiguillage[Index_Aig(adresse)].ADroitB; if b='Z' then b:=#0; Edit_HG.Text:=intToSTR(aiguillage[index].ADroit)+b; + Edit_HG.Hint:=TypeElAIg_to_char(aiguillage[index].Adroit,b); // champ en bas à gauche b:=aiguillage[Index].ADevieB; if b='Z' then b:=#0; EditPointe_BG.Text:=intToSTR(aiguillage[index].ADevie)+b; + EditPointe_BG.Hint:=TypeElAIg_to_char(aiguillage[index].ADevie,b); // milieu haut gauche EditP1.Text:=intToSTR(adresse)+aiguillage[Index].DDroitB; @@ -1764,10 +1776,12 @@ begin // droit haut EditDevie_HD.Text:=intToSTR(aiguillage[id2].Adevie)+aiguillage[id2].AdevieB; + EditDevie_HD.Hint:=TypeElAIg_to_char(aiguillage[id2].Adevie,aiguillage[id2].AdevieB); LabelTJD1.Caption:=IntToSTR(adresse); // droit bas - EditDroit_BD.Text:=intToSTR(aiguillage[id2].Adroit)+aiguillage[Id2].AdroitB; + EditDroit_BD.Text:=intToSTR(aiguillage[id2].Adroit)+aiguillage[Id2].AdroitB; + EditDroit_BD.Hint:=TypeElAIg_to_char(aiguillage[id2].ADroit,aiguillage[Id2].AdroitB); LabelTJD2.Caption:=IntToSTR(adr2); CheckInverse.checked:=aiguillage[Index_Aig(adresse)].inversionCDM=1; @@ -1807,8 +1821,13 @@ begin if aiguillage[Index].vitesse=60 then begin RadioButtonSans.checked:=false;RadioButton30kmh.checked:=false;RadioButton60kmh.checked:=true;end; EditPointe_BG.Text:=intToSTR(aiguillage[index].Apointe)+aiguillage[index].ApointeB; + EditPointe_BG.Hint:=TypeElAIg_to_char(aiguillage[index].Apointe,aiguillage[index].ApointeB); + EditDevie_HD.Text:=intToSTR(aiguillage[index].Adevie)+aiguillage[index].AdevieB; + EditDevie_HD.Hint:=TypeElAIg_to_char(aiguillage[index].Adevie,aiguillage[index].AdevieB); + EditDroit_BD.Text:=intToSTR(aiguillage[index].Adroit)+aiguillage[index].AdroitB; + EditDroit_BD.Hint:=TypeElAIg_to_char(aiguillage[index].Adroit,aiguillage[index].AdroitB); if tri then begin ComboBoxAig.ItemIndex:=3; // 0=n'existe pas 1=aiguillage 2=TJD 3=TJS 4=aiguillage triple @@ -1835,7 +1854,6 @@ begin if position=const_devie then formconfig.ComboBoxDD.ItemIndex:=0; formconfig.EditTempo10.text:=InttoSTr(aiguillage[index].temps); formconfig.EditTempo10.text:=InttoSTr(aiguillage[index].temps); - formconfig.CheckInvInit.Checked:=aiguillage[index].inversion=1; clicListe:=false; end; @@ -1895,6 +1913,22 @@ begin end; end; +// transforme une chaine "élément" en une chaine affichable pour le hint +// ex chaine_element("A32")=aiguillage 32 +function chaine_element(Equip : Tequipement;adr : integer) : string; +var s: string; +begin + case Equip of + aig : s:='Aiguillage '; + tjd : s:='Tjd '; + tjs : s:='Tjs '; + triple : s:='Aiguillage triple '; + det : s:='Détecteur '; + else s:='Inconnu '; + end; + result:=s+intToSTR(adr); +end; + // mise à jour des champs du signal d'après le tableau feux Procedure aff_champs_sig_feux(index : integer); var i,j,l,d,k,nc,condCarre : integer; @@ -1946,29 +1980,35 @@ begin LabelDetAss.visible:=true; LabelElSuiv.visible:=true; + EditDet1.Visible:=true;EditDet2.Visible:=true;EditDet3.Visible:=true;EditDet4.Visible:=true; EditSuiv1.Visible:=true;EditSuiv2.Visible:=true;EditSuiv3.Visible:=true;EditSuiv4.Visible:=true; Label24.Visible:=true; Label25.Visible:=true;Label26.Visible:=true;Label27.Visible:=true; CheckVerrouCarre.Visible:=true; EditDet1.Text:=IntToSTR(feux[i].Adr_det1); EditSuiv1.Text:=TypeEl_To_char(feux[i].Btype_suiv1)+IntToSTR(feux[i].Adr_el_suiv1); + + EditSuiv1.Hint:=chaine_element(feux[i].Btype_suiv1,feux[i].Adr_el_suiv1); j:=feux[i].Adr_det2; if j<>0 then begin Editdet2.Text:=IntToSTR(j);EditSuiv2.Text:=TypeEl_To_char(feux[i].Btype_suiv2)+IntToSTR(feux[i].Adr_el_suiv2); - end else begin EditDet2.Text:='';EditSuiv2.Text:='';end; + EditSuiv2.Hint:=chaine_element(feux[i].Btype_suiv2,feux[i].Adr_el_suiv2); + end else begin EditDet2.Text:='';EditSuiv2.Text:='';EditSuiv2.Hint:='';end; j:=feux[i].Adr_det3; if j<>0 then begin EditDet3.Text:=IntToSTR(j);EditSuiv3.Text:=TypeEl_To_char(feux[i].Btype_suiv3)+IntToSTR(feux[i].Adr_el_suiv3); + EditSuiv3.Hint:=chaine_element(feux[i].Btype_suiv3,feux[i].Adr_el_suiv3); end - else begin EditDet3.Text:='';EditSuiv3.Text:='';end; + else begin EditDet3.Text:='';EditSuiv3.Text:='';EditSuiv3.Hint:='';end; j:=feux[i].Adr_det4; if j<>0 then begin EditDet4.Text:=IntToSTR(j);EditSuiv4.Text:=TypeEl_To_char(feux[i].Btype_suiv4)+IntToSTR(feux[i].Adr_el_suiv4); + EditSuiv4.Hint:=chaine_element(feux[i].Btype_suiv4,feux[i].Adr_el_suiv4); end - else begin EditDet4.Text:='';EditSuiv4.Text:='';end; + else begin EditDet4.Text:='';EditSuiv4.Text:='';EditSuiv4.Hint:='';end; checkVerrouCarre.Checked:=feux[i].VerrouCarre; checkBoxFB.Checked:=feux[i].FeuBlanc; @@ -2601,7 +2641,7 @@ begin EditAdrSig.Color:=clWindow; RE_ColorLine(Formconfig.RichSig,ligneClicSig,Clyellow); - aff_champs_sig_feux(lc+1); + aff_champs_sig_feux(lc+1); // affiche les champs du feu clicliste:=false; end; @@ -4048,6 +4088,14 @@ begin ok:=false; Affiche('Erreur : Détecteur '+intToSTR(i)+' non existant mais associé au signal '+IntToSTR(feux[j].adresse),clred); end; + end + else + begin + if feux[j].Aspect<10 then + begin + ok:=false; + Affiche('Erreur : Adresse de détecteur nul sur signal '+IntToSTR(feux[j].adresse),clred); + end; end; i:=feux[j].Adr_det2; @@ -5037,7 +5085,6 @@ begin if affevt then affiche('Evt change InvInit',clyellow); s:=formconfig.RichAig.Lines[ligneclicAig]; Val(s,adrAig,erreur); - if checkInvInit.Checked then aiguillage[Index_Aig(adraig)].Inversion:=1 else aiguillage[Index_Aig(adraig)].Inversion:=0; // réencoder la ligne s:=encode_aig(Index_Aig(AdrAig)); formconfig.RichAig.Lines[ligneclicAig]:=s; diff --git a/UnitPrinc.dcu b/UnitPrinc.dcu index 67a7668..2fbebf2 100644 Binary files a/UnitPrinc.dcu and b/UnitPrinc.dcu differ diff --git a/UnitPrinc.pas b/UnitPrinc.pas index 200ba2a..c47592d 100644 --- a/UnitPrinc.pas +++ b/UnitPrinc.pas @@ -216,13 +216,12 @@ TBranche = record position, // position actuelle : 1=dévié 2=droit (centrale LENZ) posInit, // position d'initialisation 1=dévié 2=droit 9=non positionné Adrtriple, // 2eme adresse pour un aiguillage triple - temps, // temps de pilotage (durée de l'impulsion en x 100 ms) - inversion : integer; // positionné dans fichier config_gl section_init + temps, // temps de pilotage (durée de l'impulsion en x 100 ms InversionCDM : integer ; // pour les aiguillages déclarés inversés dans CDM, utilisé en mode autonome (paramètre I1) 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 - ADroitB : char ; // id de branche pour TJD + ADroitB : char ; // P D S Z ADevie : integer ; // (TJD:identifiant extérieur) adresse de l'élément connecté en position déviée ADevieB : char; // caractère (D ou S)si aiguillage de l'élément connecté en position déviée @@ -2634,7 +2633,7 @@ var s,sa,chaine,SOrigine: string; pds,trouve_section_branche,trouve_section_sig,trouve_section_act,compile_init_cfg : boolean; bd,virgule,i_detect,i,erreur,aig2,detect,offset,index, adresse,j,position,temporisation,invers,indexPointe,indexDevie,indexDroit, ComptEl,Compt_IT,Num_Element,k,modele,adr,adr2,erreur2,l,t,Nligne,postriple,itl, - postjd,postjs,nv,it,Num_Champ,asp,inversion,adraig : integer; + postjd,postjs,nv,it,Num_Champ,asp,adraig : integer; label ici1,ici2,ici3,ici4 ; function lit_ligne : string ; @@ -2654,41 +2653,6 @@ var s,sa,chaine,SOrigine: string; lit_ligne:=s; end; - procedure compile_section_init; - var index : integer; - begin - //initialisation aiguillages - repeat - s:=lit_ligne; - j:=pos(',',s); - if j>1 then - begin - begin - Val(s,adresse,erreur); - Delete(s,1,j); // adresse aiguillage - if (adresse>0) and (AvecInitAiguillages) then - begin - j:=pos(',',s); - Val(s,position,erreur); - Delete(S,1,j);// position aiguillage - if (position<1) or (position>2) then position:=1; - index:=Index_Aig(adresse); - aiguillage[index].posInit:=position; - - // temporisation aiguillage - j:=pos(',',s);if j=0 then j:=length(s); - val(s,temporisation,erreur);Delete(S,1,j); - if (temporisation<0) or (temporisation>10) then temporisation:=5; - aiguillage[index].temps:=temporisation; - - val(s,invers,erreur); - if (invers<0) or (invers>1) then invers:=0; // inversion commande - aiguillage[index].inversion:=invers; - end; - end; - end; - until (adresse=0); - end; begin compile_init_cfg:=true; @@ -2723,7 +2687,6 @@ begin Aiguillage[i].position:=const_inconnu; // position inconnue Aiguillage[i].PosInit:=const_inconnu; // position inconnue Aiguillage[i].temps:=5 ; - Aiguillage[i].inversion:=0; Aiguillage[i].inversionCDM:=0; end; for i:=1 to 1024 do @@ -3005,11 +2968,11 @@ begin i:=pos(',',enregistrement); if i<>0 then delete(enregistrement,1,i); Val(enregistrement,j,erreur); - i:=pos(',',enregistrement); - if i<>0 then delete(enregistrement,1,i); - Val(enregistrement,inversion,erreur); + //i:=pos(',',enregistrement); + //if i<>0 then delete(enregistrement,1,i); + //Val(enregistrement,inversion,erreur); aiguillage[maxaiguillage].temps:=j; - aiguillage[maxaiguillage].inversion:=inversion; + //aiguillage[maxaiguillage].inversion:=inversion; aiguillage[maxaiguillage].posinit:=position; i:=pos(')',enregistrement); delete(enregistrement,1,i); @@ -3427,21 +3390,6 @@ begin val(s,Tempo_Aig,erreur); end; - i:=pos(uppercase(section_init),s); - if (i<>0) then - begin - if compile_init_cfg then - begin - trouve_sec_init:=true; - compile_section_init; - inc(nv); - Affiche('compilation de la section [init aig]',cllime); - end; - Affiche('Attention la section [init_aig] n''est plus gérée, elle est déplacée dans la configuration des aiguillages',clWhite); - Affiche('Veuillez regénérer les fichiers de configuration: ',clWhite); - Affiche('Menu Divers/configuration bouton "Enregistrement de la configuration et fermer"',clWhite); - end; - sa:=uppercase(verif_version_ch)+'='; i:=pos(sa,s); if i<>0 then @@ -3542,7 +3490,6 @@ begin if not(trouve_NbDetDist) then s:=nb_det_dist_ch; if not(trouve_ipv4_PC) then s:=IpV4_PC_ch; if not(trouve_retro) then s:=retro_ch; - //if not(trouve_sec_init) and compile_init_cfg then s:=section_init; if not(trouve_init_aig) then s:=INIT_AIG_ch; if not(trouve_lay) then s:=LAY_ch; if not(trouve_INTER_CAR) then s:=INTER_CAR_ch; @@ -5907,6 +5854,14 @@ var groupe,temps,index : integer ; label mise0; begin //Affiche(IntToSTR(adresse)+' '+intToSTr(octet),clYellow); + + index:=index_aig(adresse); + + // test si pilotage aiguillage inversé + if (acc=aigP) and (aiguillage[index].inversionCDM=1) then + begin + if octet=1 then octet:=2 else octet:=1; + end; // pilotage par CDM rail ----------------- if CDM_connecte then @@ -5926,13 +5881,6 @@ begin // pilotage par USB ou par éthernet de la centrale ------------ if (hors_tension2=false) and (portCommOuvert or parSocketLenz) then begin - // test si pilotage aiguillage inversé - index:=index_aig(adresse); - if (acc=aigP) and (aiguillage[index].inversion=1) then - begin - if octet=1 then octet:=2 else octet:=1; - end; - if (octet=0) or (octet>2) then exit; groupe:=(adresse-1) div 4; diff --git a/UnitTCO.dcu b/UnitTCO.dcu index 81f8e61..ae59e51 100644 Binary files a/UnitTCO.dcu and b/UnitTCO.dcu differ diff --git a/verif_version.dcu b/verif_version.dcu index a6d37fb..10f1091 100644 Binary files a/verif_version.dcu and b/verif_version.dcu differ diff --git a/verif_version.pas b/verif_version.pas index 2dfff4d..c307e5c 100644 --- a/verif_version.pas +++ b/verif_version.pas @@ -24,7 +24,7 @@ var verifVersion,notificationVersion : boolean; Const Version='3.2'; // sert à la comparaison de la version publiée - SousVersion=' '; // en cas d'absence de sous version mettre un espace + SousVersion='C'; // en cas d'absence de sous version mettre un espace implementation diff --git a/versions.txt b/versions.txt index c5c5291..083ea7b 100644 --- a/versions.txt +++ b/versions.txt @@ -62,6 +62,9 @@ version 3.1 : Renforcement de la v Correction d'un bug sur l'affichage des rappels de ralentissement non présentés. Correction d'un bug sur certains évènements aiguillages. Correction d'un bug sur présence train avant signal sur aiguille en talon mal positionnée. +version 3.2 : Correction bug cohérence signal unisemaf. + : Simplification des aiguillages pilotés inversés +