This commit is contained in:
f1iwq2
2020-05-02 14:02:20 +02:00
parent ee3872d8a4
commit 86485b0585
7 changed files with 51 additions and 40 deletions

Binary file not shown.

View File

@@ -1691,10 +1691,10 @@ object FormConfig: TFormConfig
Caption = 'Mode autonome'
ImageIndex = 1
object Label9: TLabel
Left = 0
Top = 368
Width = 305
Height = 18
Left = 8
Top = 352
Width = 297
Height = 13
Caption = 'Ces param'#232'tres sont utilis'#233's en fonctionnement sans CDM Rail'
WordWrap = True
end
@@ -1702,19 +1702,19 @@ object FormConfig: TFormConfig
Left = 8
Top = 8
Width = 297
Height = 129
Height = 113
Caption = 'Acc'#232's USB - S'#233'rie '#224' l'#39'interface vers la centrale LENZ'
TabOrder = 0
object Label3: TLabel
Left = 16
Top = 24
Width = 140
Width = 142
Height = 13
Caption = '1. Protocole s'#233'rie USB (COM)'
Caption = '1. Protocole s'#233'rie USB / COM'
end
object Label4: TLabel
Left = 16
Top = 48
Top = 45
Width = 126
Height = 26
Caption = '2. Temporisation d'#39'envoi des octets de la trame (ms)'
@@ -1722,7 +1722,7 @@ object FormConfig: TFormConfig
end
object Label5: TLabel
Left = 16
Top = 88
Top = 75
Width = 152
Height = 26
Caption =
@@ -1731,9 +1731,9 @@ object FormConfig: TFormConfig
WordWrap = True
end
object EditcomUSB: TEdit
Left = 160
Top = 24
Width = 121
Left = 168
Top = 22
Width = 118
Height = 21
TabStop = False
TabOrder = 0
@@ -1741,7 +1741,7 @@ object FormConfig: TFormConfig
end
object EditTempoOctetUSB: TEdit
Left = 232
Top = 56
Top = 48
Width = 49
Height = 21
TabStop = False
@@ -1750,7 +1750,7 @@ object FormConfig: TFormConfig
end
object EditTempoReponse: TEdit
Left = 232
Top = 88
Top = 80
Width = 49
Height = 21
TabStop = False
@@ -1760,7 +1760,7 @@ object FormConfig: TFormConfig
end
object GroupBox4: TGroupBox
Left = 8
Top = 144
Top = 128
Width = 297
Height = 81
Caption = '4. Ent'#234'te des trames vers l'#39'interface'
@@ -1792,7 +1792,7 @@ object FormConfig: TFormConfig
end
object GroupBox3: TGroupBox
Left = 8
Top = 232
Top = 216
Width = 297
Height = 73
Caption = 'Acc'#232's r'#233'seau '#224' l'#39'interface vers la centrale LENZ Ethernet'
@@ -1905,7 +1905,7 @@ object FormConfig: TFormConfig
end
object GroupBox9: TGroupBox
Left = 8
Top = 312
Top = 296
Width = 297
Height = 41
Caption = 'Divers'

View File

@@ -529,6 +529,11 @@ begin
if RadioButton1.checked then Valeur_entete:=0;
if RadioButton2.checked then Valeur_entete:=1;
if RadioButton3.checked then Valeur_entete:=2;
case Valeur_entete of
0 : begin entete:='';suffixe:='';end;
1 : begin entete:=#$FF+#$FE;suffixe:='';end;
2 : begin entete:=#228;suffixe:=#13+#13+#10;end;
end;
if changeCDM then connecte_CDM;
if changeInterface then
@@ -619,10 +624,6 @@ begin
if Valeur_entete=2 then RadioButton3.checked:=true;
LabelInfo.Width:=253;LabelInfo.Height:=25;
if Valeur_entete=0 then RadioButton1.checked:=true;
if Valeur_entete=1 then RadioButton2.checked:=true;
if Valeur_entete=2 then RadioButton3.checked:=true;
CheckVerifVersion.Checked:=verifVersion;
CheckInfoVersion.Checked:=notificationVersion;
CheckLanceCDM.Checked:=LanceCDM;

Binary file not shown.

View File

@@ -1324,8 +1324,8 @@ object FormPrinc: TFormPrinc
SimplePanel = True
end
object MSCommUSBLenz: TMSComm
Left = 1144
Top = 120
Left = 720
Top = 144
Width = 32
Height = 32
OnComm = MSCommUSBLenzComm

View File

@@ -1300,24 +1300,26 @@ begin
i:=1;
valto:=10;
//Affiche('envoi en tenant compte cts',clyellow);
repeat
timeout:=0;
repeat
timeout:=0;
repeat
//Application.ProcessMessages;
inc(timeout);
Sleep(20);
until (Formprinc.MSCommUSBLenz.CTSHolding=true) or (timeout>valto);
if timeout<=valto then
begin
//if formprinc.MSCommUSBLenz.CTSHolding then sa:='CTS=1 ' else sa:='CTS=0 ';
FormPrinc.MSCommUSBLenz.Output:=s[i];
//if terminal then Affiche(sa+s[i],clyellow) else Affiche(sa+chaine_hex(s[i]),clyellow);
inc(i);
end;
until (i=length(s)+1) or (timeout>valto);
if timeout>valto then affiche('Erreur attente interface trop longue',clred);
//Application.ProcessMessages;
inc(timeout);
Sleep(20);
until (Formprinc.MSCommUSBLenz.CTSHolding=true) or (timeout>valto);
if timeout<=valto then
begin
//if formprinc.MSCommUSBLenz.CTSHolding then sa:='CTS=1 ' else sa:='CTS=0 ';
FormPrinc.MSCommUSBLenz.Output:=s[i];
//if terminal then Affiche(sa+s[i],clyellow) else Affiche(sa+chaine_hex(s[i]),clyellow);
inc(i);
end;
until (i=length(s)+1) or (timeout>valto);
if timeout>valto then affiche('Erreur attente interface trop longue',clred);
end;
// protocole Rts Cts ou sans temporisation
if (protocole=2) or (tempoOctet=0) then begin FormPrinc.MSCommUSBLenz.Output:=s;exit;end;
// sans procotole ou xon xoff ou xon-rts
if (protocole=0) or (protocole=1) or (protocole=3) then
begin
for i:=1 to length(s) do
@@ -6580,13 +6582,21 @@ end;
end;
FreeLibrary(DLL);
end;
Result:=IsWow64;
end;
{$J-}
// initialisation de la comm USB
procedure connecte_USB;
procedure connecte_USB;
var i,j : integer;
begin
if NumPort<>0 then
begin
With Formprinc.MSCommUSBLenz do
begin
i:=pos(':',portCom);
j:=pos(',',PortCom);
j:=posEx(',',PortCom,j+1);
j:=posEx(',',PortCom,j+1);
j:=posEx(',',PortCom,j+1);

View File

@@ -23,7 +23,7 @@ var
Lance_verif : integer;
verifVersion,notificationVersion : boolean;
Const Version='1.7'; //Version='1.2';// sert à la comparaison de la version publiée
Const Version='1.71'; //Version='1.2';// sert à la comparaison de la version publiée
implementation