Initialization of 30 components changed, done in Initialize( ).

This commit is contained in:
Milan Hanajik
2021-04-03 00:54:27 +02:00
parent cb1a66381f
commit a58fe1f997
30 changed files with 347 additions and 445 deletions
+1 -7
View File
@@ -41,13 +41,10 @@ namespace TBF.Rig.Modbus.Easytherm
}
/// <summary>Initialize this device</summary>
public void Initialize()
public override void Initialize()
{
if (easythermCfg.DebugLevel == DebugMode.Simulate) return;
temperatureSetPointValid = false;
temperatureSetPointRequested = false;
actualTemperatureIsValid = false;
ticketNumber = modbus.RegisterForPolling();
}
@@ -56,7 +53,6 @@ namespace TBF.Rig.Modbus.Easytherm
{
if (easythermCfg.DebugLevel == DebugMode.Simulate) return;
if (modbus.ReceivedTelegrams[easythermCfg.ModbusAddress].Count > 0)
{
byte[] telegram = modbus.ReceivedTelegrams[easythermCfg.ModbusAddress].Dequeue();
@@ -72,7 +68,6 @@ namespace TBF.Rig.Modbus.Easytherm
{
ushort value = (ushort)(256 * telegram[3] + telegram[4]);
actualTemperature = (double)value * 0.04;
actualTemperatureIsValid = true;
log.InfoFormat("{0} - Received actual temperature = {1}", Name, actualTemperature);
@@ -184,7 +179,6 @@ namespace TBF.Rig.Modbus.Easytherm
///
double actualTemperature;
bool actualTemperatureIsValid;
public double ReadTemperature()
{