Shelly:
- aggiunti metodi x deduplica FLog da KVP (da testare...)
This commit is contained in:
@@ -3644,7 +3644,8 @@ namespace IOB_WIN_FORM.Iob
|
||||
if (scaduto)
|
||||
{
|
||||
// limite a 3 digit x valore float
|
||||
outVal.Add(chiave, $"{valore:N3}");
|
||||
outVal.Add(chiave, valore.ToString("F3", CultureInfo.InvariantCulture));
|
||||
//outVal.Add(chiave, $"{valore:N3}");
|
||||
}
|
||||
LastTSVC[chiave] = valore;
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
"optKVP": {
|
||||
"shelly_tout": 5,
|
||||
"fluxLogReduce": true,
|
||||
"fluxLogRedDeadBand": 1.5,
|
||||
"fluxLogResendPeriod": 15
|
||||
"fluxLogRedDeadBand": 2,
|
||||
"fluxLogResendPeriod": 60
|
||||
}
|
||||
}
|
||||
@@ -90,33 +90,37 @@ namespace IOB_WIN_SHELLY.Iob
|
||||
// recupero da conf memMap e ciclo
|
||||
foreach (var item in IOBConfFull.SpecialConf.MemMap.mMapRead)
|
||||
{
|
||||
string outVal = "";
|
||||
//string outVal = "";
|
||||
double outValDbl = 0;
|
||||
// se trovo includo in dynData...
|
||||
switch (item.Value.memAddr)
|
||||
{
|
||||
case "ActEnergy":
|
||||
outVal = lastShellyResp.Value.ActEnergy.Total.ToString("F3", CultureInfo.InvariantCulture);
|
||||
outValDbl=lastShellyResp.Value.ActEnergy.Total;
|
||||
//outVal = lastShellyResp.Value.ActEnergy.Total.ToString("F3", CultureInfo.InvariantCulture);
|
||||
break;
|
||||
|
||||
case "Current":
|
||||
outVal = lastShellyResp.Value.Current.ToString("F3", CultureInfo.InvariantCulture);
|
||||
//outVal = $"{lastShellyResp.Value.Current:N3}";
|
||||
outValDbl = lastShellyResp.Value.Current;
|
||||
//outVal = lastShellyResp.Value.Current.ToString("F3", CultureInfo.InvariantCulture);
|
||||
break;
|
||||
|
||||
case "Power":
|
||||
outVal = lastShellyResp.Value.Power.ToString("F3", CultureInfo.InvariantCulture);
|
||||
//outVal = $"{lastShellyResp.Value.Power:N3}";
|
||||
outValDbl = lastShellyResp.Value.Power;
|
||||
//outVal = lastShellyResp.Value.Power.ToString("F3", CultureInfo.InvariantCulture);
|
||||
break;
|
||||
|
||||
case "Voltage":
|
||||
outVal = lastShellyResp.Value.Voltage.ToString("F3", CultureInfo.InvariantCulture);
|
||||
//outVal = $"{lastShellyResp.Value.Voltage:N3}";
|
||||
outValDbl = lastShellyResp.Value.Voltage;
|
||||
//outVal = lastShellyResp.Value.Voltage.ToString("F3", CultureInfo.InvariantCulture);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
outData.Add(item.Key, outVal);
|
||||
// modalità saveValue x reduce fLog
|
||||
saveValue(ref outData, item.Key, outValDbl);
|
||||
//outData.Add(item.Key, outValDbl.ToString("F3", CultureInfo.InvariantCulture));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user