Add Log {Led and Message} for Salimax status and alarm
This commit is contained in:
parent
1afcbfbf4f
commit
04bfbfc8b9
|
@ -0,0 +1,8 @@
|
|||
namespace InnovEnergy.App.SaliMax.Ess;
|
||||
|
||||
public enum LedState
|
||||
{
|
||||
Red,
|
||||
Orange,
|
||||
Green
|
||||
}
|
|
@ -131,6 +131,7 @@ internal static class Program
|
|||
|
||||
StateMachine = StateMachine.Default,
|
||||
EssControl = EssControl.Default,
|
||||
Log = new SystemLog{Led = LedState.Green, Message = null}, //TODO: Put real stuff
|
||||
Config = Config.Load() // load from disk every iteration, so config can be changed while running
|
||||
};
|
||||
}
|
||||
|
@ -183,7 +184,7 @@ internal static class Program
|
|||
record.ControlConstants();
|
||||
record.ControlSystemState();
|
||||
|
||||
$"{DateTime.Now} : {record.StateMachine.State}: {record.StateMachine.Message}".WriteLine().LogInfo();
|
||||
$"{UnixTime.Now} : {record.StateMachine.State}: {record.StateMachine.Message}".WriteLine().LogInfo();
|
||||
|
||||
var essControl = record.ControlEss().WriteLine().LogInfo();
|
||||
|
||||
|
|
Loading…
Reference in New Issue