chenhaiyang 4 роки тому
батько
коміт
3a3fb5cb90
1 змінених файлів з 3 додано та 3 видалено
  1. 3 3
      app/controllers/equipment/fcu/on_ratio.py

+ 3 - 3
app/controllers/equipment/fcu/on_ratio.py

@@ -24,10 +24,10 @@ class OnRatioController:
         self.period_num = period_num
 
     def select_mode(self) -> str:
-        if self.target < self.return_air:
+        if self.target <= self.return_air:
             mode = 'off'
         else:
-            if self.target - self.return_air > 1.5:
+            if self.target - self.return_air >= 1.5:
                 mode = 'normal'
             else:
                 mode = 'on_ratio'
@@ -75,7 +75,7 @@ class OnRatioController:
                 ratio = 0.9
             else:
                 try:
-                    if delta_off >= 0:
+                    if delta_off > 0:
                         delta_off = 0.0
                     ratio = (0.5 * (self.target - self.return_air) / period_time - delta_off) / (delta_on - delta_off)
                     if ratio > 0.9: