This commit is contained in:
f1iwq2
2025-11-06 18:07:27 +01:00
parent 2ef4c7b07a
commit f806646a5d
9 changed files with 129 additions and 44 deletions
+1
View File
@@ -66,6 +66,7 @@ var
Scompteur : TTCompteur; // Scompteur : associé à grande fenetre compteur Scompteur : TTCompteur; // Scompteur : associé à grande fenetre compteur
ParamCompteur : array[1..3] of record ParamCompteur : array[1..3] of record
coulAig,coulGrad,CoulNum,CoulFond,CoulArc : tcolor; coulAig,coulGrad,CoulNum,CoulFond,CoulArc : tcolor;
increment : integer; // incrément rapide
end; end;
VerrouilleCompteur,affTrainCompteur,VitCrans : boolean; VerrouilleCompteur,affTrainCompteur,VitCrans : boolean;
+21 -5
View File
@@ -1573,7 +1573,7 @@ object FormConfig: TFormConfig
Top = 8 Top = 8
Width = 633 Width = 633
Height = 505 Height = 505
ActivePage = TabSheetSig ActivePage = TabSheetCompt
Font.Charset = DEFAULT_CHARSET Font.Charset = DEFAULT_CHARSET
Font.Color = clBlack Font.Color = clBlack
Font.Height = -11 Font.Height = -11
@@ -3332,7 +3332,7 @@ object FormConfig: TFormConfig
Width = 137 Width = 137
Height = 21 Height = 21
Style = csDropDownList Style = csDropDownList
ItemHeight = 13 ItemHeight = 0
TabOrder = 1 TabOrder = 1
OnChange = ComboBoxDecChange OnChange = ComboBoxDecChange
end end
@@ -3463,7 +3463,7 @@ object FormConfig: TFormConfig
Width = 137 Width = 137
Height = 21 Height = 21
Style = csDropDownList Style = csDropDownList
ItemHeight = 13 ItemHeight = 0
TabOrder = 2 TabOrder = 2
OnChange = ComboBoxAspChange OnChange = ComboBoxAspChange
end end
@@ -5692,7 +5692,7 @@ object FormConfig: TFormConfig
Left = 312 Left = 312
Top = 72 Top = 72
Width = 249 Width = 249
Height = 265 Height = 289
Caption = 'Param'#232'tres de couleur' Caption = 'Param'#232'tres de couleur'
TabOrder = 0 TabOrder = 0
object Label76: TLabel object Label76: TLabel
@@ -5806,6 +5806,22 @@ object FormConfig: TFormConfig
Height = 265 Height = 265
end end
end end
object LabeledEditCr: TLabeledEdit
Left = 152
Top = 424
Width = 33
Height = 21
Hint = 'Valeur de l'#39'incr'#233'ment en crans de vitesse (1-6)'
EditLabel.Width = 98
EditLabel.Height = 13
EditLabel.Caption = 'Incr'#233'ment de vitesse'
LabelPosition = lpLeft
LabelSpacing = 10
ParentShowHint = False
ShowHint = True
TabOrder = 2
OnChange = LabeledEditCrChange
end
end end
object TabSheetPeriph: TTabSheet object TabSheetPeriph: TTabSheet
Caption = 'P'#233'riph'#233'riques' Caption = 'P'#233'riph'#233'riques'
@@ -6092,7 +6108,7 @@ object FormConfig: TFormConfig
Top = 328 Top = 328
Width = 329 Width = 329
Height = 110 Height = 110
Hint = 'R'#233'f'#233'rences crois'#233'es de l'#39#39'utilisation des p'#233'riph'#233'riques' Hint = 'R'#233'f'#233'rences crois'#233'es de l'#39'utilisation des p'#233'riph'#233'riques'
ParentShowHint = False ParentShowHint = False
ReadOnly = True ReadOnly = True
ShowHint = True ShowHint = True
+54 -12
View File
@@ -512,6 +512,7 @@ type
LabeledEditZone: TLabeledEdit; LabeledEditZone: TLabeledEdit;
EditTempoSig: TEdit; EditTempoSig: TEdit;
Label15: TLabel; Label15: TLabel;
LabeledEditCr: TLabeledEdit;
procedure ButtonAppliquerEtFermerClick(Sender: TObject); procedure ButtonAppliquerEtFermerClick(Sender: TObject);
procedure FormCreate(Sender: TObject); procedure FormCreate(Sender: TObject);
procedure ListBoxAigMouseDown(Sender: TObject; Button: TMouseButton; procedure ListBoxAigMouseDown(Sender: TObject; Button: TMouseButton;
@@ -812,6 +813,7 @@ type
procedure LabeledEditVit3Change(Sender: TObject); procedure LabeledEditVit3Change(Sender: TObject);
procedure LabeledEditZoneChange(Sender: TObject); procedure LabeledEditZoneChange(Sender: TObject);
procedure EditTempoSigChange(Sender: TObject); procedure EditTempoSigChange(Sender: TObject);
procedure LabeledEditCrChange(Sender: TObject);
private private
{ Déclarations privées } { Déclarations privées }
@@ -1247,7 +1249,8 @@ begin
delete(s,1,i); delete(s,1,i);
val(s,vitesse,i); val(s,vitesse,i);
if (vitesse<>300) and (vitesse<>1200) and (vitesse<>2400) and (vitesse<>4800) and (vitesse<>9600) and if (vitesse<>300) and (vitesse<>1200) and (vitesse<>2400) and (vitesse<>4800) and (vitesse<>9600) and
(vitesse<>19200) and (vitesse<>38400) and (vitesse<>57600) and (vitesse<>115200) and (vitesse<>128000) and (vitesse<>256000) then (vitesse<>19200) and (vitesse<>38400) and (vitesse<>57600) and (vitesse<>115200) and (vitesse<>128000) and
(vitesse<>230400) and (vitesse<>256000) then
begin begin
Affiche('Vitesse COM ('+intToSTR(vitesse)+') incorrecte',clred); Affiche('Vitesse COM ('+intToSTR(vitesse)+') incorrecte',clred);
result:=false; result:=false;
@@ -1629,6 +1632,8 @@ begin
begin begin
inc(NbreSignaux); inc(NbreSignaux);
Signaux[i].adresse:=adresse; Signaux[i].adresse:=adresse;
Signaux[i].AncienEtat:=$ffff;
Signaux[i].AncienAff:=$ffff;
Signaux[i].Tempo:=0; Signaux[i].Tempo:=0;
tablo_Index_Signal[adresse]:=i; // stocker l'index provisoire avant tri tablo_Index_Signal[adresse]:=i; // stocker l'index provisoire avant tri
j:=pos(',',s); j:=pos(',',s);
@@ -2692,7 +2697,7 @@ begin
writeln(fichierN,'Numeros='+intToHex(ParamCompteur[i].coulNum,6)); writeln(fichierN,'Numeros='+intToHex(ParamCompteur[i].coulNum,6));
writeln(fichierN,'Fond='+intToHex(ParamCompteur[i].coulFond,6)); writeln(fichierN,'Fond='+intToHex(ParamCompteur[i].coulFond,6));
writeln(fichierN,'Arc='+intToHex(ParamCompteur[i].coulArc,6)); writeln(fichierN,'Arc='+intToHex(ParamCompteur[i].coulArc,6));
writeln(fichierN,'Increment='+intToSTR(ParamCompteur[i].increment));
end; end;
writeln(fichierN,'0'); writeln(fichierN,'0');
@@ -5136,9 +5141,11 @@ const LessThanValue=-1;
lit_ligne; lit_ligne;
if s<>'0' then if s<>'0' then
begin begin
lit_ligne; if pos('=',s)=0 then lit_ligne;
i:=pos('=',s); i:=pos('=',s);
delete(s,1,i); delete(s,1,i);
val('$'+s,j,erreur); val('$'+s,j,erreur);
ParamCompteur[n].coulAig:=j; ParamCompteur[n].coulAig:=j;
@@ -5165,6 +5172,17 @@ const LessThanValue=-1;
delete(s,1,i); delete(s,1,i);
val('$'+s,j,erreur); val('$'+s,j,erreur);
ParamCompteur[n].coulArc:=j; ParamCompteur[n].coulArc:=j;
lit_ligne;
i:=pos('=',s);
if i<>0 then
begin
delete(s,1,i);
val('$'+s,j,erreur);
if (j<1) or (j>6) then j:=3;
ParamCompteur[n].increment:=j;
end;
end; end;
inc(n); inc(n);
until (sOrigine='0') or (s='') or (n>=10); until (sOrigine='0') or (s='') or (n>=10);
@@ -8696,6 +8714,7 @@ begin
// compteurs // compteurs
ComboBoxCompt.ItemIndex:=0; ComboBoxCompt.ItemIndex:=0;
LabeledEditCr.Text:=intToSTR(paramCompteur[1].increment);
FbmcompC:=Tbitmap.create; FbmcompC:=Tbitmap.create;
init_compteur(1,ImageCtC); init_compteur(1,ImageCtC);
@@ -11032,7 +11051,7 @@ begin
end; end;
if ss='' then exit; if ss='' then exit;
s:='Voulez-vous supprimer '; s:='Voulez vous supprimer ';
if n=1 then s:=s+' l''action ' else s:=s+' les actions '; if n=1 then s:=s+' l''action ' else s:=s+' les actions ';
s:=s+ss+' ?'; s:=s+ss+' ?';
@@ -11098,7 +11117,7 @@ begin
end; end;
if ss='' then exit; if ss='' then exit;
s:='Voulez-vous supprimer'; s:='Voulez vous supprimer';
if n=1 then s:=s+' le PN ' else s:=s+' les PNs '; if n=1 then s:=s+' le PN ' else s:=s+' les PNs ';
s:=s+ss+' ?'; s:=s+ss+' ?';
@@ -11248,6 +11267,7 @@ begin
Signaux[i].Aspect:=3; Signaux[i].Aspect:=3;
Signaux[i].decodeur:=0; Signaux[i].decodeur:=0;
Signaux[i].verrouCarre:=false; Signaux[i].verrouCarre:=false;
Signaux[i].EtatSignal:=$ffff;
Signaux[i].SR[1].sortie0:=1; Signaux[i].SR[1].sortie0:=1;
Signaux[i].SR[1].sortie1:=6; Signaux[i].SR[1].sortie1:=6;
Signaux[i].SR[2].sortie0:=2; Signaux[i].SR[2].sortie0:=2;
@@ -11311,7 +11331,7 @@ begin
end; end;
if ss='' then exit; if ss='' then exit;
s:='Voulez-vous supprimer '; s:='Voulez vous supprimer';
if n=1 then s:=s+' le signal ' else s:=s+' les signaux '; if n=1 then s:=s+' le signal ' else s:=s+' les signaux ';
s:=s+ss+' ?'; s:=s+ss+' ?';
@@ -12863,7 +12883,7 @@ begin
end; end;
if ss='' then exit; if ss='' then exit;
s:='Voulez-vous supprimer '; s:='Voulez vous supprimer ';
if n=1 then s:=s+' l''aiguillage ' else s:=s+' les aiguillages '; if n=1 then s:=s+' l''aiguillage ' else s:=s+' les aiguillages ';
s:=s+ss+' ?'; s:=s+ss+' ?';
@@ -14539,7 +14559,7 @@ begin
end; end;
if ss='' then exit; if ss='' then exit;
s:='Voulez-vous supprimer '; s:='Voulez vous supprimer ';
if n=1 then s:=s+' le train ' else s:=s+' les trains '; if n=1 then s:=s+' le train ' else s:=s+' les trains ';
s:=s+ss+' ?'; s:=s+ss+' ?';
@@ -15572,7 +15592,7 @@ begin
end; end;
if ss='' then exit; if ss='' then exit;
s:='Voulez-vous supprimer'; s:='Voulez vous supprimer';
if n=1 then s:=s+' le périphérique ' else s:=s+' les périphériques '; if n=1 then s:=s+' le périphérique ' else s:=s+' les périphériques ';
s:=s+ss+' ?'+#13; s:=s+ss+' ?'+#13;
@@ -16881,7 +16901,7 @@ begin
if Nactionneurs<>0 then if Nactionneurs<>0 then
begin begin
j:=MessageDlg('Voulez-vous supprimer les actionneurs existants?' j:=MessageDlg('Voulez vous supprimer les actionneurs existants?'
,mtConfirmation,[mbNo,mbYes],0) ; ,mtConfirmation,[mbNo,mbYes],0) ;
if j=mrNo then exit; if j=mrNo then exit;
end; end;
@@ -16937,7 +16957,7 @@ begin
end; end;
if ss='' then exit; if ss='' then exit;
s:='Voulez-vous supprimer '; s:='Voulez vous supprimer ';
if n=1 then s:=s+' le détecteur ' else s:=s+' les détecteurs '; if n=1 then s:=s+' le détecteur ' else s:=s+' les détecteurs ';
s:=s+ss+' ?'; s:=s+ss+' ?';
@@ -16998,7 +17018,7 @@ begin
end; end;
if ss='' then exit; if ss='' then exit;
s:='Voulez-vous supprimer '; s:='Voulez vous supprimer ';
if n=1 then s:=s+' l''actionneur ' else s:=s+' les actionneurs '; if n=1 then s:=s+' l''actionneur ' else s:=s+' les actionneurs ';
s:=s+ss+' ?'; s:=s+ss+' ?';
@@ -19789,6 +19809,28 @@ begin
calcul_equations_coeff(ligneclicTrain+1); calcul_equations_coeff(ligneclicTrain+1);
end; end;
procedure TFormConfig.LabeledEditCrChange(Sender: TObject);
var i,erreur : integer;
begin
val(LabeledEditCr.Text,i,erreur);
if erreur=0 then
begin
LabelErreur.caption:='';
if (i>0) and (i<7) then
begin
paramCompteur[1].increment:=i;
paramCompteur[2].increment:=i;
paramCompteur[3].increment:=i;
end
else
begin
LabelErreur.caption:='Hors limites';
exit;
end;
end;
end;
end. end.
+3 -3
View File
@@ -60,7 +60,7 @@ object FormModifAction: TFormModifAction
Top = 64 Top = 64
Width = 729 Width = 729
Height = 337 Height = 337
ActivePage = TabSheetOp ActivePage = TabSheetDecl
MultiLine = True MultiLine = True
TabOrder = 1 TabOrder = 1
object TabSheetDecl: TTabSheet object TabSheetDecl: TTabSheet
@@ -517,7 +517,7 @@ object FormModifAction: TFormModifAction
Top = 32 Top = 32
Width = 217 Width = 217
Height = 21 Height = 21
ItemHeight = 13 ItemHeight = 0
TabOrder = 0 TabOrder = 0
OnChange = ComboBoxFamilleChange OnChange = ComboBoxFamilleChange
end end
@@ -721,7 +721,7 @@ object FormModifAction: TFormModifAction
Height = 21 Height = 21
Hint = 'Nom du p'#233'riph'#233'rique d'#233'fini dans l'#39'onglet "p'#233'riph'#233'riques COM/USB"' Hint = 'Nom du p'#233'riph'#233'rique d'#233'fini dans l'#39'onglet "p'#233'riph'#233'riques COM/USB"'
Style = csDropDownList Style = csDropDownList
ItemHeight = 13 ItemHeight = 0
ParentShowHint = False ParentShowHint = False
ShowHint = True ShowHint = True
TabOrder = 4 TabOrder = 4
+7 -2
View File
@@ -810,6 +810,7 @@ begin
EditTrainDecl.Hint:='Chaîne ASCII'; EditTrainDecl.Hint:='Chaîne ASCII';
LabelTrain.visible:=true; LabelTrain.visible:=true;
labelTrain.Width:=105;
LabelTrain.Caption:='Commande du périphérique'; LabelTrain.Caption:='Commande du périphérique';
RichEditInf.Lines.Add('Déclenchement par chaîne ASCII depuis un périphérique COM/USB - Socket'); RichEditInf.Lines.Add('Déclenchement par chaîne ASCII depuis un périphérique COM/USB - Socket');
@@ -922,6 +923,8 @@ begin
EditTrainDecl.Visible:=true; EditTrainDecl.Visible:=true;
EdittrainDecl.Hint:='Train déclencheur unique'; EdittrainDecl.Hint:='Train déclencheur unique';
EditTrainDecl.Text:=Tablo_Action[index].trainDecl; EditTrainDecl.Text:=Tablo_Action[index].trainDecl;
labelTrain.Width:=105;
labelTrain.caption:='Train déclencheur';
EditAdr.Text:=IntToSTR(Tablo_Action[index].adresse); EditAdr.Text:=IntToSTR(Tablo_Action[index].adresse);
RichEditInf.Lines.Add('Déclenchement par démarrage d''un train'); RichEditInf.Lines.Add('Déclenchement par démarrage d''un train');
ImageIcone.Picture:=nil; ImageIcone.Picture:=nil;
@@ -933,8 +936,10 @@ begin
begin begin
LabelTrain.visible:=true; LabelTrain.visible:=true;
EditTrainDecl.Visible:=true; EditTrainDecl.Visible:=true;
labelTrain.caption:='Train déclencheur';
EdittrainDecl.Hint:='Train déclencheur unique'; EdittrainDecl.Hint:='Train déclencheur unique';
EditTrainDecl.Text:=Tablo_Action[index].trainDecl; EditTrainDecl.Text:=Tablo_Action[index].trainDecl;
labelTrain.Width:=105;
EditAdr.Text:=IntToSTR(Tablo_Action[index].adresse); EditAdr.Text:=IntToSTR(Tablo_Action[index].adresse);
RichEditInf.Lines.Add('Déclenchement par arrêt d''un train'); RichEditInf.Lines.Add('Déclenchement par arrêt d''un train');
ImageIcone.Picture:=nil; ImageIcone.Picture:=nil;
@@ -978,8 +983,8 @@ begin
DeclClavier : DeclClavier :
begin begin
LabelAdresse.Visible:=true; // numéro de fonction LabelAdresse.Visible:=true; // numéro de fonction
LabelAdresse.caption:='Code de touche'; LabelAdresse.caption:='Code ASCII de la touche';
EditAdr.Hint:='Code de touche'; EditAdr.Hint:='Code ASCII de la touche';
ButtonFonction.Visible:=false; ButtonFonction.Visible:=false;
EditAdr.Text:=IntToSTR(tablo_action[index].adresse); EditAdr.Text:=IntToSTR(tablo_action[index].adresse);
EditAdr.Visible:=true; EditAdr.Visible:=true;
+3 -3
View File
@@ -1,6 +1,6 @@
object FormPrinc: TFormPrinc object FormPrinc: TFormPrinc
Left = 330 Left = 272
Top = 216 Top = 402
Anchors = [akLeft, akTop, akRight] Anchors = [akLeft, akTop, akRight]
BorderStyle = bsNone BorderStyle = bsNone
Caption = 'Signaux complexes' Caption = 'Signaux complexes'
@@ -5965,7 +5965,7 @@ object FormPrinc: TFormPrinc
Top = 200 Top = 200
Width = 393 Width = 393
Height = 265 Height = 265
ActivePage = TabSheetSig ActivePage = TabSheetComp
Anchors = [] Anchors = []
TabOrder = 5 TabOrder = 5
OnChange = PageControlChange OnChange = PageControlChange
+27 -13
View File
@@ -103,17 +103,16 @@ uses
, psAPI // GetModuleFileNameEx , psAPI // GetModuleFileNameEx
{$IF CompilerVersion >= 28.0} // si delphi>=12 {$IF CompilerVersion >= 28.0} // si Delphi>=13
,Vcl.Themes // pour les thèmes d'affichage (auric etc) ,Vcl.Themes // pour les thèmes d'affichage (auric etc)
,Vcl.Styles.Ext // styles étendus ,Vcl.Styles.Ext // styles étendus
,AdPort, OoMisc // AsyncPro pour COM/USB ,AdPort, OoMisc // AsyncPro pour COM/USB
,idGlobal // pour utiliser tidBytes ,idGlobal // pour utiliser tidBytes
{$ELSE} {$ELSE} // si Delphi 7
,MSCommLib_TLB // TMSComm pour COM/USB ,MSCommLib_TLB // TMSComm pour COM/USB
{$IFEND} {$IFEND}
; ;
type type
TFormPrinc = class(TForm) TFormPrinc = class(TForm)
Timer1: TTimer; Timer1: TTimer;
@@ -838,7 +837,7 @@ TparamCompt=record
Raig, // rayon aiguille Raig, // rayon aiguille
Rav, // rayon arc vert (consigne vitesse) Rav, // rayon arc vert (consigne vitesse)
ImgL,ImgH : integer; // larg haut image ImgL,ImgH : integer; // larg haut image
idTrain : integer; idTrain : integer; // affectation au train
AngleFin : integer; // angle maxi du compteur AngleFin : integer; // angle maxi du compteur
redX,redY,ComptA,ComptB : single; redX,redY,ComptA,ComptB : single;
end; end;
@@ -997,7 +996,7 @@ var
SensAig,NbreRoutes,nbreIti,DetAtrouve,DetDepart,iteration,IdActTr,Long_recue, SensAig,NbreRoutes,nbreIti,DetAtrouve,DetDepart,iteration,IdActTr,Long_recue,
prec1,prec2,Eprec,Esuiv,param1,param2,param3,MaxParcours,MaxRoutes,tempoBlocUSB, prec1,prec2,Eprec,Esuiv,param1,param2,param3,MaxParcours,MaxRoutes,tempoBlocUSB,
IdTrainClic,TempoCombo,RayonCompteur,XcentreCompteur,YCentreCompteur,AigCX,AigCY, IdTrainClic,TempoCombo,RayonCompteur,XcentreCompteur,YCentreCompteur,AigCX,AigCY,
IncrCompteur,tickt2,pointeurTaches,Nbre_Interfaces_CDM : integer; tickt2,pointeurTaches,Nbre_Interfaces_CDM : integer;
ack,portCommOuvert,traceTrames,AffMem,CDM_connecte,dupliqueEvt,affiche_retour_dcc, ack,portCommOuvert,traceTrames,AffMem,CDM_connecte,dupliqueEvt,affiche_retour_dcc,
Raz_Acc_signaux,AvecTCO,terminal,Srvc_Aig,Srvc_Det,Srvc_Act,MasqueBandeauTCO, Raz_Acc_signaux,AvecTCO,terminal,Srvc_Aig,Srvc_Det,Srvc_Act,MasqueBandeauTCO,
@@ -2789,7 +2788,8 @@ begin
val(PortComCde,prot,erreur); val(PortComCde,prot,erreur);
if (_vitesse<>300) and (_vitesse<>1200) and (_vitesse<>2400) and (_vitesse<>4800) and (_vitesse<>9600) and if (_vitesse<>300) and (_vitesse<>1200) and (_vitesse<>2400) and (_vitesse<>4800) and (_vitesse<>9600) and
(_vitesse<>19200) and (_vitesse<>38400) and (_vitesse<>57600) and (_vitesse<>115200) and (_vitesse<>128000) and (_vitesse<>256000) then (_vitesse<>19200) and (_vitesse<>38400) and (_vitesse<>57600) and (_vitesse<>115200) and (_vitesse<>128000) and
(_vitesse<>230400) and(_vitesse<>256000) then
begin begin
Affiche('Vitesse périphérique COM'+intToSTR(port)+' ('+intToSTR(_vitesse)+') incorrecte',clred); Affiche('Vitesse périphérique COM'+intToSTR(port)+' ('+intToSTR(_vitesse)+') incorrecte',clred);
tablo_periph[index].PortOuvert:=false; tablo_periph[index].PortOuvert:=false;
@@ -2882,9 +2882,12 @@ begin
sc:=copy(portComCde,i+1,j-i+1); sc:=copy(portComCde,i+1,j-i+1);
val(sc,vitesse,erreur); val(sc,vitesse,erreur);
if (vitesse<>300) and (vitesse<>1200) and (vitesse<>2400) and (vitesse<>4800) and (vitesse<>9600) and if (vitesse<>300) and (vitesse<>1200) and (vitesse<>2400) and (vitesse<>4800) and (vitesse<>9600) and
(vitesse<>19200) and (vitesse<>38400) and (vitesse<>57600) and (vitesse<>115200) and (vitesse<>128000) and (vitesse<>256000) then (vitesse<>19200) and (vitesse<>38400) and (vitesse<>57600) and (vitesse<>115200) and (vitesse<>128000) and
(vitesse<>256000) then
// 230400) interdits en MSCOMM
begin begin
Affiche('Vitesse périphérique COM'+intToSTR(port)+' ('+intToSTR(vitesse)+') incorrecte',clred); Affiche('Vitesse périphérique COM'+intToSTR(port)+' ('+intToSTR(vitesse)+') incorrecte',clred);
if (vitesse=230400) then Affiche('La vitesse 230400 est interdite sur cette version',clred);
tablo_periph[index].PortOuvert:=false; tablo_periph[index].PortOuvert:=false;
result:=false; result:=false;
exit; exit;
@@ -5254,6 +5257,8 @@ var i : integer;
begin begin
i:=extract_int((Sender as tbutton).Name); i:=extract_int((Sender as tbutton).Name);
vitesse_loco(trains[i].nom_train,i,trains[i].adresse,0,10,0); vitesse_loco(trains[i].nom_train,i,trains[i].adresse,0,10,0);
// mettre la trackbar à 0
compteurT[i].tb.Position:=0;
end; end;
// changement trackbar compteurs groupBox // changement trackbar compteurs groupBox
@@ -17065,7 +17070,7 @@ begin
if (op=ActionCdePeriph) then if (op=ActionCdePeriph) then
begin begin
v:=Tablo_Action[i].TabloOp[ida].periph; // numéro d'accessoire v:=Tablo_Action[i].TabloOp[ida].periph; // numéro d'accessoire
Affiche(st+' Envoi commande',clYellow); Affiche(st+' Envoi commande '+Tablo_Action[i].TabloOp[ida].chaine,clYellow);
af:=com_socket(v); af:=com_socket(v);
if af=1 then envoi_periph_usb(i,ida); // numéro d'actionneur if af=1 then envoi_periph_usb(i,ida); // numéro d'actionneur
if af=2 then envoi_socket_periph_act(i,ida); // numéro d'actionneur if af=2 then envoi_socket_periph_act(i,ida); // numéro d'actionneur
@@ -17939,7 +17944,7 @@ begin
else else
if AffAigND then affiche('Avertissement 47 : un evt accessoire '+intToSTR(adresse)+' non déclaré a été reçu',clOrange); if AffAigND then affiche('Avertissement 47 : un evt accessoire '+intToSTR(adresse)+' non déclaré a été reçu',clOrange);
// evt actionneur d'aiguillage // evt actionneur d'aiguillage dans actions
for i:=1 to maxTablo_act do for i:=1 to maxTablo_act do
begin begin
etatAct:=Tablo_Action[i].etat ; etatAct:=Tablo_Action[i].etat ;
@@ -18204,7 +18209,7 @@ begin
end; end;
end; end;
if index<>0 then event_aig(adresse,octet) if indexAig<>0 then event_aig(adresse,octet)
else else
// Serveur envoi au clients // Serveur envoi au clients
Envoi_serveur('T'+intToSTR(adresse)+','+intToSTR(octet)); Envoi_serveur('T'+intToSTR(adresse)+','+intToSTR(octet));
@@ -18228,6 +18233,7 @@ begin
end; end;
pilotage:=octet; pilotage:=octet;
// test si pilotage aiguillage inversé // test si pilotage aiguillage inversé
indexAig:=0;
if (acc=aigP) then if (acc=aigP) then
begin begin
indexAig:=index_aig(adresse); indexAig:=index_aig(adresse);
@@ -20921,7 +20927,11 @@ begin
NbreBlocsUSB:=10; NbreBlocsUSB:=10;
tickt2:=0; tickt2:=0;
NumBlocUSB:=1; NumBlocUSB:=1;
IncrCompteur:=3;
paramCompteur[1].increment:=3;
paramCompteur[2].increment:=3;
paramCompteur[3].increment:=3;
NbreFL:=0; NbreFL:=0;
compteur:=1; compteur:=1;
etape:=1; etape:=1;
@@ -21854,11 +21864,13 @@ begin
if typetache=ttacheACC then if typetache=ttacheACC then
begin begin
traite:=true; traite:=true;
// CDM Rail
if dest=ttDestCDM then if dest=ttDestCDM then
begin begin
if affe then Affiche(chaine,clyellow); if affe then Affiche(chaine,clyellow);
envoi_cdm(chaine); // cdm taches[].chaine envoi_cdm(chaine); // cdm taches[].chaine
end; end;
// xpressNet
if dest=ttDestXpressNet then if dest=ttDestXpressNet then
begin begin
envoi_ss_ack(chaine); // xpressnet envoi_ss_ack(chaine); // xpressnet
@@ -21873,6 +21885,7 @@ begin
Affiche('adr='+intToSTR(adresse)+' Sortie '+intToSTR(sortie)+' état = '+intToSTR(etat),clyellow); Affiche('adr='+intToSTR(adresse)+' Sortie '+intToSTR(sortie)+' état = '+intToSTR(etat),clyellow);
end; end;
end; end;
// Dccpp
if dest=ttDestDccpp then envoi_ss_ack(chaine); if dest=ttDestDccpp then envoi_ss_ack(chaine);
// lorsque l'action i est traitée, la supprimer, et décaler la liste des taches d'un cran // lorsque l'action i est traitée, la supprimer, et décaler la liste des taches d'un cran
@@ -21923,7 +21936,7 @@ end;
// timer à 100 ms // timer à 100 ms
procedure TFormPrinc.Timer1Timer(Sender: TObject); procedure TFormPrinc.Timer1Timer(Sender: TObject);
var n,i,j,a,d,longueur,adresseEl,TailleX,TailleY,orientation,indexTCO,x,y,Bimage,aspect, var n,i,j,a,d,longueur,adresseEl,TailleX,TailleY,orientation,indexTCO,x,y,Bimage,aspect,
IdDet,longDet,LongLoco,distArret,vitcons,vitesseABS,delta : integer; IdDet,longDet,LongLoco,distArret,vitcons,vitesseABS,delta,IncrCompteur : integer;
imageSignal : Timage; imageSignal : Timage;
frx,fry : single; frx,fry : single;
incrementPas,tempsArret,coeff,vitR : single; incrementPas,tempsArret,coeff,vitR : single;
@@ -22206,7 +22219,8 @@ begin
begin begin
//Affiche('Delta '+intToSTR(Delta),clYellow); //Affiche('Delta '+intToSTR(Delta),clYellow);
a:=abs(delta); a:=abs(delta);
if a>10 then IncrCompteur:=3 else IncrCompteur:=1;
if a>10 then IncrCompteur:=ParamCompteur[1].increment else IncrCompteur:=1;
if a<IncrCompteur then vitesseCompteur:=vitesseCons; if a<IncrCompteur then vitesseCompteur:=vitesseCons;
if a>=IncrCompteur then if a>=IncrCompteur then
if vitesseCompteur<vitesseCons then if vitesseCompteur<vitesseCons then
+1 -1
View File
@@ -26,7 +26,7 @@ var
f : textFile; f : textFile;
Const Const
VersionSC = '10.76'; // sert à la comparaison de la version publiée VersionSC = '10.77'; // sert à la comparaison de la version publiée
SousVersion=' '; // A B C ... en cas d'absence de sous version mettre un espace SousVersion=' '; // A B C ... en cas d'absence de sous version mettre un espace
// pour unzip // pour unzip
SHCONTCH_NOPROGRESSBOX=4; SHCONTCH_NOPROGRESSBOX=4;
+7
View File
@@ -350,6 +350,13 @@ version 10.74 : Traitement du cas TJD abord
Ajout paramètre de temporisation de commande des signaux. Ajout paramètre de temporisation de commande des signaux.
version 10.75 : Amélioration de l'importation des trains depuis CDM rail. version 10.75 : Amélioration de l'importation des trains depuis CDM rail.
Correction suppression des signaux. Correction suppression des signaux.
version 10.76 : Ajout du copier/coller des routes de trains.
Correction du bug de la 10.74 sur le pilotage des signaux.
version 10.77 : Amélioration diverses.
Correction du non affichage de la position des aiguillages dans le TCO.