Delete unnecessary code and comment

This commit is contained in:
atef 2023-09-04 15:57:08 +02:00
parent 1fa598049d
commit b9098e3979
1 changed files with 9 additions and 24 deletions

View File

@ -96,16 +96,16 @@ internal static class Program
StatusRecord ReadStatus() StatusRecord ReadStatus()
{ {
var acDc = acDcDevices.Read(); var acDc = acDcDevices.Read();
var dcDc = dcDcDevices.Read(); var dcDc = dcDcDevices.Read();
var relays = saliMaxRelaysDevice.Read(); var relays = saliMaxRelaysDevice.Read();
var loadOnAcIsland = acIslandLoadMeter.Read(); var loadOnAcIsland = acIslandLoadMeter.Read();
var gridMeter = gridMeterDevice.Read(); var gridMeter = gridMeterDevice.Read();
var pvOnDc = amptDevice.Read(); var pvOnDc = amptDevice.Read();
var battery = batteryDevices.Read(); var battery = batteryDevices.Read();
var pvOnAcGrid = new AcPowerDevice { Power = 0 }; // TODO var pvOnAcGrid = new AcPowerDevice { Power = 0 }; // TODO
var pvOnAcIsland = new AcPowerDevice { Power = 0 }; // TODO var pvOnAcIsland = new AcPowerDevice { Power = 0 }; // TODO
var gridBusToIslandBus = Topology.CalculateGridBusToIslandBusPower(pvOnAcIsland, loadOnAcIsland, acDc); var gridBusToIslandBus = Topology.CalculateGridBusToIslandBusPower(pvOnAcIsland, loadOnAcIsland, acDc);
var gridBusLoad = Topology.CalculateGridBusLoad(gridMeter, pvOnAcGrid, gridBusToIslandBus); var gridBusLoad = Topology.CalculateGridBusLoad(gridMeter, pvOnAcGrid, gridBusToIslandBus);
@ -169,22 +169,7 @@ internal static class Program
{ {
Watchdog.NotifyAlive(); Watchdog.NotifyAlive();
var t = UnixTime.Now;
var record = ReadStatus(); var record = ReadStatus();
int i = 1;
// For Debug purpose, will be deleted after
foreach (var device in record.Battery.Devices)
{
Console.WriteLine(" Battery " + i);
device.TimeSinceTOC.WriteLine(" : Value of register 54");
device.Soc.WriteLine(" : SOC");
device.CalibrationChargeRequested.WriteLine(" : Calibration Charge Requested");
i++;
"====================".WriteLine();
}
record.ControlConstants(); record.ControlConstants();
record.ControlSystemState(); record.ControlSystemState();