Ejemplo n.º 1
0
 /// <summary> Get the Volume Settings for a BrewTroller vessel </summary>
 /// <param name="vessel">ID of Heat Output</param>
 public BTVolumeSetting GetVolumeSetting(BTVesselID vessel)
 {
     var btVolumeSetting = new BTVolumeSetting();
     ProcessBTCommand(BTCommand.GetVolumnSetting, btVolumeSetting, new List<int> { (int)vessel });
     return btVolumeSetting;
 }
Ejemplo n.º 2
0
        public void VesselVolume(BTVesselID id, double capacity, double deadspace)
        {
            var saveVolume = _btCom.GetVolumeSetting(id);

            var setVolume = new BTVolumeSetting
            {
                ID = id,
                Capacity = (decimal)capacity,
                DeadSpace = (decimal)deadspace
            };
            _btCom.SetVolumeSetting(setVolume);

            var getVolume = _btCom.GetVolumeSetting(id);
            Assert.AreEqual(setVolume, getVolume);

            _btCom.SetVolumeSetting(saveVolume);
            var restoreVolume = _btCom.GetVolumeSetting(id);
            Assert.AreEqual(saveVolume, restoreVolume);
        }
Ejemplo n.º 3
0
 /// <summary> Get the Calibration Information for a BrewTroller vessel </summary>
 /// <param name="vessel">ID of Vessel</param>
 public BTVesselCalibration GetVesselCalibration(BTVesselID vessel)
 {
     var calibration = new BTVesselCalibration();
     ProcessBTCommand(BTCommand.GetVesselCalib, calibration, new List<int> { (int)vessel });
     return calibration;
 }
Ejemplo n.º 4
0
        public void VesselCalibration(BTVesselID id)
        {
            var saveCalib = _btCom.GetVesselCalibration(id);

            var setCalib = new BTVesselCalibration
            {
                ID = id,
                CalibrationPoint0 = new BTCalibrationPoint { PointID = 0, Volume = 0, Value = 0 },
                CalibrationPoint1 = new BTCalibrationPoint { PointID = 1, Volume = 100, Value = 230 },
                CalibrationPoint2 = new BTCalibrationPoint { PointID = 2, Volume = 200, Value = 654 },
                CalibrationPoint3 = new BTCalibrationPoint { PointID = 3, Volume = 300, Value = 1234 },
                CalibrationPoint4 = new BTCalibrationPoint { PointID = 4, Volume = 400, Value = 1456 },
                CalibrationPoint5 = new BTCalibrationPoint { PointID = 5, Volume = 500, Value = 1999 },
                CalibrationPoint6 = new BTCalibrationPoint { PointID = 6, Volume = 600, Value = 2798 },
                CalibrationPoint7 = new BTCalibrationPoint { PointID = 7, Volume = 700, Value = 3298 },
                CalibrationPoint8 = new BTCalibrationPoint { PointID = 8, Volume = 800, Value = 4023 },
                CalibrationPoint9 = new BTCalibrationPoint { PointID = 9, Volume = 1000, Value = 4095 },
            };
            _btCom.SetVesselCalibration(setCalib);

            var getCalib = _btCom.GetVesselCalibration(id);
            Assert.AreEqual(setCalib, getCalib);

            _btCom.SetVesselCalibration(saveCalib);
            var restoreCalib = _btCom.GetVesselCalibration(id);
            Assert.AreEqual(saveCalib, restoreCalib);
        }