/// <summary> Get Configuration Information for a BrewTroller's Heat Output </summary> /// <param name="heatOutputID">ID of Heat Output</param> public BTHeatOutputConfig GetHeatOutputConfig(BTHeatOutputID heatOutputID) { var btHeatOutConfig = new BTHeatOutputConfig(); ProcessBTCommand(BTCommand.GetHeatOutputConfig, btHeatOutConfig, new List<int> { (int)heatOutputID }); return btHeatOutConfig; }
public void SetSetpoint(BTHeatOutputID heatOutputID, decimal value) { var setpoint = new GenericDecimal { Value = value, ByteCount = 1 }; ProcessBTCommand(BTCommand.SetAutoValve, setpoint, new List<int> { (int)heatOutputID }); }
public void HeatOutputSettings(BTHeatOutputID id, BTHeatMode mode, int cycleTime, int pGain, int iGain, int dGain, int hysteresis) { var tsCycleTime = TimeSpan.FromSeconds(cycleTime); var setConfig = new BTHeatOutputConfig { ID = id, Mode = mode, CycleTime = tsCycleTime, PGain = pGain, IGain = iGain, DGain = dGain, Hysteresis = hysteresis, SteamSensor = 0, SteamTarget = 0, SteamZero = 0 }; _btCom.SetHeatOutputConfig(setConfig); var getConfig = _btCom.GetHeatOutputConfig(id); Assert.AreEqual(setConfig.ID, getConfig.ID, "Heat Output Config: Get ID not equal to Set ID."); Assert.AreEqual(setConfig.Mode, getConfig.Mode, "Heat Output Config: Get Mode not equal to Set Mode."); Assert.AreEqual(setConfig.CycleTime, getConfig.CycleTime, "Heat Output Config: Get CycleTime not equal to Set CycleTime."); Assert.AreEqual(setConfig.PGain, getConfig.PGain, "Heat Output Config: Get PGain not equal to Set PGain."); Assert.AreEqual(setConfig.IGain, getConfig.IGain, "Heat Output Config: Get IGain not equal to Set IGain."); Assert.AreEqual(setConfig.DGain, getConfig.DGain, "Heat Output Config: Get DGain not equal to Set DGain."); Assert.AreEqual(setConfig.Hysteresis, getConfig.Hysteresis, "Heat Output Config: Get Hysteresis not equal to Set Hysteresis."); }