Correzione reinvii

This commit is contained in:
Samuele E. Locatelli
2019-12-20 11:58:18 +01:00
parent 389092cbb8
commit 3cd0d744d5
2 changed files with 9 additions and 13 deletions
+6 -8
View File
@@ -1350,16 +1350,16 @@ namespace IOB_WIN
private void svuotaCodaContapezzi()
{
pzCntReload(true);
// se ho contapezzi OLTRE limite...
while (lastCountCNC > contapezzi + maxSendPzCountBlock)
while (lastCountCNC > contapezzi + minSendPzCountBlock)
{
pzCntReload(true);
// provo invio
trySendPzCountBlock();
// aspetto x dare tempo calcolo
Thread.Sleep(300);
// rileggo
pzCntReload(true);
//// rileggo
//pzCntReload(true);
}
}
@@ -3186,8 +3186,8 @@ namespace IOB_WIN
// verifico se la funzione SIA abilitata
if (enableSendPzCountBlock)
{
// rileggo qta da server...
pzCntReload(true);
//// rileggo qta da server...
//pzCntReload(true);
int delta = lastCountCNC - contapezzi;
// se è abilitata verifico differenza: se ho DELTA > minSendPzCountBlock --> invio un blocco <= maxSendPzCountBlock
if (delta > minSendPzCountBlock)
@@ -3205,8 +3205,6 @@ namespace IOB_WIN
int.TryParse(resp, out qtyAdded);
if (qtyAdded > 0)
{
// rileggo qta da server...
pzCntReload(true);
lgInfo($"Inviato incremento contapezzi: send {numIncr} | resp {qtyAdded}");
// invio conferma contapezzi..
string retVal = utils.callUrl($"{urlSetPzCount}{contapezzi}");
+3 -5
View File
@@ -302,13 +302,11 @@ namespace IOB_WIN
}
else
{
// rileggo qta da server...
pzCntReload(true);
string retVal = utils.callUrl($"{urlSetPzCount}{contapezzi}");
sigPzCount = false;
}
}
lgInfo($"Valori contatori: contapezzi macchina lastCountCNC: {lastCountCNC} | contapezzi: {contapezzi}");
lgInfo($"S01: Valori contatori: contapezzi macchina lastCountCNC: {lastCountCNC} | contapezzi: {contapezzi}");
}
}
}
@@ -361,8 +359,8 @@ namespace IOB_WIN
if (!isMulti)
{
lastCountCNC += delta;
lgInfo($"S01: Valori contatori: contapezzi macchina lastCountCNC: {lastCountCNC} | contapezzi: {contapezzi}");
}
lgInfo($"Valori contatori: contapezzi macchina lastCountCNC: {lastCountCNC} | contapezzi: {contapezzi}");
// SOLO SE sono online...
if (IobOnline)
{
@@ -390,7 +388,7 @@ namespace IOB_WIN
sendContapezzi = true;
// registro contapezzi
contapezzi++;
lgInfo($"Valori contatori: contapezzi macchina lastCountCNC: {lastCountCNC} | contapezzi: {contapezzi}");
lgInfo($"S01 Valori contatori: contapezzi macchina lastCountCNC: {lastCountCNC} | contapezzi: {contapezzi}");
}
if (sendContapezzi)
{