修改两个函数initial_opening为100

This commit is contained in:
2026-08-20 01:51:01 +08:00
parent c9984b1112
commit adfb5623b3
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -176,7 +176,7 @@ class IncrementalPID:
self.output = new_output self.output = new_output
return new_output return new_output
def reset(self, initial_output=0.0): def reset(self, initial_output=100.0):
"""Reset controller history and initialize the output command.""" """Reset controller history and initialize the output command."""
initial_output = float(initial_output) initial_output = float(initial_output)
self.output = max(self.out_min, min(self.out_max, initial_output)) self.output = max(self.out_min, min(self.out_max, initial_output))
+2 -2
View File
@@ -150,8 +150,8 @@ class FlowControlLoop:
) )
self.target_flow_slm = target self.target_flow_slm = target
def start(self, initial_opening=0.0): def start(self, initial_opening=100.0):
"""复位状态并启动控制;默认从关闭开度开始。""" """复位状态并启动控制;默认从全开开度开始。"""
initial_opening = self._bounded_opening(initial_opening) initial_opening = self._bounded_opening(initial_opening)
self.pid.reset(initial_output=initial_opening) self.pid.reset(initial_output=initial_opening)
self.last_opening_pct = initial_opening self.last_opening_pct = initial_opening