V1.0.1.7-1 -- 2025/12/17
* Datastructure improved
This commit is contained in:
@@ -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