V1.0.1.7-1 -- 2025/12/17
* Datastructure improved
This commit is contained in:
@@ -644,7 +644,7 @@ namespace LFP_Manager.Utils
|
||||
|
||||
parameters.Add(new SQLiteParameter("ext1_temp", (systemData.ValueData.Ext1Temperature / 10.0).ToString()));
|
||||
parameters.Add(new SQLiteParameter("ext2_temp", (systemData.ValueData.Ext2Temperature / 10.0).ToString()));
|
||||
parameters.Add(new SQLiteParameter("chg_option", systemData.CalibrationData.Current.ChargeOption.ToString()));
|
||||
parameters.Add(new SQLiteParameter("chg_option", systemData.CalibrationData.ChaMode.Mode.ToString()));
|
||||
|
||||
return parameters.ToArray();
|
||||
}
|
||||
|
||||
@@ -581,7 +581,7 @@ namespace LFP_Manager.Utils
|
||||
p[j++].Value = ((float)aSystemData.ValueData.Ext1Temperature / 10).ToString(); // 34 temperature_ext1 - FET Temp
|
||||
p[j++].Value = ((float)aSystemData.ValueData.Ext2Temperature / 10).ToString(); // 35 temperature_ext2 - Lmt Temp
|
||||
|
||||
p[j++].Value = aSystemData.CalibrationData.Current.ChargeOption.ToString(); // 36 chg_option
|
||||
p[j++].Value = aSystemData.CalibrationData.ChaMode.Mode.ToString(); // 36 chg_option
|
||||
|
||||
command.ExecuteNonQuery();
|
||||
|
||||
|
||||
@@ -272,7 +272,7 @@ namespace LFP_Manager.Utils
|
||||
|
||||
public static void DataInit(CommConfig aConfig, ref DeviceSystemData aSystemData)
|
||||
{
|
||||
aSystemData.ShelfCommFail = true;
|
||||
aSystemData.Reset();
|
||||
|
||||
switch (aConfig.CommType)
|
||||
{
|
||||
@@ -324,41 +324,6 @@ namespace LFP_Manager.Utils
|
||||
aSystemData.tempQty = 4;
|
||||
break;
|
||||
}
|
||||
|
||||
for (int j = 0; j < aSystemData.ValueData.CellVoltage.Length; j++)
|
||||
{
|
||||
aSystemData.ValueData.CellVoltage[j] = 0;
|
||||
}
|
||||
for (int j = 0; j < aSystemData.ValueData.CellTemperature.Length; j++)
|
||||
{
|
||||
aSystemData.ValueData.CellTemperature[j] = 0;
|
||||
}
|
||||
aSystemData.ValueData.voltageOfPack = 0;
|
||||
aSystemData.ValueData.current = 0;
|
||||
aSystemData.ValueData.rSOC = 0;
|
||||
aSystemData.AvgData.maxCellVoltage = 0;
|
||||
aSystemData.AvgData.minCellVoltage = 0;
|
||||
aSystemData.AvgData.avgCellVoltage = 0;
|
||||
aSystemData.AvgData.maxTemp = 0;
|
||||
aSystemData.AvgData.minTemp = 0;
|
||||
aSystemData.AvgData.avgTemp = 0;
|
||||
aSystemData.heatbeat = 0;
|
||||
aSystemData.StatusData.warning = 0;
|
||||
aSystemData.StatusData.protection = 0;
|
||||
|
||||
for (int j = 0; j < aSystemData.Information.BMS_SN.Length; j++)
|
||||
{
|
||||
aSystemData.Information.BMS_SN[j] = 0;
|
||||
}
|
||||
for (int j = 0; j < aSystemData.Information.Module_SN.Length; j++)
|
||||
{
|
||||
aSystemData.Information.Module_SN[j] = 0;
|
||||
}
|
||||
|
||||
aSystemData.CalibrationData.Battery.Capacity = 0;
|
||||
aSystemData.CalibrationData.Current.ChaAndDchSelect = 0;
|
||||
aSystemData.CalibrationData.Current.ChgCalibration_K = 0;
|
||||
aSystemData.CalibrationData.Current.DchCalibration_K = 0;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
Reference in New Issue
Block a user