浏览代码

revise reserovir initialize bug

chenzk 1 天之前
父节点
当前提交
581d7f33fc
共有 1 个文件被更改,包括 11 次插入4 次删除
  1. 11 4
      PunkHPX8_RT/Modules/Reservoir/DMReservoirInitializeRoutine.cs

+ 11 - 4
PunkHPX8_RT/Modules/Reservoir/DMReservoirInitializeRoutine.cs

@@ -179,16 +179,23 @@ namespace PunkHPX8_RT.Modules.Reservoir
         /// <returns></returns>
         private bool AutoHedOn()
         {
-        
             bool result = _dmReservoirDevice.ReservoirData.CaFlow < _cellFlowStartLowLimit;
             if (result)
             {
                 LOG.WriteLog(eEvent.ERR_RESERVOIR, Module, $"CA Flow {_dmReservoirDevice.ReservoirData.CaFlow} is less than CellFlowStartLowLimit{_cellFlowStartLowLimit}");
                 return false;
             }
-            result &= _temperatureController.EnableOperation("", null);
-            result &= _temperatureController.SetTargetTemperatureOperation("", new object[] { _recipe.TemperatureSetPoint });
-            return result;
+            result = _temperatureController.EnableOperation("", null);
+            if (!result)
+            {
+                return false;
+            }
+            result = _temperatureController.SetTargetTemperatureOperation("", new object[] { _recipe.TemperatureSetPoint });
+            if (!result)
+            {
+                return false;
+            }
+            return true;
         }
         /// <summary>
         /// 检验Hed是否成功