Added a null check condition.
This commit is contained in:
parent
2b4d484bdc
commit
4e17ce2420
|
@ -828,8 +828,10 @@ internal static class Program
|
|||
|
||||
private static void ApplyConfigFile(this StatusRecord status, Configuration? config)
|
||||
{
|
||||
status.Config.MinSoc = config.MinimumSoC;
|
||||
status.Config.GridSetPoint = config.GridSetPoint * 1000; // converted from kW to W
|
||||
if (config == null) return;
|
||||
|
||||
status.Config.MinSoc = config.MinimumSoC;
|
||||
status.Config.GridSetPoint = config.GridSetPoint * 1000; // converted from kW to W
|
||||
status.Config.ForceCalibrationChargeState = config.CalibrationChargeState;
|
||||
|
||||
if (config.CalibrationChargeState == CalibrationChargeType.RepetitivelyEvery)
|
||||
|
|
Loading…
Reference in New Issue