This commit is contained in:
f1iwq2
2024-01-11 20:39:36 +01:00
parent 5562e9c899
commit ed7935a641
16 changed files with 685 additions and 635 deletions

View File

@@ -230,9 +230,8 @@ begin
if formTCO[indexTCO].Showing then
begin
affiche_tco(1);
end;
maj_feux(true);
maj_feux(true);
end;
Maj_Signaux(true);
Maj_Signaux(true);
end;
@@ -343,7 +342,7 @@ begin
if key=chr(27) then close;
end;
procedure TFormPlace.ButtonLanceRoutageClick(Sender: TObject);
procedure TFormPlace.ButtonLanceRoutageClick(Sender: TObject);
var a,i,j,id,adrDet,AdrTrain,AdrSignal : integer;
trouve,rouge : boolean;
var s: string;
@@ -365,12 +364,12 @@ begin
trouve:=true;
roulage:=true;
avecResa:=false; // pour adrTrain ou NumTrain
AdrTrain:=detecteur[AdrDet].AdrTrain;
AdrTrain:=detecteur[AdrDet].AdrTrain;
AdrSignal:=signal_detecteur(AdrDet); // trouve l'adresse du signal correspondant au détecteur
// si il y a un signal sur le détecteur de démarrage du train est il au rouge?
// si il y a un signal sur le détecteur de démarrage du train est il au rouge?
if AdrSignal<>0 then
begin
begin
id:=index_Signal(AdrSignal);
a:=Signaux[id].EtatSignal;
if ((a=semaphore_F) or (a=carre_F) or (a=violet_F)) then rouge:=true;
@@ -380,21 +379,21 @@ begin
begin
j:=index_train_adresse(AdrTrain);
vitesse_loco('',adrTrain,j,trains[j].VitNominale,not(placement[j].inverse),true);
Maj_Signaux(true); // avec détecteurs
s:='Lancement du train '+detecteur[adrDet].train+' depuis détecteur '+intToSTR(adrDet);
Affiche(s,clYellow);
if traceListe then AfficheDebug(s,clyellow);
reserve_canton(AdrDet,placement[j].detdir,adrtrain,0,2);
end
end
Else Affiche('Le signal '+intToSTR(AdrSignal)+' étant rouge, le train '+detecteur[adrDet].train+' @'+intToSTR(AdrTrain)+' ne démarre pas',clyellow);
end;
end;
// au moins un train démarre
if trouve then
begin
begin
Maj_Signaux(true);
Formprinc.LabelTitre.caption:=titre+' - Mode roulage en cours';
with Formprinc.SBMarcheArretLoco do
@@ -550,8 +549,10 @@ procedure TFormPlace.FormCreate(Sender: TObject);
procedure TFormPlace.FormCreate(Sender: TObject);
var c : tcomponent;
i : integer;
begin
if debug=1 then Affiche('Début création fenetre Place',clLime);
PlaceAffiche:=true;
couleurs_place;
if debug=1 then Affiche('Fin création fenetre Place',clLime);
end;