fix altre variabili (slitta mag e prot mag...)
This commit is contained in:
@@ -4628,8 +4628,8 @@ namespace MTC_Adapter
|
||||
}
|
||||
// ...aggiorno valore riferimento...
|
||||
currCounters[i] = valore;
|
||||
sb.AppendLine(mCounters[i].ToString().Replace("|", " | "));
|
||||
}
|
||||
sb.AppendLine(mCounters[i].ToString().Replace("|", " | "));
|
||||
}
|
||||
// salvo su maschera...
|
||||
parentForm.dataMonitor_2 += sb.ToString();
|
||||
@@ -4643,22 +4643,33 @@ namespace MTC_Adapter
|
||||
public bool procSlittaMag(bool needSave)
|
||||
{
|
||||
uint delta = 0;
|
||||
uint valore = 0;
|
||||
string outString = string.Format("SlittaMagazzino_[1-{0}]_Count: ", currAdpConf.nSlittaMag);
|
||||
for (int i = 0; i < currAdpConf.nSlittaMag; i++)
|
||||
{
|
||||
delta = Convert.ToUInt32(istSlittaMag[i].vcMedian) - currSlittaMag[i];
|
||||
// controllo delta < 50% max...
|
||||
if (delta < uint.MaxValue / 2)
|
||||
// procedo solo SE HO FINESTRA VALIDA...
|
||||
if (istSlittaMag[i].vcValid)
|
||||
{
|
||||
//processo comunque sempre...
|
||||
uint contTot = updateValUIntByIncr(i, delta, "SlittaMagazzino_{0:00}_Count");
|
||||
// passo valore totale all'adapter
|
||||
vettSlittaMag[i].mSlittaMagCount.Value = contTot;
|
||||
// controllo valore riferimento...
|
||||
if (delta > 0)
|
||||
valore = Convert.ToUInt32(istSlittaMag[i].vcMedian);
|
||||
if (valore >= currSlittaMag[i])
|
||||
{
|
||||
// segnalo necessità salvataggio!
|
||||
needSave = true;
|
||||
delta = valore - currSlittaMag[i];
|
||||
|
||||
delta = Convert.ToUInt32(istSlittaMag[i].vcMedian) - currSlittaMag[i];
|
||||
// controllo delta < 50% max...
|
||||
if (delta < uint.MaxValue / 2)
|
||||
{
|
||||
//processo comunque sempre...
|
||||
uint contTot = updateValUIntByIncr(i, delta, "SlittaMagazzino_{0:00}_Count");
|
||||
// passo valore totale all'adapter
|
||||
vettSlittaMag[i].mSlittaMagCount.Value = contTot;
|
||||
// controllo valore riferimento...
|
||||
if (delta > 0)
|
||||
{
|
||||
// segnalo necessità salvataggio!
|
||||
needSave = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
// ...aggiorno valore riferimento...
|
||||
currSlittaMag[i] = Convert.ToUInt32(istSlittaMag[i].vcMedian);
|
||||
@@ -4677,22 +4688,31 @@ namespace MTC_Adapter
|
||||
public bool procProtMag(bool needSave)
|
||||
{
|
||||
uint delta = 0;
|
||||
uint valore = 0;
|
||||
string outString = string.Format("ProtMagazzino_[1-{0}]_Count: ", currAdpConf.nProtMag);
|
||||
for (int i = 0; i < currAdpConf.nProtMag; i++)
|
||||
{
|
||||
delta = Convert.ToUInt32(istProtMag[i].vcMedian) - currProtMag[i];
|
||||
// controllo delta < 50% max...
|
||||
if (delta < uint.MaxValue / 2)
|
||||
{// procedo solo SE HO FINESTRA VALIDA...
|
||||
if (istProtMag[i].vcValid)
|
||||
{
|
||||
//processo comunque sempre...
|
||||
uint contTot = updateValUIntByIncr(i, delta, "ProtMagazzino_{0:00}_Count");
|
||||
// passo valore totale all'adapter
|
||||
vettProtMag[i].mProtMagCount.Value = contTot;
|
||||
// controllo valore riferimento...
|
||||
if (delta > 0)
|
||||
valore = Convert.ToUInt32(istProtMag[i].vcMedian);
|
||||
if (valore >= currProtMag[i])
|
||||
{
|
||||
// segnalo necessità salvataggio!
|
||||
needSave = true;
|
||||
delta = valore - currProtMag[i];
|
||||
delta = Convert.ToUInt32(istProtMag[i].vcMedian) - currProtMag[i];
|
||||
// controllo delta < 50% max...
|
||||
if (delta < uint.MaxValue / 2)
|
||||
{
|
||||
//processo comunque sempre...
|
||||
uint contTot = updateValUIntByIncr(i, delta, "ProtMagazzino_{0:00}_Count");
|
||||
// passo valore totale all'adapter
|
||||
vettProtMag[i].mProtMagCount.Value = contTot;
|
||||
// controllo valore riferimento...
|
||||
if (delta > 0)
|
||||
{
|
||||
// segnalo necessità salvataggio!
|
||||
needSave = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
// ...aggiorno valore riferimento...
|
||||
currProtMag[i] = Convert.ToUInt32(istProtMag[i].vcMedian);
|
||||
|
||||
Reference in New Issue
Block a user