From adfb5623b3baf4020d820cf4a92f4bc53a803116 Mon Sep 17 00:00:00 2001 From: louissun Date: Thu, 20 Aug 2026 01:51:01 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=A4=E4=B8=AA=E5=87=BD?= =?UTF-8?q?=E6=95=B0initial=5Fopening=E4=B8=BA100?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- controllers.py | 2 +- flow_control.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/controllers.py b/controllers.py index 77c3579..282404b 100644 --- a/controllers.py +++ b/controllers.py @@ -176,7 +176,7 @@ class IncrementalPID: self.output = 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.""" initial_output = float(initial_output) self.output = max(self.out_min, min(self.out_max, initial_output)) diff --git a/flow_control.py b/flow_control.py index 7db4a4c..63a9230 100644 --- a/flow_control.py +++ b/flow_control.py @@ -150,8 +150,8 @@ class FlowControlLoop: ) 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) self.pid.reset(initial_output=initial_opening) self.last_opening_pct = initial_opening