瀏覽代碼

fix a bug

highing666 2 年之前
父節點
當前提交
1815440c2f
共有 2 個文件被更改,包括 9 次插入8 次删除
  1. 8 7
      app/controllers/equipment/pau/freq_set.py
  2. 1 1
      docker-compose.yml

+ 8 - 7
app/controllers/equipment/pau/freq_set.py

@@ -180,13 +180,14 @@ class ACATFUFanFreqController:
     def hcho_logic(spaces_params: List[SpaceATFU], next_freq_set: float) -> float:
         diff = 0.0
         for space in spaces_params:
-            if space.hcho >= 0.1:
-                diff = 5
-                break
-            elif space.hcho >= 0.08:
-                diff = 3
-            else:
-                diff = 0
+            if space.hcho:
+                if space.hcho >= 0.1:
+                    diff = 5
+                    break
+                elif space.hcho >= 0.08:
+                    diff = 3
+                else:
+                    diff = 0
 
         return next_freq_set + diff
 

+ 1 - 1
docker-compose.yml

@@ -2,7 +2,7 @@ version: "3"
 
 services:
   app:
-      image: registry.persagy.com/sagacloud/saga_algo_api:0.5.2
+      image: registry.persagy.com/sagacloud/saga_algo_api:0.5.3
       container_name: saga_algo_api
       ports:
         - "8002:8002"