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