diff --git a/Notice d'utilisation des signaux_complexes_GL_V4.7.pdf b/Notice d'utilisation des signaux_complexes_GL_V4.72.pdf similarity index 75% rename from Notice d'utilisation des signaux_complexes_GL_V4.7.pdf rename to Notice d'utilisation des signaux_complexes_GL_V4.72.pdf index 7fffbe7..88187fb 100644 Binary files a/Notice d'utilisation des signaux_complexes_GL_V4.7.pdf and b/Notice d'utilisation des signaux_complexes_GL_V4.72.pdf differ diff --git a/Signaux_complexes_GL.cfg b/Signaux_complexes_GL.cfg index 69e7fa7..acb7715 100644 --- a/Signaux_complexes_GL.cfg +++ b/Signaux_complexes_GL.cfg @@ -14,8 +14,8 @@ -$N+ -$O+ -$P+ --$Q- --$R- +-$Q+ +-$R+ -$S- -$T- -$U- diff --git a/Signaux_complexes_GL.dof b/Signaux_complexes_GL.dof index 490e277..d5ff374 100644 --- a/Signaux_complexes_GL.dof +++ b/Signaux_complexes_GL.dof @@ -17,8 +17,8 @@ M=0 N=1 O=1 P=1 -Q=0 -R=0 +Q=1 +R=1 S=0 T=0 U=0 @@ -130,3 +130,6 @@ OriginalFilename= ProductName= ProductVersion=1.0.0.0 Comments= +[HistoryLists\hlUnitAliases] +Count=1 +Item0=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; diff --git a/UnitConfig.dcu b/UnitConfig.dcu index ea90d16..06d25bc 100644 Binary files a/UnitConfig.dcu and b/UnitConfig.dcu differ diff --git a/UnitConfig.dfm b/UnitConfig.dfm index d7f6a4d..5e48d27 100644 --- a/UnitConfig.dfm +++ b/UnitConfig.dfm @@ -1580,7 +1580,7 @@ object FormConfig: TFormConfig Top = 8 Width = 633 Height = 497 - ActivePage = TabSheetAct + ActivePage = TabSheetCDM Font.Charset = DEFAULT_CHARSET Font.Color = clBlack Font.Height = -11 @@ -1645,22 +1645,12 @@ object FormConfig: TFormConfig Left = 16 Top = 96 Width = 273 - Height = 201 + Height = 169 Caption = 'Au d'#233'marrage de Signaux_Complexes ' TabOrder = 1 - object Label13: TLabel - Left = 8 - Top = 140 - Width = 242 - Height = 26 - Caption = - 'Nom du fichier LAY '#224' ouvrir au d'#233'marrage de CDM rail (n'#233'cessite ' + - 'la version mini 7.03 de CDM Rail)' - WordWrap = True - end object CheckVerifVersion: TCheckBox Left = 8 - Top = 40 + Top = 48 Width = 249 Height = 17 Caption = 'V'#233'rifications de nouvelle version au d'#233'marrage' @@ -1668,7 +1658,7 @@ object FormConfig: TFormConfig end object CheckInfoVersion: TCheckBox Left = 8 - Top = 56 + Top = 64 Width = 241 Height = 17 Caption = 'Information sur la version actuelle' @@ -1676,7 +1666,7 @@ object FormConfig: TFormConfig end object CheckLanceCDM: TCheckBox Left = 8 - Top = 112 + Top = 136 Width = 241 Height = 25 Caption = 'Lancer et connecter CDM Rail au d'#233'marrage' @@ -1685,7 +1675,7 @@ object FormConfig: TFormConfig end object CheckAvecTCO: TCheckBox Left = 8 - Top = 72 + Top = 96 Width = 89 Height = 17 Hint = 'Affiche le TCO au d'#233'marrage' @@ -1694,14 +1684,6 @@ object FormConfig: TFormConfig ShowHint = True TabOrder = 3 end - object EditNomLay: TEdit - Left = 16 - Top = 170 - Width = 241 - Height = 21 - TabOrder = 4 - Text = 'EditNomLay' - end object CheckFenEt: TCheckBox Left = 8 Top = 24 @@ -1711,18 +1693,18 @@ object FormConfig: TFormConfig Caption = 'Fen'#234'tre '#233'tendue' ParentShowHint = False ShowHint = True - TabOrder = 5 + TabOrder = 4 end object CheckBandeauTCO: TCheckBox Left = 8 - Top = 88 + Top = 112 Width = 129 Height = 17 Hint = 'Masque le bandeau de param'#233'trage du TCO au d'#233'marrage' Caption = 'Bandeau TCO masqu'#233 ParentShowHint = False ShowHint = True - TabOrder = 6 + TabOrder = 5 end end object GroupBox6: TGroupBox @@ -1863,9 +1845,9 @@ object FormConfig: TFormConfig end object GroupBox8: TGroupBox Left = 16 - Top = 304 + Top = 272 Width = 273 - Height = 113 + Height = 137 Caption = 'Services CommIP CDM Rail' TabOrder = 4 object Label6: TLabel @@ -1908,8 +1890,8 @@ object FormConfig: TFormConfig TabOrder = 3 end object CheckBoxSrvSig: TCheckBox - Left = 144 - Top = 40 + Left = 8 + Top = 104 Width = 113 Height = 17 Caption = 'Signaux (non utilis'#233')' @@ -3004,7 +2986,7 @@ object FormConfig: TFormConfig Width = 129 Height = 21 Style = csDropDownList - ItemHeight = 13 + ItemHeight = 0 TabOrder = 1 OnChange = ComboBoxDecChange end diff --git a/UnitConfig.pas b/UnitConfig.pas index 21a26d3..31d6be0 100644 --- a/UnitConfig.pas +++ b/UnitConfig.pas @@ -21,12 +21,10 @@ type EditAdrIPCDM: TEdit; EditPortCDM: TEdit; GroupBox5: TGroupBox; - Label13: TLabel; CheckVerifVersion: TCheckBox; CheckInfoVersion: TCheckBox; CheckLanceCDM: TCheckBox; CheckAvecTCO: TCheckBox; - EditNomLay: TEdit; GroupBox6: TGroupBox; RadioButton4: TRadioButton; RadioButton5: TRadioButton; @@ -421,7 +419,6 @@ Init_aig_ch='Init_Aig'; Init_dem_aig_ch='Init_Dem_Aig'; Init_dem_interfaceUSBCOM_ch='Init_demUSBCOM'; Init_dem_interfaceEth_ch='Init_demETH'; -LAY_ch='Lay'; IPV4_INTERFACE_ch='IPV4_INTERFACE'; PROTOCOLE_SERIE_ch='PROTOCOLE_SERIE'; INTER_CAR_ch='INTER_CAR'; @@ -1286,9 +1283,6 @@ begin if LanceCDM then s:='1' else s:='0'; writeln(fichierN,CDM_ch+'=',s); - // Nom du LAY - writeln(fichierN,lay_ch+'=',Lay); - // Serveur d'interface de CDM writeln(fichierN,Serveur_interface_ch+'=',intToSTR(ServeurInterfaceCDM)); @@ -1372,7 +1366,7 @@ procedure lit_config; var s,sa,chaine,SOrigine: string; c,paig : char; tec,tjdC,tjsC,s2,trouve,triC,debugConfig,multiple,fini,finifeux,trouve_NbDetDist,trouve_ipv4_PC,trouve_retro, - trouve_sec_init,trouve_init_aig,trouve_lay,trouve_IPV4_INTERFACE,trouve_PROTOCOLE_SERIE,trouve_INTER_CAR, + trouve_sec_init,trouve_init_aig,trouve_IPV4_INTERFACE,trouve_PROTOCOLE_SERIE,trouve_INTER_CAR, trouve_Tempo_maxi,trouve_Entete,trouve_tco,trouve_cdm,trouve_Serveur_interface,trouve_fenetre,trouve_MasqueTCO, trouve_NOTIF_VERSION,trouve_verif_version,trouve_fonte,trouve_tempo_aig,trouve_raz,trouve_section_aig, pds,trouve_section_branche,trouve_section_sig,trouve_section_act,fichier_trouve,trouve_tempo_feu, @@ -2223,16 +2217,6 @@ begin LanceCDM:=i=1; end; - sa:=uppercase(LAY_ch)+'='; - i:=pos(sa,s); - if i=1 then - begin - inc(nv); - trouve_lay:=true; - delete(s,i,length(sa)); - lay:=s; - end; - sa:=uppercase(SERVEUR_INTERFACE_ch)+'='; i:=pos(sa,s); if i=1 then @@ -2330,7 +2314,6 @@ begin trouve_INTER_CAR:=false; trouve_entete:=false; trouve_IPV4_INTERFACE:=false; - trouve_lay:=false; trouve_Tempo_maxi:=false; trouve_PROTOCOLE_SERIE:=false; trouve_TCO:=false; @@ -2405,7 +2388,6 @@ begin if not(trouve_ipv4_PC) then s:=IpV4_PC_ch; if not(trouve_retro) then s:=retro_ch; 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; if not(trouve_Tempo_maxi) then s:=Tempo_maxi_ch; if not(trouve_Entete) then s:=Entete_ch; @@ -2566,7 +2548,7 @@ begin AvecTCO:=CheckAvecTCO.checked; MasqueBandeauTCO:=CheckBandeauTCO.checked; - Lay:=EditNomLay.Text; + if RadioButton4.Checked then ServeurInterfaceCDM:=0; if RadioButton5.Checked then ServeurInterfaceCDM:=1; if RadioButton6.Checked then ServeurInterfaceCDM:=2; @@ -2722,7 +2704,6 @@ begin CheckLanceCDM.Checked:=LanceCDM; CheckAvecTCO.checked:=avecTCO; CheckBandeauTCO.Checked:=MasqueBandeauTCO; - EditNomLay.Text:=Lay; RadioButton4.Checked:=ServeurInterfaceCDM=0; RadioButton5.Checked:=ServeurInterfaceCDM=1; RadioButton6.Checked:=ServeurInterfaceCDM=2; @@ -5917,9 +5898,9 @@ begin verif_extr_branches:=Erreur; end; -function verif_coherence : boolean; +function verif_coherence : boolean; var AncAdr,i,j,k,l,Indexaig,adr,adr2,extr,detect,condcarre,nc,index2,SuivAdr, - x,y,extr2,adr3,index3 : integer; + x,y,extr2,adr3,index3,det1Br,det2Br,det1index,det2index : integer; modAig,AncModel,model,km,SuivModel,model2: TEquipement; c : char; ok,trouveSuiv,TrouvePrec : boolean; @@ -6158,16 +6139,44 @@ begin begin ok:=false; Affiche('Erreur 9.1: Détecteur '+intToSTR(i)+' non existant mais associé au signal '+IntToSTR(feux[j].adresse),clred); + end + else + begin + // vérifier si les deux détecteurs du signal sont consécutifs (l et i) + l:=feux[j].Adr_det1; + trouve_detecteur(i); + det1Br:=branche_trouve; + det1Index:=IndexBranche_trouve; + + trouve_detecteur(l); + det2Br:=branche_trouve; + det2Index:=IndexBranche_trouve; + if (det1Br<>Det2Br) or (abs(det1Index-det2Index)>1) then + begin + ok:=false; + Affiche('Erreur 9.12: signal '+intToSTR(feux[j].adresse)+' : détecteurs '+intToSTR(i)+' et '+intToSTR(l)+' non consécutifs ',clred); + end; end; end; if ((km=aig) or (km=tjs) or (km=tjd) or (km=triple)) then begin // aiguillage - if index_aig(i)=0 then + k:=index_aig(i); + if k=0 then begin ok:=false; Affiche('Erreur 9.2: aiguillage '+intToSTR(i)+' non existant mais associé au signal '+IntToSTR(feux[j].adresse),clred); - end; + end + else + begin + // vérifier si le détecteur du signal et l'aiguillage sont consécutifs + l:=feux[j].Adr_det1; + if (aiguillage[k].ADroit<>l) and (aiguillage[k].ADevie<>l) and (aiguillage[k].APointe<>l) then + begin + ok:=false; + Affiche('Erreur 9.21: signal '+intToSTR(feux[j].adresse)+' : aiguillage '+intToSTR(i)+' et détecteur '+intToSTR(l)+' non consécutifs ',clred); + end; + end; end; end; diff --git a/UnitConfigCellTCO.dcu b/UnitConfigCellTCO.dcu index a2120db..eb1084d 100644 Binary files a/UnitConfigCellTCO.dcu and b/UnitConfigCellTCO.dcu differ diff --git a/UnitConfigTCO.dcu b/UnitConfigTCO.dcu index 5fca3bc..857d8c7 100644 Binary files a/UnitConfigTCO.dcu and b/UnitConfigTCO.dcu differ diff --git a/UnitDebug.dcu b/UnitDebug.dcu index 9b26a46..b46acea 100644 Binary files a/UnitDebug.dcu and b/UnitDebug.dcu differ diff --git a/UnitDebug.dfm b/UnitDebug.dfm index 054f59a..8b07d13 100644 --- a/UnitDebug.dfm +++ b/UnitDebug.dfm @@ -1,8 +1,9 @@ object FormDebug: TFormDebug Left = 324 Top = 102 - Width = 732 - Height = 653 + Width = 771 + Height = 683 + VertScrollBar.Tracking = True Caption = 'Fen'#234'tre de d'#233'bug' Color = clWindow TransparentColorValue = clTeal @@ -15,12 +16,12 @@ object FormDebug: TFormDebug Position = poMainFormCenter OnCreate = FormCreate DesignSize = ( - 699 - 615) + 738 + 645) PixelsPerInch = 96 TextHeight = 13 object Label1: TLabel - Left = 558 + Left = 597 Top = 4 Width = 108 Height = 13 @@ -36,7 +37,7 @@ object FormDebug: TFormDebug ParentFont = False end object Label2: TLabel - Left = 390 + Left = 429 Top = 2 Width = 131 Height = 18 @@ -50,7 +51,7 @@ object FormDebug: TFormDebug ParentFont = False end object EditNivDebug: TEdit - Left = 670 + Left = 709 Top = 2 Width = 49 Height = 21 @@ -66,7 +67,7 @@ object FormDebug: TFormDebug OnKeyPress = EditNivDebugKeyPress end object MemoEvtDet: TMemo - Left = 456 + Left = 495 Top = 336 Width = 229 Height = 201 @@ -87,7 +88,7 @@ object FormDebug: TFormDebug OnChange = MemoEvtDetChange end object ButtonEcrLog: TButton - Left = 350 + Left = 389 Top = 328 Width = 97 Height = 29 @@ -97,7 +98,7 @@ object FormDebug: TFormDebug OnClick = ButtonEcrLogClick end object ButtonRazTampon: TButton - Left = 350 + Left = 389 Top = 360 Width = 97 Height = 33 @@ -108,7 +109,7 @@ object FormDebug: TFormDebug OnClick = ButtonRazTamponClick end object ButtonCherche: TButton - Left = 350 + Left = 389 Top = 296 Width = 97 Height = 25 @@ -118,7 +119,7 @@ object FormDebug: TFormDebug OnClick = ButtonChercheClick end object ButtonAffEvtChrono: TButton - Left = 350 + Left = 389 Top = 256 Width = 97 Height = 33 @@ -129,7 +130,7 @@ object FormDebug: TFormDebug OnClick = ButtonAffEvtChronoClick end object ButtonCop: TButton - Left = 350 + Left = 389 Top = 208 Width = 97 Height = 41 @@ -146,7 +147,7 @@ object FormDebug: TFormDebug OnClick = ButtonCopClick end object RichEdit: TRichEdit - Left = 456 + Left = 495 Top = 176 Width = 229 Height = 153 @@ -165,7 +166,7 @@ object FormDebug: TFormDebug OnChange = RichEditChange end object ButtonRazLog: TButton - Left = 350 + Left = 389 Top = 400 Width = 97 Height = 33 @@ -176,7 +177,7 @@ object FormDebug: TFormDebug OnClick = ButtonRazLogClick end object GroupBox1: TGroupBox - Left = 348 + Left = 387 Top = 608 Width = 345 Height = 177 @@ -324,7 +325,7 @@ object FormDebug: TFormDebug end end object GroupBox2: TGroupBox - Left = 356 + Left = 395 Top = 20 Width = 333 Height = 149 @@ -498,8 +499,8 @@ object FormDebug: TFormDebug object RichDebug: TRichEdit Left = 8 Top = 8 - Width = 329 - Height = 582 + Width = 368 + Height = 612 Anchors = [akLeft, akTop, akRight, akBottom] Lines.Strings = ( 'RichDebug') @@ -510,7 +511,7 @@ object FormDebug: TFormDebug OnChange = RichDebugChange end object GroupBox5: TGroupBox - Left = 348 + Left = 387 Top = 544 Width = 345 Height = 57 @@ -577,7 +578,7 @@ object FormDebug: TFormDebug end end object ButtonRazTout: TButton - Left = 351 + Left = 390 Top = 176 Width = 97 Height = 25 diff --git a/UnitDebug.pas b/UnitDebug.pas index 4291829..61486ff 100644 --- a/UnitDebug.pas +++ b/UnitDebug.pas @@ -153,6 +153,13 @@ begin if IsWow64Process then s:=s+' OS 64 Bits' else s:=s+' OS 32 Bits'; RichEdit.color:=$111122; RichDebug.Lines.add(s); + visible:=false; // invisible au démarrage + with VertScrollBar do + begin + Range:=785; // garantir l'apparition de la trackbar dans radStudio + visible:=true; + tracking:=true; + end; end; procedure TFormDebug.ButtonEcrLogClick(Sender: TObject); diff --git a/UnitPilote.dcu b/UnitPilote.dcu index 677e910..1053f29 100644 Binary files a/UnitPilote.dcu and b/UnitPilote.dcu differ diff --git a/UnitPrinc.dcu b/UnitPrinc.dcu index 0fcb230..f864be3 100644 Binary files a/UnitPrinc.dcu and b/UnitPrinc.dcu differ diff --git a/UnitPrinc.dfm b/UnitPrinc.dfm index d6748c5..91ed877 100644 --- a/UnitPrinc.dfm +++ b/UnitPrinc.dfm @@ -1,6 +1,6 @@ object FormPrinc: TFormPrinc - Left = 6 - Top = 203 + Left = 70 + Top = 187 Width = 1213 Height = 670 Caption = 'Client TCP-IP CDM Rail ou USB - syst'#232'me LENZ' @@ -1383,10 +1383,10 @@ object FormPrinc: TFormPrinc end object StaticText: TStaticText Left = 16 - Top = 571 + Top = 567 Width = 14 Height = 17 - Anchors = [akLeft, akRight, akBottom] + Anchors = [akLeft, akBottom] Caption = 'xx' TabOrder = 6 end @@ -1394,7 +1394,7 @@ object FormPrinc: TFormPrinc Left = 8 Top = 32 Width = 601 - Height = 535 + Height = 513 Anchors = [akLeft, akTop, akRight, akBottom] Color = clBlack Font.Charset = DEFAULT_CHARSET diff --git a/UnitPrinc.pas b/UnitPrinc.pas index 85f4988..a5bfdc0 100644 --- a/UnitPrinc.pas +++ b/UnitPrinc.pas @@ -346,7 +346,7 @@ var ack,portCommOuvert,traceTrames,AffMem,CDM_connecte,dupliqueEvt, Raz_Acc_signaux,AvecInit,AvecTCO,terminal,Srvc_Aig,Srvc_Det,Srvc_Act,MasqueBandeauTCO, - Srvc_PosTrain,Srvc_Sig,debugtrames,LayParParam, + Srvc_PosTrain,Srvc_Sig,debugtrames, Hors_tension2,traceSign,TraceZone,Ferme,parSocketLenz,ackCdm,PremierFD,doubleclic, NackCDM,MsgSim,succes,recu_cv,AffAigDet,Option_demarrage,AffTiers,AvecDemandeAiguillages, TraceListe,clignotant,nack,Maj_feux_cours,configNulle,LanceCDM,AvecInitAiguillages, @@ -360,7 +360,7 @@ var tablo : array of byte; // tableau rx usb - Enregistrement,chaine_Envoi,chaine_recue,Id_CDM,Af,version_Interface,entete,suffixe,LAY + Enregistrement,chaine_Envoi,chaine_recue,Id_CDM,Af,version_Interface,entete,suffixe : string; Ancien_detecteur : array[0..NbMemZone] of boolean; // anciens état des détecteurs et adresses des détecteurs et leur état @@ -546,6 +546,7 @@ end; // renvoie le 1er numéro de bit à 1 // PremBitNum(1)=0 // PremBitNum(4)=2 +// si pas de bit à 1, renvoie -1 Function PremBitNum(n : word) : integer; var i : integer; trouve : boolean; @@ -556,7 +557,7 @@ begin if not(trouve) then inc(i); n:=n shr 1; until (i=16) or trouve; - PremBitNum:=i; + if trouve then PremBitNum:=i else PremBitNum:=-1; end; // conversion du motif de bits (codebin) de la configuration du signal complexe en deux mots: @@ -564,7 +565,8 @@ end; // premierBit : code de la signalisation // Combine = code de la signalisation combinée // Exemple code_to_aspect(10001000000000) renvoie premierBit=jaune_cli (9) et Combine=rappel 60 (13) -procedure code_to_aspect(codebin : word;var premierbit,combine : word) ; +// si pas de combinaison, renvoie -1 +procedure code_to_aspect(codebin : word;var premierbit,combine : integer) ; begin premierBit:=PremBitNum(CodeBin and $3ff); combine:=PremBitNum(CodeBin and $fc00); @@ -573,7 +575,7 @@ end; // conversion d'un état signal binaire en état unique // exemple code_to_etat(10001000000000) (jaune_cli et rappel 60) renvoie 19 function code_to_etat(code : word) : integer; -var aspect,combine : word; +var aspect,combine : integer; begin code_to_aspect(code,aspect,combine); result:=9999; @@ -631,9 +633,9 @@ end; // orientation à donner au signal : 1= vertical 2=90° à gauche 3=90° à droite 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; + LgImage,HtImage,code,combine : integer; ech : real; - code,combine : word; + begin code_to_aspect(Etatsignal,code,combine); rayon:=round(6*frX); @@ -677,9 +679,9 @@ end; // dessine les feux sur une cible à 3 feux procedure dessine_feu3(Acanvas : Tcanvas;x,y : integer;frX,frY : real;EtatSignal : word;orientation : integer); var Temp,rayon,xSem,Ysem,xJaune,Yjaune,Xvert,Yvert, - LgImage,HtImage : integer; + LgImage,HtImage,code,combine : integer; ech : real; - code,combine : word; + begin code_to_aspect(Etatsignal,code,combine); rayon:=round(6*frX); @@ -727,9 +729,9 @@ end; // orientation=1 vertical procedure dessine_feu4(Acanvas : Tcanvas;x,y : integer;frX,frY : real;EtatSignal : word;orientation : integer); var Temp,rayon,xSem,Ysem,xJaune,Yjaune,Xcarre,Ycarre,Xvert,Yvert, - LgImage,HtImage : integer; + LgImage,HtImage,code,combine : integer; ech : real; - code,combine : word; + begin code_to_aspect(Etatsignal,code,combine); // et aspect rayon:=round(6*frX); @@ -788,9 +790,9 @@ end; // dessine les feux sur une cible à 5 feux procedure dessine_feu5(Acanvas : Tcanvas;x,y : integer;frX,frY : real;EtatSignal : word;orientation : integer); var XBlanc,Yblanc,xJaune,yJaune,Xsem,YSem,Xvert,YVert,Xcarre,Ycarre, - Temp,rayon,LgImage,HtImage : integer; + Temp,rayon,LgImage,HtImage,code,combine : integer; ech : real; - code,combine : word; + begin code_to_aspect(Etatsignal,code,combine); // et aspect rayon:=round(6*frX); @@ -857,9 +859,8 @@ end; // dessine les feux sur une cible à 7 feux procedure dessine_feu7(Acanvas : Tcanvas;x,y : integer;frX,frY : real;EtatSignal : word;orientation : integer); var XBlanc,Yblanc,xJaune,yJaune,Xsem,YSem,Xvert,YVert,Xcarre,Ycarre,Xral1,Yral1,Xral2,YRal2, - Temp,rayon,LgImage,HtImage : integer; + Temp,rayon,LgImage,HtImage,code,combine : integer; ech : real; - code,combine : word; begin code_to_aspect(Etatsignal,code,combine); // et combine rayon:=round(6*frX); @@ -943,9 +944,9 @@ procedure dessine_feu9(Acanvas : Tcanvas;x,y : integer;frX,frY : real;etatsignal var rayon, XBlanc,Yblanc,xJaune,yJaune,Xsem,YSem,Xvert,YVert,Xcarre,Ycarre,Xral1,Yral1,Xral2,YRal2, Xrap1,Yrap1,Xrap2,Yrap2,Temp : integer; - LgImage,HtImage,xt,yt : integer; + LgImage,HtImage,xt,yt,code,combine : integer; ech : real; - code,combine : word; + begin rayon:=round(6*frX); code_to_aspect(Etatsignal,code,combine); // et aspect @@ -1791,16 +1792,19 @@ end; // renvoie la chaîne de l'état du signal function chaine_signal(etat : word) : string; -var aspect,combine : word; +var aspect,combine : integer; s : string; begin code_to_aspect(etat,aspect,combine); s:=''; - if aspect=16 then s:='' else s:=etatSign[aspect]; + if (aspect=16) then s:='' else begin if aspect<>-1 then s:=etatSign[aspect];end; if combine<>16 then begin - if aspect<>16 then s:=s+'+'; - s:=s+etatSign[combine]; + if (aspect<>16) and (combine<>-1) then + begin + if aspect<>-1 then s:=s+'+'; + s:=s+etatSign[combine]; + end; end; chaine_signal:=s; end; @@ -1977,7 +1981,7 @@ envoie les donn ===========================================================================*} procedure envoi_CDF(adresse : integer); var - code,aspect,combine : word; + code,aspect,combine : integer; i : integer; s : string; begin @@ -2051,7 +2055,7 @@ end; envoie les données au décodeur LEB ===========================================================================*} procedure envoi_LEB(adresse : integer); -var code,aspect,combine : word; +var code,aspect,combine : integer; index : integer; s : string; procedure envoi5_LEB(selection :byte); @@ -2142,7 +2146,7 @@ envoie les donn /*===========================================================================*) procedure envoi_NMRA(adresse: integer); var valeur,i : integer ; - aspect,combine,code : word; + aspect,combine,code : integer; s : string; begin i:=index_feu(adresse); @@ -2190,7 +2194,7 @@ end; procedure envoi_UniSemaf(adresse: integer); var modele,index: integer ; s : string; - code,aspect,combine : word; + code,aspect,combine : integer; begin index:=Index_feu(adresse); // tranforme l'adresse du feu en index tableau @@ -2703,7 +2707,7 @@ envoie les donn Le mode 2 permet la commande de signaux de plus de 4 feux ===========================================================================} procedure envoi_LDT(adresse : integer); -var code,aspect,combine,mode : word; +var code,aspect,combine,mode : integer; i : integer; s : string; begin @@ -2754,7 +2758,7 @@ end; procedure envoi_virtuel(adresse : integer); var - combine,aspect,code : word; + combine,aspect,code : integer; i : integer; s : string; begin @@ -2777,7 +2781,7 @@ envoie les donn Ici on met le bit 1 à 1 (état "vert" du programme hexmanipu ===========================================================================*) procedure envoi_signalBahn(adresse : integer); -var aspect,code,combine : word; +var aspect,code,combine : integer; ralrap, jau ,Ancralrap,Ancjau : boolean; i : integer; s : string; @@ -3038,6 +3042,7 @@ begin //affiche('index2='+IntToSTR(index2_det),clWhite); end; +// trouve le détecteur dans les branches (branche_trouve, Indexbranche_trouve) // si pas trouvé, IndexBranche_trouve=0 procedure trouve_detecteur(detecteur : integer); var NBranche,i : integer; @@ -3265,6 +3270,7 @@ begin suivant_alg3:=9999; exit; end; + if (aiguillage[index].modele=aig) and (Bt=aig) then // aiguillage normal begin // aiguillage index (adr) pris en pointe @@ -3281,12 +3287,18 @@ begin Aprec:=a; A:=aiguillage[index].AdroitB; Adr:=aiguillage[index].Adroit; - if A='Z' then TypeEl:=det else TypeEL:=aig; //TypeEL=(1=détécteur 2=aig - trouve_element(adr,typeEl,1); // branche_trouve IndexBranche_trouve - typeGen:=BrancheN[branche_trouve,IndexBranche_trouve].Btype; + if adr<>0 then + begin + if A='Z' then TypeEl:=det else TypeEL:=aig; //TypeEL=(1=détécteur 2=aig + trouve_element(adr,typeEl,1); // branche_trouve IndexBranche_trouve + typeGen:=BrancheN[branche_trouve,IndexBranche_trouve].Btype; + end + else + typeGen:=buttoir; suivant_alg3:=adr; exit; end; + if aiguillage[index].position=const_devie then begin if NivDebug=3 then AfficheDebug('133 - aiguillage '+intToSTR(Adr)+' Pris en pointe dévié',clyellow); @@ -3306,12 +3318,17 @@ begin Aprec:=A; A:=aiguillage[index].AdevieB; Adr:=aiguillage[index].Adevie; - if A='Z' then TypeEl:=det else TypeEL:=aig; //TypeEL=(1=détécteur 2=aig - trouve_element(adr,TypeEl,1); // branche_trouve IndexBranche_trouve - typeGen:=BrancheN[branche_trouve,IndexBranche_trouve].Btype; + if adr<>0 then + begin + if A='Z' then TypeEl:=det else TypeEL:=aig; //TypeEL=(1=détécteur 2=aig + trouve_element(adr,TypeEl,1); // branche_trouve IndexBranche_trouve + typeGen:=BrancheN[branche_trouve,IndexBranche_trouve].Btype; + end + else typeGen:=buttoir; suivant_alg3:=adr; exit; end; + if aiguillage[index].position=const_inconnu then begin if NivDebug>=1 then @@ -3376,10 +3393,14 @@ begin APrec:=A; A:=aiguillage[index].ApointeB; Adr:=aiguillage[index].Apointe; - // Affiche('trouvé '+intToSTR(adr),clyellow); - if A='Z' then TypeEl:=det else TypeEL:=aig; //TypeEL=(1=détécteur 2=aig - trouve_element(adr,TypeEl,1); // branche_trouve IndexBranche_trouve - typeGen:=BrancheN[branche_trouve,IndexBranche_trouve].Btype; + if adr<>0 then + begin + // Affiche('trouvé '+intToSTR(adr),clyellow); + if A='Z' then TypeEl:=det else TypeEL:=aig; //TypeEL=(1=détécteur 2=aig + trouve_element(adr,TypeEl,1); // branche_trouve IndexBranche_trouve + typeGen:=BrancheN[branche_trouve,IndexBranche_trouve].Btype; + end + else TypeGen:=Buttoir; suivant_alg3:=adr; exit; end; @@ -4944,7 +4965,7 @@ end; // Dans AdresseFeuSuivant : adresse du feu suivant (variable globale) function etat_signal_suivant(adresse,rang : integer) : integer ; var num_feu,etat,AdrFeu,i,j,prec,AdrSuiv,index2,voie : integer; - aspect,combine : word; + aspect,combine : integer; TypePrec,TypeActuel : TEquipement; s : string; begin @@ -5047,9 +5068,15 @@ begin // oui inc(num_feu); Etat:=feux[index_feu(AdrFeu)].EtatSignal; - code_to_aspect(Etat,aspect,combine); + code_to_aspect(Etat,aspect,combine); Signal_suivant:=AdrFeu; - if NivDebug=3 then AfficheDebug('Trouvé feu suivant Adr='+IntToSTR(AdrFeu)+': '+IntToSTR(etat)+'='+EtatSign[aspect]+' '+EtatSign[combine],clorange); + if NivDebug=3 then + begin + s:='Trouvé feu suivant Adr='+IntToSTR(AdrFeu)+': '+IntToSTR(etat)+'='; + if aspect<>-1 then s:=s+EtatSign[aspect]+' '; + if combine<>-1 then s:=s+EtatSign[combine]; + AfficheDebug(s,clorange); + end; end else begin @@ -5071,8 +5098,13 @@ begin Etat:=feux[index_feu(AdrFeu)].EtatSignal; code_to_aspect(Etat,aspect,combine); Signal_suivant:=AdrFeu; - if NivDebug=3 then AfficheDebug('Sur même détecteur, trouvé feu2 suivant Adr='+IntToSTR(AdrFeu)+': '+IntToSTR(etat)+'='+EtatSign[aspect]+' '+EtatSign[combine],clorange); - + if NivDebug=3 then + begin + s:=IntToSTR(AdrFeu)+': '+IntToSTR(etat)+'='; + if aspect<>-1 then s:=s+EtatSign[aspect]+' '; + if combine<>-1 then s:=s+EtatSign[combine]; + AfficheDebug('Sur même détecteur, trouvé feu2 suivant Adr='+s,clorange); + end; end else begin @@ -5587,7 +5619,7 @@ end; procedure Maj_Feu(Adrfeu : integer); var Adr_det,etat,Aig,Adr_El_Suiv,modele,index,IndexAig : integer ; PresTrain,Aff_semaphore,car : boolean; - code,combine : word; + code,combine : integer; Btype_el_suivant : TEquipement; s : string; begin @@ -5621,8 +5653,9 @@ begin begin code_to_aspect(etat,code,combine); s:='Etat_signal_suivant ('+intToSTR(AdresseFeuSuivant)+') est '; - s:=s+' à '+etatSign[code]; - if Combine<>0 then s:=s+' + '+etatSign[combine]; + s:=s+' à '; + if code<>-1 then s:=s+etatSign[code]; + if (Combine<>0) and (combine<>-1) then s:=s+' + '+etatSign[combine]; AfficheDebug(s,clyellow); end; @@ -7254,7 +7287,8 @@ begin exit; end; - if lay<>'' then s:='-f '+lay else s:=''; + //if lay<>'' then s:='-f '+lay else s:=''; + s:=''; cdm_lanceLoc:=false; // lancement depuis le répertoire 32 bits d'un OS64 @@ -7266,7 +7300,7 @@ begin if retour>32 then begin cdm_lanceLoc:=true; - Affiche('Lancement de CDM 64 '+lay,clyellow); + Affiche('Lancement de CDM 64 ',clyellow); end; if not(cdm_lanceLoc) then @@ -7283,12 +7317,12 @@ begin lance_CDM:=false;exit; end; cdm_lanceLoc:=true; - Affiche('Lancement de CDM 32 '+lay,clyellow); + Affiche('Lancement de CDM 32 ',clyellow); end; if cdm_lanceLoc then begin - Formprinc.caption:=af+' - '+lay; + Formprinc.caption:=af; // On a lancé CDM, déconnecter l'USB deconnecte_USB; Affiche('lance les fonctions automatiques de CDM',clyellow); @@ -7453,7 +7487,13 @@ begin AvecInit:=true; //&&&& avec initialisation des aiguillages ou pas Option_demarrage:=false; // démarrage des trains après tempo, pas encore au point Diffusion:=AvecInit; // mode diffusion publique - + // pour Rad studio------------------------ + FenRich.Height:=Height-150; + ScrollBox1.Height:=Height-280; + StaticText.AutoSize:=true; + StaticText.Top:=FenRich.Height+FenRich.Top+10; + //---------------------------------------- + // créée la fenetre vérification de version FormVersion:=TformVersion.Create(Self); @@ -9320,7 +9360,7 @@ end; procedure TFormPrinc.Etatdessignaux1Click(Sender: TObject); var Adr,etat,i : integer; - aspect,combine : word; + aspect,combine : integer; s : string; begin for i:=1 to NbreFeux do @@ -9329,7 +9369,9 @@ begin Etat:=Feux[i].EtatSignal; s:='Signal '+IntToSTR(Adr)+' Etat='; code_to_aspect(Etat,aspect,combine); - s:=s+IntToSTR(etat)+'='+EtatSign[aspect]+' '+EtatSign[combine]; + s:=s+IntToSTR(etat)+'='; + if aspect<>-1 then s:=s+EtatSign[aspect]; + if combine<>-1 then s:=s+' '+EtatSign[combine]; Affiche(s,clYellow); end; end; diff --git a/UnitSR.dcu b/UnitSR.dcu index 253345c..a898380 100644 Binary files a/UnitSR.dcu and b/UnitSR.dcu differ diff --git a/UnitSR.dfm b/UnitSR.dfm index 67cd4b8..1ddaa62 100644 --- a/UnitSR.dfm +++ b/UnitSR.dfm @@ -513,6 +513,7 @@ object FormSR: TFormSR Top = 48 Width = 145 Height = 21 + Style = csDropDownList ItemHeight = 13 TabOrder = 0 OnChange = ComboBoxAdr1Change @@ -522,6 +523,7 @@ object FormSR: TFormSR Top = 72 Width = 145 Height = 21 + Style = csDropDownList ItemHeight = 13 TabOrder = 1 OnChange = ComboBoxAdr2Change @@ -531,6 +533,7 @@ object FormSR: TFormSR Top = 104 Width = 145 Height = 21 + Style = csDropDownList ItemHeight = 13 TabOrder = 2 OnChange = ComboBoxAdr3Change @@ -540,6 +543,7 @@ object FormSR: TFormSR Top = 128 Width = 145 Height = 21 + Style = csDropDownList ItemHeight = 13 TabOrder = 3 OnChange = ComboBoxAdr4Change @@ -549,6 +553,7 @@ object FormSR: TFormSR Top = 168 Width = 145 Height = 21 + Style = csDropDownList ItemHeight = 13 TabOrder = 4 OnChange = ComboBoxAdr5Change @@ -558,6 +563,7 @@ object FormSR: TFormSR Top = 192 Width = 145 Height = 21 + Style = csDropDownList ItemHeight = 13 TabOrder = 5 OnChange = ComboBoxAdr6Change @@ -567,6 +573,7 @@ object FormSR: TFormSR Top = 224 Width = 145 Height = 21 + Style = csDropDownList ItemHeight = 13 TabOrder = 6 OnChange = ComboBoxAdr7Change @@ -576,6 +583,7 @@ object FormSR: TFormSR Top = 248 Width = 145 Height = 21 + Style = csDropDownList ItemHeight = 13 TabOrder = 7 OnChange = ComboBoxAdr8Change @@ -585,6 +593,7 @@ object FormSR: TFormSR Top = 280 Width = 145 Height = 21 + Style = csDropDownList ItemHeight = 13 TabOrder = 8 OnChange = ComboBoxAdr9Change @@ -594,6 +603,7 @@ object FormSR: TFormSR Top = 304 Width = 145 Height = 21 + Style = csDropDownList ItemHeight = 13 TabOrder = 9 OnChange = ComboBoxAdr10Change @@ -603,6 +613,7 @@ object FormSR: TFormSR Top = 336 Width = 145 Height = 21 + Style = csDropDownList ItemHeight = 13 TabOrder = 10 OnChange = ComboBoxAdr11Change @@ -612,6 +623,7 @@ object FormSR: TFormSR Top = 360 Width = 145 Height = 21 + Style = csDropDownList ItemHeight = 13 TabOrder = 11 OnChange = ComboBoxAdr12Change @@ -621,6 +633,7 @@ object FormSR: TFormSR Top = 392 Width = 145 Height = 21 + Style = csDropDownList ItemHeight = 13 TabOrder = 12 OnChange = ComboBoxAdr13Change @@ -630,6 +643,7 @@ object FormSR: TFormSR Top = 416 Width = 145 Height = 21 + Style = csDropDownList ItemHeight = 13 TabOrder = 13 OnChange = ComboBoxAdr14Change @@ -639,6 +653,7 @@ object FormSR: TFormSR Top = 456 Width = 145 Height = 21 + Style = csDropDownList ItemHeight = 13 TabOrder = 14 OnChange = ComboBoxAdr15Change @@ -648,6 +663,7 @@ object FormSR: TFormSR Top = 480 Width = 145 Height = 21 + Style = csDropDownList ItemHeight = 13 TabOrder = 15 OnChange = ComboBoxAdr16Change diff --git a/UnitSimule.dcu b/UnitSimule.dcu index 0040455..0d7f306 100644 Binary files a/UnitSimule.dcu and b/UnitSimule.dcu differ diff --git a/UnitTCO.dcu b/UnitTCO.dcu index 49a1932..d005370 100644 Binary files a/UnitTCO.dcu and b/UnitTCO.dcu differ diff --git a/UnitTCO.pas b/UnitTCO.pas index 1bc7c19..275a5dd 100644 --- a/UnitTCO.pas +++ b/UnitTCO.pas @@ -3654,6 +3654,7 @@ begin VK_left : if XClicCell>1 then dec(XClicCell); VK_down : if YClicCell1 then dec(YClicCell); + VK_delete : affiche('delete',clorange); end; LabelX.caption:=IntToSTR(XClicCell); LabelY.caption:=IntToSTR(YClicCell); diff --git a/Unit_Pilote_aig.dcu b/Unit_Pilote_aig.dcu index 763d2df..5bad6e3 100644 Binary files a/Unit_Pilote_aig.dcu and b/Unit_Pilote_aig.dcu differ diff --git a/verif_version.dcu b/verif_version.dcu index d795b47..a69e0e2 100644 Binary files a/verif_version.dcu and b/verif_version.dcu differ diff --git a/verif_version.pas b/verif_version.pas index 87e904f..b7f0b96 100644 --- a/verif_version.pas +++ b/verif_version.pas @@ -23,7 +23,7 @@ var Lance_verif : integer; verifVersion,notificationVersion : boolean; -Const Version='4.71'; // sert à la comparaison de la version publiée +Const Version='4.72'; // sert à la comparaison de la version publiée SousVersion=' '; // en cas d'absence de sous version mettre un espace implementation diff --git a/versions.txt b/versions.txt index 4244e06..ea409bd 100644 --- a/versions.txt +++ b/versions.txt @@ -120,8 +120,9 @@ version 4.6 : Correction TJD 2/4 Gestion des panneaux directionnels dans le TCO. version 4.7 : Réorganisation du menu et du panneau de configuration des cellules du TCO. Amélioration du séquenceur de connexion à l'interface. - version 4.71 : Correction bug décodage trame actionneur de CDM +version 4.72 : Renforcement de la vérification de la configuration. +