Novus : Setpoint incr/decr from UI, comm. latency removed, isHeating/isCooling evaluation modified, clean-up

This commit is contained in:
Milan Hanajik
2022-04-26 16:53:10 +02:00
parent c5db2c0138
commit 95fb7ab9cc
2 changed files with 95 additions and 66 deletions
@@ -13,32 +13,32 @@ namespace TBF.Rig.Modbus.TempControl.Novus
public override string ToString() { return string.Format("SetRequiredTemperatureOp({0})", eventDone); }
/// Set by the constructor
readonly TControl easytherm;
readonly TControl tempControl;
readonly Event eventDone;
/// <summary>
/// Events: PressureInDone, PressureOutDone or Error
/// </summary>
/// <param name="easytherm">Pressure meter reference</param>
/// <param name="tempControl">Pressure meter reference</param>
/// <param name="pressure">Reference to the measured pressure variable, value is in bar</param>
/// <param name="eventDone">Event to be returned by Run() when completed OK</param>
public SetRequiredTemperatureOp(TControl easytherm, Event eventDone)
public SetRequiredTemperatureOp(TControl tempControl, Event eventDone)
{
if (easytherm == null) throw new ArgumentNullException("easytherm");
this.easytherm = easytherm;
if (tempControl == null) throw new ArgumentNullException("tempControl");
this.tempControl = tempControl;
this.eventDone = eventDone;
log.Debug(this.ToString());
}
public SetRequiredTemperatureOp(TControl easytherm)
: this(easytherm, Event.ConditionMet)
public SetRequiredTemperatureOp(TControl tempControl)
: this(tempControl, Event.ConditionMet)
{
}
/// <summary>Start this operation</summary>
public void Start()
{
easytherm.SetTemperatureSetpoint();
tempControl.SetTemperatureSetpoint();
}
/// <summary>Run this operation</summary>