fix pv input current not showing
This commit is contained in:
parent
7dd3915159
commit
2d989ad1b1
@ -41,7 +41,6 @@ public class Endpoint : EndpointWithoutRequest<object>
|
||||
BatteryVoltage = Random.Shared.Next(24),
|
||||
BatteryChargeCurrent = Random.Shared.Next(20),
|
||||
BatteryDischargeCurrent = Random.Shared.Next(300),
|
||||
PVInputCurrent = Random.Shared.Next(300),
|
||||
PVInputVoltage = Random.Shared.Next(300),
|
||||
PVInputWatt = Random.Shared.Next(1000),
|
||||
PV_MaxCapacity = 1000,
|
||||
|
||||
@ -53,7 +53,7 @@ public class InverterStatus
|
||||
public double OutputVoltage { get; set; }
|
||||
|
||||
[JsonPropertyName("q")]
|
||||
public double PVInputCurrent { get; set; }
|
||||
public double PVInputCurrent => PVInputWatt == 0 ? 0 : PVInputWatt / PVInputVoltage;
|
||||
|
||||
[JsonPropertyName("r")]
|
||||
public double PVInputVoltage { get; set; }
|
||||
|
||||
Loading…
Reference in New Issue
Block a user